Annotation of 43BSDReno/contrib/isode-beta/psap/pe_error.c, revision 1.1.1.1

1.1       root        1: /* pe_error.c - presentation element error to string */
                      2: 
                      3: #ifndef        lint
                      4: static char *rcsid = "$Header: /f/osi/psap/RCS/pe_error.c,v 7.0 89/11/23 22:13:03 mrose Rel $";
                      5: #endif
                      6: 
                      7: /* 
                      8:  * $Header: /f/osi/psap/RCS/pe_error.c,v 7.0 89/11/23 22:13:03 mrose Rel $
                      9:  *
                     10:  *
                     11:  * $Log:       pe_error.c,v $
                     12:  * Revision 7.0  89/11/23  22:13:03  mrose
                     13:  * Release 6.0
                     14:  * 
                     15:  */
                     16: 
                     17: /*
                     18:  *                               NOTICE
                     19:  *
                     20:  *    Acquisition, use, and distribution of this module and related
                     21:  *    materials are subject to the restrictions of a license agreement.
                     22:  *    Consult the Preface in the User's Manual for the full terms of
                     23:  *    this agreement.
                     24:  *
                     25:  */
                     26: 
                     27: 
                     28: /* LINTLIBRARY */
                     29: 
                     30: #include <stdio.h>
                     31: #include "psap.h"
                     32: 
                     33: /*  */
                     34: 
                     35: /*  */
                     36: 
                     37: static char *pe_errorlist[] = {
                     38:     "Error 0",
                     39:     "Overflow",
                     40:     "Out of memory",
                     41:     "No such bit",
                     42:     "Malformed universal timestring",
                     43:     "Malformed generalized timestring",
                     44:     "No such member",
                     45:     "Not a primitive form",
                     46:     "Not a constructor form",
                     47:     "Class/ID mismatch in constructor",
                     48:     "Malformed object identifier",
                     49:     "Malformed bitstring",
                     50: };
                     51: 
                     52: static int pe_maxerror = sizeof pe_errorlist / sizeof pe_errorlist[0];
                     53: 
                     54: /*  */
                     55: 
                     56: char   *pe_error (c)
                     57: int    c;
                     58: {
                     59:     register char  *bp;
                     60:     static char buffer[BUFSIZ];
                     61: 
                     62:     if (c < pe_maxerror && (bp = pe_errorlist[c]))
                     63:        return bp;
                     64: 
                     65:     (void) sprintf (buffer, "Error %d", c);
                     66:     return buffer;
                     67: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.