Annotation of researchv10no/cmd/udemon/udemon.h, revision 1.1

1.1     ! root        1: #
        !             2: /* op codes */
        !             3: 
        !             4: #define OK     128
        !             5: #define DEFINE 129
        !             6: #define REDEFINE       130
        !             7: #define DELETE 131
        !             8: #define EOM    133
        !             9: #define XMT    135
        !            10: #define POP    137
        !            11: #define CDIR   138
        !            12: #define CMODE  139
        !            13: #define OPEN   140
        !            14: #define CLOSE  141
        !            15: #define SEEK   142
        !            16: #define READ   143
        !            17: #define WRITE  144
        !            18: #define TRUNCATE       145
        !            19: #define LOGIN  146
        !            20: #define QUIT   147
        !            21: #define LIST   148
        !            22: #define STATUS 149
        !            23: #define TIME   150
        !            24: #define UNIQUE 151
        !            25: #define APPEND 152
        !            26: #define ASSIGN 154
        !            27: #define FCREATE        155
        !            28: #define IF     156
        !            29: #define FI     157
        !            30: #define SKIP   158
        !            31: #define DCREATE        159
        !            32: #define UNLESS 161
        !            33: 
        !            34: # define OPNUM 34              /* number of legal op codes */
        !            35: 
        !            36: 
        !            37: struct dentry{
        !            38:        char    d_val;          /*ms byte of value*/
        !            39:        char    d_type;         /*type see below*/
        !            40:        int     d_val1;         /*ls word of value*/
        !            41:        char    d_name[12];     /*file name filled with zero*/
        !            42: } 
        !            43: entry;
        !            44: 
        !            45: #define NTYPE  1               /*name - variable length ending in zero*/
        !            46: #define WTYPE  2               /*wstore - 1 word*/
        !            47: #define ETYPE  4               /*error - 2 words*/
        !            48: #define RTYPE  5               /*file reference - 1 word*/
        !            49: #define XTYPE  6               /*default argument*/
        !            50: #define STYPE  7               /*status 69 bytes*/
        !            51: #define DTYPE  8               /*directory ID - 2 words*/
        !            52: #define FTYPE  9               /*file ID - 2 words*/
        !            53: #define IITYPE 10              /*integer - 2 words*/
        !            54: #define ITYPE  11              /*integer - 1 word*/
        !            55: #define LTYPE  14              /*label - 1 char*/
        !            56: #define ATYPE  15              /*account - 2 words*/
        !            57: #define MAXTYPE 16             
        !            58: 
        !            59: 
        !            60: #define ACCDEV 03000   /*device code for accounts*/
        !            61: 
        !            62: 
        !            63: /* error codes */
        !            64: 
        !            65: #define ESIG   100             /*illegal signal code*/
        !            66: #define EEOM   101             /*fell off end of message*/
        !            67: #define EOP    102             /*illegal op code*/
        !            68: #define EARGT  103             /*illegal arg type*/
        !            69: #define EWADDR 104             /*illegal w-store addr*/
        !            70: #define EEXIST 105             /*already exists*/
        !            71: #define EUNDEF 106             /*does not exist*/
        !            72: #define EFREF  107             /*fref on non-open file*/
        !            73: #define EPWD   108             /*unknown user*/
        !            74: #define EFAIL  109             /*failed for unspecified reason*/
        !            75: #define EISACC 110             /*illegal use of account*/
        !            76: #define EUNAV  111             /*file store not available*/
        !            77: #define ELOG   112             /*user not logged in*/
        !            78: 
        !            79: 
        !            80: struct sentry{
        !            81:        int     s_val;
        !            82:        int     s_val1;
        !            83:        int     s_type;
        !            84: }
        !            85: stack[32];
        !            86: 
        !            87: #define VARNO  32              /*number of items in wstore*/
        !            88: struct sentry wstore[VARNO];
        !            89: 
        !            90: 
        !            91: struct link{
        !            92:        int     *l_link;        /*label for return from macro*/
        !            93:        char    *l_mp;          /*current position in message*/
        !            94:        char    *l_ms;          /*start position of message*/
        !            95: } 
        !            96: mlink[4];
        !            97: 
        !            98: struct utmp{
        !            99:        char    u_name[8];
        !           100:        char    u_tty;
        !           101:        char    u_ifill;
        !           102:        int     u_time[2];
        !           103:        int     u_ufill;
        !           104: } 
        !           105: utmp;
        !           106: 
        !           107: struct {
        !           108:        int word[1];
        !           109: };
        !           110: struct {
        !           111:        char byte[1];
        !           112: };
        !           113: 
        !           114: #define OPENS  15
        !           115: #define NSIZ   128
        !           116: 
        !           117: int buf[256];
        !           118: char nbuf[NSIZ];
        !           119: char mbuf[514];
        !           120: char uniqb[128];
        !           121: char   *up;
        !           122: int    statbuf[50];
        !           123: struct {
        !           124:        char even, odd;
        !           125: };
        !           126: char resp[100];
        !           127: char openf[OPENS];
        !           128: char argspec[OPNUM][3];
        !           129: char nodef[MAXTYPE];
        !           130: char unixid[128];
        !           131: 
        !           132: int    fn;                     /*tiu file*/
        !           133: int    chan;                   /*tiu channel number*/
        !           134: char   *rp;                    /*current position in response*/
        !           135: char   *mp;                    /*current position in message*/
        !           136: char   *mlast;                 /*end of message*/
        !           137: struct sentry *sp;             /*top of stack*/
        !           138: struct sentry *asp;            /*misc. stack pointer*/
        !           139: struct link *lp;               /*top of link list*/
        !           140: int    ig;                     /*label for SKIP, -1 for IF*/
        !           141: int    sum;                    /*sumcheck of last file transfer*/
        !           142: int    length;                 /*length of last file transfer*/
        !           143: int    login;                  /*set when logged in*/
        !           144: int    msiz;                   /*maximum size of message to user*/
        !           145: int    panic;                  /*nz after xmt timeout*/
        !           146: int    trace;                  /*non-zero if trace print*/
        !           147: struct {                       /*info returned from wait()*/
        !           148:        char    w_pno;          /*process number*/
        !           149:        char    w_stat;         /*return status*/
        !           150: }
        !           151: pstat;
        !           152: int    uid;
        !           153: char   *tiu;
        !           154: struct{
        !           155:        char    lobyte;
        !           156:        char    hibyte;
        !           157: };
        !           158: #define DELAY  60
        !           159: #define ROOTUSR        0
        !           160: #define EGOOD  0
        !           161: #define EBAD   1
        !           162: int    status;
        !           163: struct ustat{
        !           164:        int     mode;
        !           165:        int     type;
        !           166:        int     ftype;
        !           167:        int     uid;
        !           168:        int     gid;
        !           169:        long    size;
        !           170:        long    modtime;
        !           171:        long    acctime;
        !           172: }us;
        !           173:                        /* File Access permissions */
        !           174: #define R      04
        !           175: #define W      02
        !           176: #define X      01
        !           177:                        /* Types of files */
        !           178: #define FFILE  0
        !           179: #define CHR    1
        !           180: #define DIR    2
        !           181: #define BLK    3
        !           182: #define REC    4
        !           183: char   *netpwd;

unix.superglobalmegacorp.com

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