|
|
1.1 root 1: /* ps_error.c - presentation stream error to string */
2:
3: #ifndef lint
4: static char *rcsid = "$Header: /f/osi/psap/RCS/ps_error.c,v 7.0 89/11/23 22:13:20 mrose Rel $";
5: #endif
6:
7: /*
8: * $Header: /f/osi/psap/RCS/ps_error.c,v 7.0 89/11/23 22:13:20 mrose Rel $
9: *
10: *
11: * $Log: ps_error.c,v $
12: * Revision 7.0 89/11/23 22:13:20 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: static char *ps_errorlist[] = {
36: "Error 0",
37: "Overflow in ID",
38: "Overflow in length",
39: "Out of memory",
40: "End of file",
41: "End of file reading extended ID",
42: "End of file reading extended length",
43: "Length Mismatch",
44: "Truncated",
45: "Indefinite length in primitive form",
46: "I/O error",
47: "XXX"
48: };
49:
50: static int ps_maxerror = sizeof ps_errorlist / sizeof ps_errorlist[0];
51:
52: /* */
53:
54: char *ps_error (c)
55: int c;
56: {
57: register char *bp;
58: static char buffer[BUFSIZ];
59:
60: if (c < ps_maxerror && (bp = ps_errorlist[c]))
61: return bp;
62:
63: (void) sprintf (buffer, "Error %d", c);
64: return buffer;
65: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.