1: /* Copyright (c) 1979 Regents of the University of California */
2:
3: static char sccsid[] = "@(#)NAM.c 1.3 6/10/81";
4:
5: #include "h00vars.h"
6:
7: char *
8: NAM(val, name)
9:
10: long val; /* internal enumerated type value */
11: char *name; /* ptr to enumerated type name descriptor */
12: {
13: register int value = val;
14: register short *sptr;
15:
16: sptr = (short *)name;
17: if (value < 0 || value >= *sptr) {
18: ERROR("Enumerated type value of %D is out of range on output\n",
19: val);
20: return;
21: }
22: sptr++;
23: return name + 2 + sptr[value];
24: }
Defined functions
NAM
defined in line
7; used 2 times
Defined variables
sccsid
defined in line
3;
never used