|
|
1.1 ! root 1: # ! 2: /* ! 3: ** AUX.H -- misc. include information. ! 4: ** ! 5: ** Version: ! 6: ** @(#)aux.h 8.2 2/8/85 ! 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: ** UCODE_SZ is the size of the Usercode ! 112: */ ! 113: # define UCODE_SZ 2 ! 114: ! 115: /* ! 116: ** Usercode contains the current user's INGRES user-id code. ! 117: ** Pathname contains the name of the INGRES subtree. ! 118: */ ! 119: ! 120: extern char *Usercode; ! 121: extern char *Pathname; ! 122: ! 123: ! 124: ! 125: /* ! 126: ** The following union are for use in type conversion. ! 127: ** modified for VAX june '79 ! 128: */ ! 129: ! 130: ! 131: ! 132: /* ! 133: ** PRINTED OUTPUT ARGUMENTS ! 134: ** ! 135: ** The following struct describes the printed output available ! 136: ** to the user. ! 137: */ ! 138: ! 139: struct out_arg ! 140: { ! 141: int c0width; /* minimum width of "c" field */ ! 142: int i1width; /* width of "i1" field */ ! 143: int i2width; /* width of "i2" field */ ! 144: int i4width; /* width of "i4" field */ ! 145: int f4width; /* width of "f4" field */ ! 146: int f8width; /* width of "f8" field */ ! 147: int f4prec; /* number of decimal places on "f4" */ ! 148: int f8prec; /* number of decimal places on "f8" */ ! 149: char f4style; /* "f4" output style */ ! 150: char f8style; /* "f8" output style */ ! 151: int linesperpage; /* number of lines per output page */ ! 152: char coldelim; /* column delimiter */ ! 153: }; ! 154: ! 155: /* maximum width of any of the above fields */ ! 156: # define MAXFIELD 255 ! 157: /* ! 158: ** any text line read from a file (for example, .../files/users) can ! 159: ** be at most MAXLINE bytes long. buffers designed for holding ! 160: ** such info should be decleared as char buf[MAXLINE + 1] to allow ! 161: ** for the null terminator. ! 162: */ ! 163: ! 164: # define MAXLINE 256 ! 165: ! 166: ! 167: /* file mode for INGRES files */ ! 168: # define FILEMODE 0600 /* db file mode */ ! 169: ! 170: /* stuff giving information about the machine */ ! 171: # ifdef PDP11 ! 172: # define WORDSIZE 16 /* number of bits in word */ ! 173: # define LOG2WORDSIZE 4 /* log base 2 of WORDSIZE */ ! 174: # else ! 175: # define WORDSIZE 32 /* number of bits in word */ ! 176: # define LOG2WORDSIZE 5 /* log base 2 of WORDSIZE */ ! 177: # endif ! 178: ! 179: # endif MAXFIELD
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.