Annotation of 42BSD/ingres/source/h/aux.h, revision 1.1.1.1

1.1       root        1: #
                      2: /*
                      3: **  AUX.H -- misc. include information.
                      4: **
                      5: **     Version:
                      6: **             @(#)aux.h       7.1     2/5/81
                      7: */
                      8: 
                      9: # ifndef MAXFIELD
                     10: 
                     11: 
                     12: /*
                     13: **     Accessparam structure -- this structure is filled by
                     14: **     the paramd() and parami() routines. It gives a list of
                     15: **     key domains in their key sequence order.
                     16: */
                     17: 
                     18: struct accessparam
                     19: {
                     20:        short   mode;           /* mode of relation, NOKEY, RANGEKEY, EXACTKEY */
                     21:        short   sec_index;      /* TRUE if relation is a secondary index. else FALSE */
                     22:        char    keydno[MAXDOM + 1];
                     23: };
                     24: 
                     25: 
                     26: 
                     27: 
                     28: /*
                     29: **     Desxx structure -- This structure is used by opencatalog and
                     30: **     closecatalog. It is used to maintain a list of system relations
                     31: **     for caching.
                     32: */
                     33: 
                     34: struct desxx
                     35: {
                     36:        char    *cach_relname;  /* name of the relation */
                     37:        DESC    *cach_desc;     /* desc to use */
                     38:        DESC    *cach_alias;    /* alias for above descriptor */
                     39: };
                     40: 
                     41: 
                     42: /*
                     43: **  Relation status bits
                     44: **
                     45: **     These bits are in the relation relation, in the "relstat"
                     46: **     field.  They define status information about the relation.
                     47: */
                     48: 
                     49: # define       S_CATALOG       0000001         /* system catalog */
                     50: # define       S_NOUPDT        0000002         /* no update allowed */
                     51: # define       S_PROTUPS       0000004         /* tuples exist in 'protect' */
                     52: # define       S_INTEG         0000010         /* integrity constrained */
                     53: # define       S_CONCUR        0000020         /* concurrency enforced */
                     54: # define       S_VIEW          0000040         /* relation is a view */
                     55: # define       S_VBASE         0000100         /* base rel for a view */
                     56: # define       S_INDEX         0000200         /* is a sec indx */
                     57: # define       S_BINARY        0000400         /* print char domains in binary */
                     58: # define       S_DISTRIBUTED   0001000         /* reserved for distributed rels */
                     59: # define       S_DISCRIT       0002000         /* resrved for distr temp rel */
                     60: # define       S_DISCOPY       0004000         /* reserved for distributed rels */
                     61: # define       S_PROTALL       0010000         /* if clear, all permission */
                     62: # define       S_PROTRET       0020000         /* if clear, read permission */
                     63: 
                     64: /*
                     65: **  Protection bits are defined as follows:
                     66: **
                     67: **     S_PROTUPS -- if set, there are tuples for this relation in the
                     68: **             protect catalog.
                     69: **     S_PROTALL, S_PROTRET -- AS shown from the following table:
                     70: **     PROTALL PROTRET     meaning
                     71: **         1       1   Need to look in the protect catalog to tell.
                     72: **         1       0   Permit RETRIEVE to ALL case.
                     73: **         0       1   Permit ALL to ALL case.
                     74: **         0       0   Permit ALL to ALL and RETRIEVE to ALL.
                     75: */
                     76: 
                     77: /*
                     78: **  User status bits
                     79: **
                     80: **     These bits are in the status field of the users file.  They end
                     81: **     up in a variable "Status" after a call to initucode.
                     82: */
                     83: 
                     84: # define       U_CREATDB       0000001         /* can create data bases */
                     85: # define       U_DRCTUPDT      0000002         /* can specify direct update */
                     86: # define       U_UPSYSCAT      0000004         /* can update system catalogs directly */
                     87: # define       U_TRACE         0000020         /* can use trace flags */
                     88: # define       U_QRYMODOFF     0000040         /* can turn off qrymod */
                     89: # define       U_APROCTAB      0000100         /* can use arbitrary proctab */
                     90: # define       U_EPROCTAB      0000200         /* can use =proctab form */
                     91: # define       U_SUPER         0100000         /* ingres superuser */
                     92: 
                     93: /*
                     94: **     The following defines declare the field number in the users
                     95: **     file for each field.
                     96: */
                     97: 
                     98: # define       UF_NAME         0               /* login name */
                     99: # define       UF_UCODE        1               /* user code */
                    100: # define       UF_UID          2               /* UNIX user id */
                    101: # define       UF_GID          3               /* UNIX group id */
                    102: # define       UF_STAT         4               /* status bits */
                    103: # define       UF_FLAGS        5               /* default flags */
                    104: # define       UF_PTAB         6               /* default proctab */
                    105: # define       UF_IFILE        7               /* monitor init file */
                    106: # define       UF_DBLIST       9               /* list of valid databases */
                    107: 
                    108: # define       UF_NFIELDS      10              /* TOTAL number of fields */
                    109: 
                    110: /*
                    111: **     Usercode contains the current user's INGRES user-id code.
                    112: **     Pathname contains the name of the INGRES subtree.
                    113: */
                    114: 
                    115: extern char    *Usercode;
                    116: extern char    *Pathname;
                    117: 
                    118: 
                    119: 
                    120: /*
                    121: **     The following union are for use in type conversion.
                    122: **             modified for VAX june '79
                    123: */
                    124: 
                    125: 
                    126: 
                    127: /*
                    128: **  PRINTED OUTPUT ARGUMENTS
                    129: **
                    130: **     The following struct describes the printed output available
                    131: **     to the user.
                    132: */
                    133: 
                    134: struct out_arg
                    135: {
                    136:        int     c0width;        /* minimum width of "c" field */
                    137:        int     i1width;        /* width of "i1" field */
                    138:        int     i2width;        /* width of "i2" field */
                    139:        int     i4width;        /* width of "i4" field */
                    140:        int     f4width;        /* width of "f4" field */
                    141:        int     f8width;        /* width of "f8" field */
                    142:        int     f4prec;         /* number of decimal places on "f4" */
                    143:        int     f8prec;         /* number of decimal places on "f8" */
                    144:        char    f4style;        /* "f4" output style */
                    145:        char    f8style;        /* "f8" output style */
                    146:        int     linesperpage;   /* number of lines per output page */
                    147:        char    coldelim;       /* column delimiter */
                    148: };
                    149: 
                    150: /* maximum width of any of the above fields */
                    151: # define       MAXFIELD        255
                    152: /*
                    153: **  any text line read from a file (for example, .../files/users) can
                    154: **     be at most MAXLINE bytes long.  buffers designed for holding
                    155: **     such info should be decleared as char buf[MAXLINE + 1] to allow
                    156: **     for the null terminator.
                    157: */
                    158: 
                    159: # define       MAXLINE         256
                    160: 
                    161: 
                    162: /* file mode for INGRES files */
                    163: # define       FILEMODE        0600            /* db file mode */
                    164: 
                    165: /* stuff giving information about the machine */
                    166: # ifdef PDP11
                    167: # define       WORDSIZE        16      /* number of bits in word */
                    168: # define       LOG2WORDSIZE    4       /* log base 2 of WORDSIZE */
                    169: # else
                    170: # define       WORDSIZE        32      /* number of bits in word */
                    171: # define       LOG2WORDSIZE    5       /* log base 2 of WORDSIZE */
                    172: # endif
                    173: 
                    174: # endif MAXFIELD

unix.superglobalmegacorp.com

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