# 2.11BSD#431 - /usr/src/new/PORT/perl.1.0.0/cmd.h

##### Variables

    Nullccmd          X
    cmdname           X
    cmdopt            X

##### Macros

    CFT_ANCHOR        X
    CFT_CHOP          X
    CFT_EVAL          X
    CFT_FALSE         X
    CFT_GETS          X
    CFT_REG           X
    CFT_SCAN          X
    CFT_STROP         X
    CFT_TRUE          X
    CFT_UNFLIP        X
    CF_COND           X
    CF_EQSURE         X
    CF_FIRSTNEG       X
    CF_FLIP           X
    CF_INVERT         X
    CF_LOOP           X
    CF_NESURE         X
    CF_ONCE           X
    CF_OPTIMIZE       X
    C_BLOCK           X
    C_EXPR            X
    C_IF              X
    C_NULL            X
    C_WHILE           X
    Nullcmd           X

##### struct's

    acmd              X
    ccmd              X
    cmd               X
    compcmd           X

##### unions's

    ucmd              X

       1: /* $Header: cmd.h,v 1.0 87/12/18 13:04:59 root Exp $
       2:  *
       3:  * $Log:	cmd.h,v $
       4:  * Revision 1.0  87/12/18  13:04:59  root
       5:  * Initial revision
       6:  *
       7:  */
       8:
       9: #define C_NULL 0
      10: #define C_IF 1
      11: #define C_WHILE 2
      12: #define C_EXPR 3
      13: #define C_BLOCK 4
      14:
      15: #ifndef DOINIT
      16: extern char *cmdname[];
      17: #else
      18: char *cmdname[] = {
      19:     "NULL",
      20:     "IF",
      21:     "WHILE",
      22:     "EXPR",
      23:     "BLOCK",
      24:     "5",
      25:     "6",
      26:     "7",
      27:     "8",
      28:     "9",
      29:     "10",
      30:     "11",
      31:     "12",
      32:     "13",
      33:     "14",
      34:     "15",
      35:     "16"
      36: };
      37: #endif
      38:
      39: #define CF_OPTIMIZE 077 /* type of optimization */
      40: #define CF_FIRSTNEG 0100/* conditional is ($register NE 'string') */
      41: #define CF_NESURE 0200  /* if first doesn't match we're sure */
      42: #define CF_EQSURE 0400  /* if first does match we're sure */
      43: #define CF_COND 01000   /* test c_expr as conditional first, if not null. */
      44:             /* Set for everything except do {} while currently */
      45: #define CF_LOOP 02000   /* loop on the c_expr conditional (loop modifiers) */
      46: #define CF_INVERT 04000 /* it's an "unless" or an "until" */
      47: #define CF_ONCE 010000  /* we've already pushed the label on the stack */
      48: #define CF_FLIP 020000  /* on a match do flipflop */
      49:
      50: #define CFT_FALSE 0 /* c_expr is always false */
      51: #define CFT_TRUE 1  /* c_expr is always true */
      52: #define CFT_REG 2   /* c_expr is a simple register */
      53: #define CFT_ANCHOR 3    /* c_expr is an anchored search /^.../ */
      54: #define CFT_STROP 4 /* c_expr is a string comparison */
      55: #define CFT_SCAN 5  /* c_expr is an unanchored search /.../ */
      56: #define CFT_GETS 6  /* c_expr is $reg = <filehandle> */
      57: #define CFT_EVAL 7  /* c_expr is not optimized, so call eval() */
      58: #define CFT_UNFLIP 8    /* 2nd half of range not optimized */
      59: #define CFT_CHOP 9  /* c_expr is a chop on a register */
      60:
      61: #ifndef DOINIT
      62: extern char *cmdopt[];
      63: #else
      64: char *cmdopt[] = {
      65:     "FALSE",
      66:     "TRUE",
      67:     "REG",
      68:     "ANCHOR",
      69:     "STROP",
      70:     "SCAN",
      71:     "GETS",
      72:     "EVAL",
      73:     "UNFLIP",
      74:     "CHOP",
      75:     "10"
      76: };
      77: #endif
      78:
      79: struct acmd {
      80:     STAB    *ac_stab;   /* a symbol table entry */
      81:     ARG     *ac_expr;   /* any associated expression */
      82: };
      83:
      84: struct ccmd {
      85:     CMD     *cc_true;   /* normal code to do on if and while */
      86:     CMD     *cc_alt;    /* else code or continue code */
      87: };
      88:
      89: struct cmd {
      90:     CMD     *c_next;    /* the next command at this level */
      91:     ARG     *c_expr;    /* conditional expression */
      92:     CMD     *c_head;    /* head of this command list */
      93:     STR     *c_first;   /* head of string to match as shortcut */
      94:     STAB    *c_stab;    /* a symbol table entry, mostly for fp */
      95:     SPAT    *c_spat;    /* pattern used by optimization */
      96:     char    *c_label;   /* label for this construct */
      97:     union ucmd {
      98:     struct acmd acmd;   /* normal command */
      99:     struct ccmd ccmd;   /* compound command */
     100:     } ucmd;
     101:     short   c_flen;     /* len of c_first, if not null */
     102:     short   c_flags;    /* optimization flags--see above */
     103:     char    c_type;     /* what this command does */
     104: };
     105:
     106: #define Nullcmd Null(CMD*)
     107:
     108: EXT CMD *main_root INIT(Nullcmd);
     109:
     110: EXT struct compcmd {
     111:     CMD *comp_true;
     112:     CMD *comp_alt;
     113: };
     114:
     115: #ifndef DOINIT
     116: extern struct compcmd Nullccmd;
     117: #else
     118: struct compcmd Nullccmd = {Nullcmd, Nullcmd};
     119: #endif
     120: void opt_arg();
     121: void evalstatic();
     122: STR *cmd_exec();

#### Defined variables

Nullccmd declared in line 116; defined in line 118; never used
cmdname declared in line 16; defined in line 18; used 3 times

- in /usr/src/new/PORT/perl.1.0.0/cmd.c line 166-169(2)
- in /usr/src/new/PORT/perl.1.0.0/dump.c line 25

cmdopt declared in line 62; defined in line 64; used 1 times

- in /usr/src/new/PORT/perl.1.0.0/dump.c line 28

#### Defined struct's

acmd defined in line 79; used 2 times

- in line 98(2)

ccmd defined in line 84; used 2 times

- in line 99(2)

cmd defined in line 89; used 2 times

- in /usr/src/new/PORT/perl.1.0.0/perl.h line 29(2)

compcmd defined in line 110; used 6 times

- in line 116-118(4)
- in /usr/src/new/PORT/perl.1.0.0/perl.y line 51(2)

#### Defined union's

ucmd defined in line 97; never used

#### Defined macros

CFT_ANCHOR defined in line 53; never used
CFT_CHOP defined in line 59; never used
CFT_EVAL defined in line 57; never used
CFT_FALSE defined in line 50; never used
CFT_GETS defined in line 56; never used
CFT_REG defined in line 52; never used
CFT_SCAN defined in line 55; never used
CFT_STROP defined in line 54; never used
CFT_TRUE defined in line 51; never used
CFT_UNFLIP defined in line 58; never used
CF_COND defined in line 43; used 4 times

- in /usr/src/new/PORT/perl.1.0.0/cmd.c line 177, 423, 447
- in /usr/src/new/PORT/perl.1.0.0/dump.c line 36

CF_EQSURE defined in line 42; used 6 times

- in /usr/src/new/PORT/perl.1.0.0/cmd.c line 189, 196, 202, 213, 230
- in /usr/src/new/PORT/perl.1.0.0/dump.c line 34

CF_FIRSTNEG defined in line 40; used 5 times

- in /usr/src/new/PORT/perl.1.0.0/cmd.c line 214, 220, 231, 237
- in /usr/src/new/PORT/perl.1.0.0/dump.c line 30

CF_FLIP defined in line 48; used 3 times

- in /usr/src/new/PORT/perl.1.0.0/cmd.c line 289, 300
- in /usr/src/new/PORT/perl.1.0.0/dump.c line 44

CF_INVERT defined in line 46; used 2 times

- in /usr/src/new/PORT/perl.1.0.0/cmd.c line 309
- in /usr/src/new/PORT/perl.1.0.0/dump.c line 40

CF_LOOP defined in line 45; used 3 times

- in /usr/src/new/PORT/perl.1.0.0/cmd.c line 422, 447
- in /usr/src/new/PORT/perl.1.0.0/dump.c line 38

CF_NESURE defined in line 41; used 5 times

- in /usr/src/new/PORT/perl.1.0.0/cmd.c line 183, 196, 219, 236
- in /usr/src/new/PORT/perl.1.0.0/dump.c line 32

CF_ONCE defined in line 47; used 6 times

- in /usr/src/new/PORT/perl.1.0.0/cmd.c line 89-90(2), 359-360(2), 447
- in /usr/src/new/PORT/perl.1.0.0/dump.c line 42

CF_OPTIMIZE defined in line 39; used 2 times

- in /usr/src/new/PORT/perl.1.0.0/cmd.c line 178
- in /usr/src/new/PORT/perl.1.0.0/dump.c line 28

C_BLOCK defined in line 13; used 2 times

- in /usr/src/new/PORT/perl.1.0.0/cmd.c line 419
- in /usr/src/new/PORT/perl.1.0.0/perl.y line 181

C_EXPR defined in line 12; used 4 times

- in /usr/src/new/PORT/perl.1.0.0/perl.y line 134, 143-149(3)

C_IF defined in line 10; used 7 times

- in /usr/src/new/PORT/perl.1.0.0/cmd.c line 311
- in /usr/src/new/PORT/perl.1.0.0/dump.c line 75
- in /usr/src/new/PORT/perl.1.0.0/perl.y line 114, 153-159(4)

C_NULL defined in line 9; used 1 times

- in /usr/src/new/PORT/perl.1.0.0/form.c line 39

C_WHILE defined in line 11; used 5 times

- in /usr/src/new/PORT/perl.1.0.0/perl.y line 164-173(4), 179

Nullcmd defined in line 106; used 11 times

- in line 108, 118(2)
- in /usr/src/new/PORT/perl.1.0.0/cmd.c line 47
- in /usr/src/new/PORT/perl.1.0.0/dump.c line 77, 150
- in /usr/src/new/PORT/perl.1.0.0/perl.y line 110, 122, 128, 137, 185

#### Usage of this include

cmd.h used 1 times

- in /usr/src/new/PORT/perl.1.0.0/perl.h line 43

Last modified: 1988-01-31 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 828 |