|
|
1.1 root 1: /* sprintoid.c - object identifier to string */
2:
3: #ifndef lint
4: static char *rcsid = "$Header: /f/osi/psap/RCS/sprintoid.c,v 7.0 89/11/23 22:13:42 mrose Rel $";
5: #endif
6:
7: /*
8: * $Header: /f/osi/psap/RCS/sprintoid.c,v 7.0 89/11/23 22:13:42 mrose Rel $
9: *
10: *
11: * $Log: sprintoid.c,v $
12: * Revision 7.0 89/11/23 22:13:42 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: char *sprintoid (oid)
36: register OID oid;
37: {
38: register int i;
39: register unsigned int *ip;
40: register char *bp,
41: *cp;
42: static char buffer[BUFSIZ];
43:
44: if (oid == NULLOID || oid -> oid_nelem < 1)
45: return "";
46:
47: bp = buffer;
48:
49: for (ip = oid -> oid_elements, i = oid -> oid_nelem, cp = "";
50: i-- > 0;
51: ip++, cp = ".") {
52: (void) sprintf (bp, "%s%d", cp, *ip);
53: bp += strlen (bp);
54: }
55:
56: return buffer;
57: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.