1: /*
   2: **  USEFUL.H -- useful stuff.
   3: **
   4: **	Version:
   5: **		@(#)useful.h	8.6	2/8/85
   6: */
   7: 
   8: # ifndef TRUE
   9: # define TRUE       1   /* logical one, true, yes, ok, etc.*/
  10: # define FALSE      0   /* logical zero, false, no, nop, etc. */
  11: 
  12: typedef char    bool;       /* the boolean type */
  13: # endif TRUE
  14: 
  15: # ifndef NULL
  16: # define NULL       0   /* the null pointer */
  17: # endif NULL
  18: 
  19: # ifndef bitset
  20: # define    bitset(bit, word)   ((bit) & (word))
  21: # define    setbit(bit, word)   word |= bit
  22: # define    clrbit(bit, word)   word &= ~bit
  23: # endif bitset
  24: 
  25: # ifndef min
  26: # define    min(a, b)   (((a) < (b))? (a): (b))
  27: # define    max(a, b)   (((a) > (b))? (a): (b))
  28: # endif min
  29: 
  30: # ifndef RELINFO
  31: /*	macros for the HELP function 	*/
  32: # define    RELINFO     0   /* info about a relation */
  33: # define    MANSEC      1   /* manual section */
  34: # define    DELLIST     2   /* list of delimitors */
  35: # define    RELIST      3   /* list of relations */
  36: # define    ALLRELINFO  4   /* info about all relations */
  37: # define    ALLDELLIST  5   /* list of all delimitors */
  38: # endif RELINFO
  39: 
  40: /* 	The following are BNF grammar delimiter types used by parser/tree.c */
  41: # define    ONE     0
  42: # define    ZEROMORE    1
  43: # define    LBRACKET    '['
  44: # define    RBRACKET    ']'
  45: # define    LBRACE      '{'
  46: # define    RBRACE      '}'
  47: 
  48: /*
  49: ** Various manifest constants storage constants.
  50: */
  51: # define    MAXF4       2147483647.0
  52: # define    MINF4       -2147483648.0
  53: 
  54: # define    MAXI2       127
  55: # define    MINI2       -128
  56: 
  57: # define    MAXI4       32767
  58: # define    MINI4       -32768
  59: 
  60: # define    MAXI8       2147483647
  61: # define    MINI8       -2147483648
  62: 
  63: 
  64: # define    I1MASK      0377        /* mask out sign extension that occurs
  65: 						**  when a c1 or i1 field is converted
  66: 						**  to an i2 field.
  67: 						*/
  68: 
  69: # include   <fcntl.h>           /* for O_* */
  70: 
  71: /* modes for dest_const in dbu/rmqm.c */
  72: # define    DESTPROT    5   /* destroy permission */
  73: # define    DESTINTEG   6   /* destroy integrity constraint */
  74: 
  75: /* modes for the return values of replace() in iutil/replace.c */
  76: # define    NEWTUP      0
  77: # define    DUPTUP      1   /* new tuple duplicate of returned tid*/
  78: # define    DELTUP      2   /* tuple identified by tid deleted */
  79: # define    BADLID      3
  80: 
  81: /* macro for gutil/cat.c */
  82: # define    BLOCK_SZ    512
  83: 
  84: /* macros for return codes of initucode and initdbpath */
  85: # define    NODB        1
  86: # define    NOACCESS    2
  87: # define    INVALIDUSR  3
  88: # define    NODBNAME    4
  89: # define    INDIRECT    5
  90: # define    INDNODB     6
  91: 
  92: # define    DBEXIST     0
  93: # define    PTR2DB      1
  94: # define    NODBS       2
  95: # define    PTR2NODBS   3
  96: 
  97: /* macros for bitmap in dbu/pr_prot.c */
  98: # define    BITMAP_SZ   8
  99: # define    NUMSHIFTS   16
 100: 
 101: /* macros for conversion routines in gutil */
 102: # define    CONCAT_BUFSZ    101 /* buffer for string concats */
 103: # define    LONG_BUFSZ  30  /* buffer for long conversion*/
 104: # define    CHAR_SZ     7   /* buffer for int to ascii conversion */

Defined typedef's

bool defined in line 12; never used

Defined macros

ALLDELLIST defined in line 37; never used
ALLRELINFO defined in line 36; never used
BADLID defined in line 79; never used
BITMAP_SZ defined in line 98; never used
BLOCK_SZ defined in line 82; never used
CHAR_SZ defined in line 104; never used
CONCAT_BUFSZ defined in line 102; never used
DBEXIST defined in line 92; never used
DELLIST defined in line 34; never used
DELTUP defined in line 78; never used
DESTINTEG defined in line 73; never used
DESTPROT defined in line 72; never used
DUPTUP defined in line 77; never used
FALSE defined in line 10; never used
I1MASK defined in line 64; never used
INDIRECT defined in line 89; never used
INDNODB defined in line 90; never used
INVALIDUSR defined in line 87; never used
LBRACE defined in line 45; never used
LBRACKET defined in line 43; never used
LONG_BUFSZ defined in line 103; never used
MANSEC defined in line 33; never used
MAXF4 defined in line 51; never used
MAXI2 defined in line 54; never used
MAXI4 defined in line 57; never used
MAXI8 defined in line 60; never used
MINF4 defined in line 52; never used
MINI2 defined in line 55; never used
MINI4 defined in line 58; never used
MINI8 defined in line 61; never used
NEWTUP defined in line 76; never used
NOACCESS defined in line 86; never used
NODB defined in line 85; never used
NODBNAME defined in line 88; never used
NODBS defined in line 94; never used
NULL defined in line 16; used 1 times
  • in line 15
NUMSHIFTS defined in line 99; never used
ONE defined in line 41; never used
PTR2DB defined in line 93; never used
PTR2NODBS defined in line 95; never used
RBRACE defined in line 46; never used
RBRACKET defined in line 44; never used
RELINFO defined in line 32; used 1 times
  • in line 30
RELIST defined in line 35; never used
TRUE defined in line 9; used 1 times
  • in line 8
ZEROMORE defined in line 42; never used
bitset defined in line 20; used 1 times
  • in line 19
clrbit defined in line 22; never used
max defined in line 27; never used
min defined in line 26; used 1 times
  • in line 25
setbit defined in line 21; never used
Last modified: 1986-04-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 756
Valid CSS Valid XHTML 1.0 Strict