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

#### Defined variables

Nullccmd declared in line 120; defined in line 122; never used
cmdname declared in line 19; defined in line 21; used 3 times

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

cmdopt declared in line 65; defined in line 67; used 1 times

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

#### Defined struct's

acmd defined in line 82; used 2 times

- in line 101(2)

ccmd defined in line 87; used 2 times

- in line 102(2)

cmd defined in line 92; used 2 times

- in /usr/src/new/PORT/perl.1.0.10/perl.h line 46(2)

compcmd defined in line 114; used 6 times

- in line 120-122(4)
- in /usr/src/new/PORT/perl.1.0.10/perl.y line 54(2)

#### Defined union's

ucmd defined in line 100; never used

#### Defined macros

CFT_ANCHOR defined in line 56; never used
CFT_CHOP defined in line 62; never used
CFT_EVAL defined in line 60; never used
CFT_FALSE defined in line 53; never used
CFT_GETS defined in line 59; never used
CFT_REG defined in line 55; never used
CFT_SCAN defined in line 58; never used
CFT_STROP defined in line 57; never used
CFT_TRUE defined in line 54; never used
CFT_UNFLIP defined in line 61; never used
CF_COND defined in line 46; used 4 times

- in /usr/src/new/PORT/perl.1.0.10/cmd.c line 180, 429, 453
- in /usr/src/new/PORT/perl.1.0.10/dump.c line 36

CF_EQSURE defined in line 45; used 6 times

- in /usr/src/new/PORT/perl.1.0.10/cmd.c line 192, 199, 205, 216, 233
- in /usr/src/new/PORT/perl.1.0.10/dump.c line 34

CF_FIRSTNEG defined in line 43; used 5 times

- in /usr/src/new/PORT/perl.1.0.10/cmd.c line 217, 223, 234, 240
- in /usr/src/new/PORT/perl.1.0.10/dump.c line 30

CF_FLIP defined in line 51; used 3 times

- in /usr/src/new/PORT/perl.1.0.10/cmd.c line 292, 303
- in /usr/src/new/PORT/perl.1.0.10/dump.c line 44

CF_INVERT defined in line 49; used 2 times

- in /usr/src/new/PORT/perl.1.0.10/cmd.c line 312
- in /usr/src/new/PORT/perl.1.0.10/dump.c line 40

CF_LOOP defined in line 48; used 3 times

- in /usr/src/new/PORT/perl.1.0.10/cmd.c line 428, 453
- in /usr/src/new/PORT/perl.1.0.10/dump.c line 38

CF_NESURE defined in line 44; used 5 times

- in /usr/src/new/PORT/perl.1.0.10/cmd.c line 186, 199, 222, 239
- in /usr/src/new/PORT/perl.1.0.10/dump.c line 32

CF_ONCE defined in line 50; used 6 times

- in /usr/src/new/PORT/perl.1.0.10/cmd.c line 92-93(2), 362-363(2), 453
- in /usr/src/new/PORT/perl.1.0.10/dump.c line 42

CF_OPTIMIZE defined in line 42; used 2 times

- in /usr/src/new/PORT/perl.1.0.10/cmd.c line 181
- in /usr/src/new/PORT/perl.1.0.10/dump.c line 28

C_BLOCK defined in line 16; used 2 times

- in /usr/src/new/PORT/perl.1.0.10/cmd.c line 425
- in /usr/src/new/PORT/perl.1.0.10/perl.y line 187

C_EXPR defined in line 15; used 4 times

- in /usr/src/new/PORT/perl.1.0.10/perl.y line 140, 149-155(3)

C_IF defined in line 13; used 7 times

- in /usr/src/new/PORT/perl.1.0.10/cmd.c line 314
- in /usr/src/new/PORT/perl.1.0.10/dump.c line 75
- in /usr/src/new/PORT/perl.1.0.10/perl.y line 120, 159-165(4)

C_NULL defined in line 12; used 1 times

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

C_WHILE defined in line 14; used 5 times

- in /usr/src/new/PORT/perl.1.0.10/perl.y line 170-179(4), 185

Nullcmd defined in line 109; used 12 times

- in line 111-112(2), 122(2)
- in /usr/src/new/PORT/perl.1.0.10/cmd.c line 50
- in /usr/src/new/PORT/perl.1.0.10/dump.c line 77, 150
- in /usr/src/new/PORT/perl.1.0.10/perl.y line 116, 128, 134, 143, 191

#### Usage of this include

cmd.h used 1 times

- in /usr/src/new/PORT/perl.1.0.10/perl.h line 60

Last modified: 1988-02-03 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1344 |