# 2.11BSD#431 - /usr/src/ucb/rdist/defs.h

##### Macros

    ALLOC             X
    ARROW             X
    COLON             X
    COMPARE           X
    DCOLON            X
    EQUAL             X
    EXCEPT            X
    E_ALL             X
    E_SHELL           X
    E_TILDE           X
    E_VARS            X
    FOLLOW            X
    HASHSIZE          X
    IGNLNKS           X
    INMAX             X
    INSERT            X
    INSTALL           X
    ISDIR             X
    LOOKUP            X
    LP                X
    NAME              X
    NOTIFY            X
    OPTION            X
    PATTERN           X
    QUOTE             X
    REMOVE            X
    REPLACE           X
    RP                X
    SM                X
    SPECIAL           X
    STRING            X
    TRIM              X
    VERIFY            X
    VERSION           X
    WHOLE             X
    YOUNGER           X

##### struct's

    cmd               X
    linkbuf           X
    namelist          X
    subcmd            X

       1: /*
       2:  * Copyright (c) 1983 Regents of the University of California.
       3:  * All rights reserved.  The Berkeley software License Agreement
       4:  * specifies the terms and conditions for redistribution.
       5:  *
       6:  *	@(#)defs.h	5.2.3 (2.11BSD GTE) 1996/3/22
       7:  */
       8:
       9: #include <stdio.h>
      10: #include <ctype.h>
      11: #include <errno.h>
      12: #include <string.h>
      13: #include <pwd.h>
      14: #include <grp.h>
      15: #include <sys/param.h>
      16: #include <sys/dir.h>
      17: #include <sys/stat.h>
      18: #include <sys/time.h>
      19: #include <netinet/in.h>
      20:
      21: /*
      22:  * The version number should be changed whenever the protocol changes.
      23:  */
      24: #define VERSION  3
      25:
      26:     /* defines for yacc */
      27: #define EQUAL   1
      28: #define LP  2
      29: #define RP  3
      30: #define SM  4
      31: #define ARROW   5
      32: #define COLON   6
      33: #define DCOLON  7
      34: #define NAME    8
      35: #define STRING  9
      36: #define INSTALL 10
      37: #define NOTIFY  11
      38: #define EXCEPT  12
      39: #define PATTERN 13
      40: #define SPECIAL 14
      41: #define OPTION  15
      42:
      43:     /* lexical definitions */
      44: #define QUOTE   0200        /* used internally for quoted characters */
      45: #define TRIM    0177        /* Mask to strip quote bit */
      46:
      47:     /* table sizes */
      48: #define HASHSIZE    1021
      49: #define INMAX   3500
      50:
      51:     /* option flags */
      52: #define VERIFY  0x1
      53: #define WHOLE   0x2
      54: #define YOUNGER 0x4
      55: #define COMPARE 0x8
      56: #define REMOVE  0x10
      57: #define FOLLOW  0x20
      58: #define IGNLNKS 0x40
      59:
      60:     /* expand type definitions */
      61: #define E_VARS  0x1
      62: #define E_SHELL 0x2
      63: #define E_TILDE 0x4
      64: #define E_ALL   0x7
      65:
      66:     /* actions for lookup() */
      67: #define LOOKUP  0
      68: #define INSERT  1
      69: #define REPLACE 2
      70:
      71: #define ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
      72:
      73: #define ALLOC(x) (struct x *) malloc(sizeof(struct x))
      74:
      75: struct namelist {   /* for making lists of strings */
      76:     char    *n_name;
      77:     struct  namelist *n_next;
      78: };
      79:
      80: struct subcmd {
      81:     short   sc_type;    /* type - INSTALL,NOTIFY,EXCEPT,SPECIAL */
      82:     short   sc_options;
      83:     char    *sc_name;
      84:     struct  namelist *sc_args;
      85:     struct  subcmd *sc_next;
      86: };
      87:
      88: struct cmd {
      89:     int c_type;     /* type - ARROW,DCOLON */
      90:     char    *c_name;    /* hostname or time stamp file name */
      91:     char    *c_label;   /* label for partial update */
      92:     struct  namelist *c_files;
      93:     struct  subcmd *c_cmds;
      94:     struct  cmd *c_next;
      95: };
      96:
      97: struct linkbuf {
      98:     ino_t   inum;
      99:     dev_t   devnum;
     100:     int count;
     101:     char    *pathname;
     102:     char    *target;
     103:     struct  linkbuf *nextp;
     104: };
     105:
     106: extern int debug;       /* debugging flag */
     107: extern int nflag;       /* NOP flag, don't execute commands */
     108: extern int qflag;       /* Quiet. don't print messages */
     109: extern int options;     /* global options */
     110:
     111: extern int nerrs;       /* number of errors seen */
     112: extern int rem;         /* remote file descriptor */
     113: extern int iamremote;       /* acting as remote server */
     114: extern char tempfile[];     /* file name for logging changes */
     115: extern struct linkbuf *ihead;   /* list of files with more than one link */
     116: extern struct passwd *pw;   /* pointer to static area used by getpwent */
     117: extern struct group *gr;    /* pointer to static area used by getgrent */
     118: extern char host[];     /* host name of master copy */
     119: extern char buf[];      /* general purpose buffer */
     120:
     121: char *makestr();
     122: struct namelist *makenl();
     123: struct subcmd *makesubcmd();
     124: struct namelist *lookup();
     125: struct namelist *expand();
     126: char *exptilde();
     127: char *malloc();

#### Defined struct's

cmd defined in line 88; used 14 times

- in line 94(2)
- in /usr/src/ucb/rdist/docmd.c line 31-34(4)
- in /usr/src/ucb/rdist/gram.y line 14-15(4), 339(2), 390(2)

linkbuf defined in line 97; used 18 times

- in line 103(2), 115(2)
- in /usr/src/ucb/rdist/server.c line 22(2), 34(2), 362(2), 410(2), 480-484(4), 491(2)

namelist defined in line 75; used 74 times

- in line 77(2), 84(2), 92(2), 122-125(6)
- in /usr/src/ucb/rdist/docmd.c line 32(2), 83-87(4), 294-299(4), 450(2), 526-529(4), 544(2)
- in /usr/src/ucb/rdist/expand.c line 48-53(6), 111(2)
- in /usr/src/ucb/rdist/gram.y line 16(2), 41(2), 110(2), 133(2), 336-340(4), 386(2), 442-446(4)
- in /usr/src/ucb/rdist/lookup.c line 20(2), 33-34(4), 92-96(4)
- in /usr/src/ucb/rdist/main.c line 207-212(6), 259(2)

subcmd defined in line 80; used 36 times

- in line 85(2), 93(2), 123(2)
- in /usr/src/ucb/rdist/docmd.c line 17(2), 85-88(4), 296-298(4), 543(2)
- in /usr/src/ucb/rdist/gram.y line 17(2), 40(2), 337(2), 388(2), 459(2), 465(2)
- in /usr/src/ucb/rdist/main.c line 210(2)
- in /usr/src/ucb/rdist/server.c line 265(2), 272(2)

#### Defined macros

ALLOC defined in line 73; used 5 times

- in /usr/src/ucb/rdist/gram.y line 361, 392, 448, 467
- in /usr/src/ucb/rdist/lookup.c line 128

ARROW defined in line 31; used 5 times

- in /usr/src/ucb/rdist/gram.y line 25, 58-61(2), 208, 364

COLON defined in line 32; used 4 times

- in /usr/src/ucb/rdist/gram.y line 26, 61, 67, 246

COMPARE defined in line 55; used 10 times

- in /usr/src/ucb/rdist/gram.y line 275
- in /usr/src/ucb/rdist/main.c line 126
- in /usr/src/ucb/rdist/server.c line 207, 310, 360, 460, 584, 795, 854, 907

DCOLON defined in line 33; used 5 times

- in /usr/src/ucb/rdist/gram.y line 27, 64-67(2), 244, 395

EQUAL defined in line 27; used 3 times

- in /usr/src/ucb/rdist/gram.y line 21, 55, 195

EXCEPT defined in line 38; used 6 times

- in /usr/src/ucb/rdist/docmd.c line 550-553(2)
- in /usr/src/ucb/rdist/gram.y line 32, 46, 127, 308

E_ALL defined in line 64; used 5 times

- in /usr/src/ucb/rdist/gram.y line 129, 144, 343, 398
- in /usr/src/ucb/rdist/main.c line 233

E_SHELL defined in line 62; used 2 times

- in /usr/src/ucb/rdist/expand.c line 191
- in /usr/src/ucb/rdist/gram.y line 342

E_TILDE defined in line 63; used 4 times

- in /usr/src/ucb/rdist/expand.c line 192, 231, 277, 467

E_VARS defined in line 61; used 8 times

- in /usr/src/ucb/rdist/expand.c line 120, 156
- in /usr/src/ucb/rdist/gram.y line 114, 124, 139, 342
- in /usr/src/ucb/rdist/server.c line 147-149(2)

FOLLOW defined in line 57; used 3 times

- in /usr/src/ucb/rdist/gram.y line 295
- in /usr/src/ucb/rdist/main.c line 150
- in /usr/src/ucb/rdist/server.c line 280

HASHSIZE defined in line 48; used 2 times

- in /usr/src/ucb/rdist/lookup.c line 24, 109

IGNLNKS defined in line 58; used 3 times

- in /usr/src/ucb/rdist/docmd.c line 152
- in /usr/src/ucb/rdist/gram.y line 299
- in /usr/src/ucb/rdist/main.c line 154

INMAX defined in line 49; used 3 times

- in /usr/src/ucb/rdist/gram.y line 173, 215, 249

INSERT defined in line 68; used 3 times

- in /usr/src/ucb/rdist/gram.y line 56
- in /usr/src/ucb/rdist/lookup.c line 115, 133

INSTALL defined in line 36; used 6 times

- in /usr/src/ucb/rdist/docmd.c line 127
- in /usr/src/ucb/rdist/gram.y line 30, 46, 109, 304
- in /usr/src/ucb/rdist/main.c line 240

ISDIR defined in line 71; used 4 times

- in /usr/src/ucb/rdist/expand.c line 271, 465
- in /usr/src/ucb/rdist/server.c line 736, 991

LOOKUP defined in line 67; used 2 times

- in /usr/src/ucb/rdist/lookup.c line 114, 123

LP defined in line 28; used 3 times

- in /usr/src/ucb/rdist/gram.y line 22, 76, 198

NAME defined in line 34; used 12 times

- in /usr/src/ucb/rdist/gram.y line 28, 45, 55, 61-67(4), 73, 84, 315
- in /usr/src/ucb/rdist/server.c line 147-149(2)

NOTIFY defined in line 37; used 6 times

- in /usr/src/ucb/rdist/docmd.c line 144, 348
- in /usr/src/ucb/rdist/gram.y line 31, 46, 122, 306

OPTION defined in line 41; used 10 times

- in /usr/src/ucb/rdist/gram.y line 35, 44, 153, 276-300(7)

PATTERN defined in line 39; used 5 times

- in /usr/src/ucb/rdist/docmd.c line 550
- in /usr/src/ucb/rdist/gram.y line 33, 46, 132, 310

QUOTE defined in line 44; used 2 times

- in /usr/src/ucb/rdist/expand.c line 332
- in /usr/src/ucb/rdist/gram.y line 258

REMOVE defined in line 56; used 5 times

- in /usr/src/ucb/rdist/gram.y line 279
- in /usr/src/ucb/rdist/main.c line 130
- in /usr/src/ucb/rdist/server.c line 208, 310, 329

REPLACE defined in line 69; used 1 times

- in /usr/src/ucb/rdist/lookup.c line 82

RP defined in line 29; used 3 times

- in /usr/src/ucb/rdist/gram.y line 23, 76, 201

SM defined in line 30; used 7 times

- in /usr/src/ucb/rdist/gram.y line 24, 109, 122-132(3), 142, 204

SPECIAL defined in line 40; used 5 times

- in /usr/src/ucb/rdist/gram.y line 34, 46, 142, 312
- in /usr/src/ucb/rdist/server.c line 464

STRING defined in line 35; used 4 times

- in /usr/src/ucb/rdist/gram.y line 29, 45, 142, 240

TRIM defined in line 45; used 9 times

- in /usr/src/ucb/rdist/expand.c line 68, 332, 403, 447, 488, 525, 551-554(2), 565

VERIFY defined in line 52; used 17 times

- in /usr/src/ucb/rdist/docmd.c line 321, 350, 457
- in /usr/src/ucb/rdist/gram.y line 283
- in /usr/src/ucb/rdist/main.c line 114-116(2), 138
- in /usr/src/ucb/rdist/server.c line 204, 305, 402, 469, 731, 804, 876, 1081, 1203, 1373

VERSION defined in line 24; used 3 times

- in /usr/src/ucb/rdist/docmd.c line 233-235(2)
- in /usr/src/ucb/rdist/server.c line 56

WHOLE defined in line 53; used 5 times

- in /usr/src/ucb/rdist/gram.y line 287
- in /usr/src/ucb/rdist/main.c line 142
- in /usr/src/ucb/rdist/server.c line 199, 205, 224

YOUNGER defined in line 54; used 4 times

- in /usr/src/ucb/rdist/gram.y line 291
- in /usr/src/ucb/rdist/main.c line 146
- in /usr/src/ucb/rdist/server.c line 206, 604

#### Usage of this include

defs.h used 6 times

- in /usr/src/ucb/rdist/docmd.c line 12
- in /usr/src/ucb/rdist/expand.c line 11
- in /usr/src/ucb/rdist/gram.y line 12
- in /usr/src/ucb/rdist/lookup.c line 11
- in /usr/src/ucb/rdist/main.c line 16
- in /usr/src/ucb/rdist/server.c line 11

Last modified: 1996-03-23 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1502 |