# 2.11BSD#431 - /usr/src/bin/tcsh/tw.h

##### Macros

    BUILTINS          X
    DEFAULTLIST       X
    ESC               X
    FALSE             X
    FILSIZ            X
    FREE_DIR          X
    FREE_ITEMS        X
    ITEMS_INCR        X
    ITEMS_START       X
    NUMCMDS_INCR      X
    NUMCMDS_START     X
    OFF               X
    ON                X
    SEARCHLIST        X
    TRUE              X
    _h_tw             X
    equal             X
    is_set            X

       1: /* $Header: /home/hyperion/mu/christos/src/sys/tcsh-6.00/RCS/tw.h,v 3.0 1991/07/04 21:49:28 christos Exp $ */
       2: /*
       3:  * tw.h: TwENEX functions headers
       4:  */
       5: /*-
       6:  * Copyright (c) 1980, 1991 The Regents of the University of California.
       7:  * All rights reserved.
       8:  *
       9:  * Redistribution and use in source and binary forms, with or without
      10:  * modification, are permitted provided that the following conditions
      11:  * are met:
      12:  * 1. Redistributions of source code must retain the above copyright
      13:  *    notice, this list of conditions and the following disclaimer.
      14:  * 2. Redistributions in binary form must reproduce the above copyright
      15:  *    notice, this list of conditions and the following disclaimer in the
      16:  *    documentation and/or other materials provided with the distribution.
      17:  * 3. All advertising materials mentioning features or use of this software
      18:  *    must display the following acknowledgement:
      19:  *	This product includes software developed by the University of
      20:  *	California, Berkeley and its contributors.
      21:  * 4. Neither the name of the University nor the names of its contributors
      22:  *    may be used to endorse or promote products derived from this software
      23:  *    without specific prior written permission.
      24:  *
      25:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
      26:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
      27:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
      28:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
      29:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
      30:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
      31:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
      32:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
      33:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
      34:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
      35:  * SUCH DAMAGE.
      36:  */
      37: #ifndef _h_tw
      38: #define _h_tw
      39:
      40: #ifdef BSDSIGS
      41:
      42: # define FREE_ITEMS(items,num)\
      43: {\
      44:     sigmask_t omask;\
      45:     omask = sighold (SIGINT);\
      46:     free_items (items,num);\
      47:     items = NULL;\
      48:     (void) sigsetmask(omask);\
      49: }
      50:
      51: # define FREE_DIR(fd)\
      52: {\
      53:     sigmask_t omask;\
      54:     omask = sighold (SIGINT);\
      55:     (void) closedir (fd);\
      56:     fd = NULL;\
      57:     (void) sigsetmask(omask);\
      58: }
      59:
      60: #else
      61:
      62: # define FREE_ITEMS(items,num)\
      63: {\
      64:     sighold (SIGINT);\
      65:     free_items (items,num);\
      66:     items = NULL;\
      67:     (void) sigrelse (SIGINT);\
      68: }
      69:
      70: # define FREE_DIR(fd)\
      71: {\
      72:     sighold (SIGINT);\
      73:     (void) closedir (fd);\
      74:     fd = NULL;\
      75:     (void) sigrelse (SIGINT);\
      76: }
      77:
      78: #endif
      79:
      80: #ifndef TRUE
      81: # define TRUE       1
      82: #endif
      83: #ifndef FALSE
      84: # define FALSE      0
      85: #endif
      86: #define ON      1
      87: #define OFF     0
      88: #define FILSIZ      256 /* Max reasonable file name length */
      89: #define ESC     '\033'
      90: #define equal(a, b) (strcmp(a, b) == 0)
      91:
      92: #define is_set(var) adrof(var)
      93:
      94: #define BUILTINS    "/usr/local/lib/builtins/"  /* fake builtin bin */
      95: #define SEARCHLIST "HPATH"  /* Env. param for helpfile searchlist */
      96: #define DEFAULTLIST ":/usr/man/cat1:/usr/man/cat8:/usr/man/cat6:/usr/local/man/cat1:/usr/local/man/cat8:/usr/local/man/cat6"    /* if no HPATH */
      97:
      98: extern Char PromptBuf[];
      99:
     100: typedef enum {
     101:     LIST, RECOGNIZE, PRINT_HELP, SPELL, GLOB, GLOB_EXPAND,
     102:     VARS_EXPAND
     103: }       COMMAND;
     104:
     105:
     106: #ifndef pdp11
     107: #define NUMCMDS_START 512   /* was 800 */
     108: #define NUMCMDS_INCR 256
     109: #define ITEMS_START 512
     110: #define ITEMS_INCR 256
     111: #else
     112: #define NUMCMDS_START 256   /* was 800 */
     113: #define NUMCMDS_INCR 128
     114: #define ITEMS_START 256
     115: #define ITEMS_INCR 128
     116: #endif	/* pdp11 */
     117:
     118: #ifndef DONT_EXTERN
     119:
     120: extern Char **com_list; /* the pre-digested list of commands for speed
     121: 				 * and general usefullness */
     122: extern int numcommands;
     123: extern int have_sorted;
     124: extern int non_unique_match;
     125:
     126: extern Char dirflag[5];     /* ' nn\0' - dir #s -  . 1 2 ... */
     127:
     128:
     129: #endif
     130: #include "tw.decls.h"
     131:
     132: #endif				/* _h_tw */

#### Defined macros

BUILTINS defined in line 94; never used
DEFAULTLIST defined in line 96; used 1 times

- in /usr/src/bin/tcsh/tw.help.c line 101

ESC defined in line 89; never used
FALSE defined in line 84; used 14 times

- in line 83
- in /usr/src/bin/tcsh/ed.inputl.c line 242
- in /usr/src/bin/tcsh/tc.func.c line 275, 286, 305
- in /usr/src/bin/tcsh/tw.parse.c line 64, 432, 466-470(2), 519, 528, 535, 638, 764

FILSIZ defined in line 88; used 20 times

- in /usr/src/bin/tcsh/tw.help.c line 63, 77
- in /usr/src/bin/tcsh/tw.parse.c line 118, 175, 225, 239, 266, 315, 406, 595-597(3), 778-779(2), 1159
- in /usr/src/bin/tcsh/tw.spell.c line 56(2), 79-83(2), 92

FREE_DIR defined in line 70; used 3 times

- in /usr/src/bin/tcsh/tw.parse.c line 636, 767, 913

FREE_ITEMS defined in line 62; used 2 times

- in /usr/src/bin/tcsh/tw.parse.c line 633, 1010

ITEMS_INCR defined in line 115; used 2 times

- in /usr/src/bin/tcsh/tw.parse.c line 842-844(2)

ITEMS_START defined in line 114; used 2 times

- in /usr/src/bin/tcsh/tw.parse.c line 835-836(2)

NUMCMDS_INCR defined in line 113; used 4 times

- in /usr/src/bin/tcsh/tw.init.c line 114-118(2), 124-126(2)

NUMCMDS_START defined in line 112; used 2 times

- in /usr/src/bin/tcsh/tw.init.c line 107-109(2)

OFF defined in line 87; never used
ON defined in line 86; never used
SEARCHLIST defined in line 95; used 1 times

- in /usr/src/bin/tcsh/tw.help.c line 99

TRUE defined in line 81; used 6 times

- in line 80
- in /usr/src/bin/tcsh/tw.parse.c line 433, 469, 540, 886, 1006

_h_tw defined in line 38; used 1 times

- in line 37

equal defined in line 90; never used
is_set defined in line 92; used 5 times

- in /usr/src/bin/tcsh/tw.parse.c line 288, 725, 742, 882, 930

#### Usage of this include

tw.h used 10 times

- in /usr/src/bin/tcsh/ed.chared.c line 45
- in /usr/src/bin/tcsh/ed.inputl.c line 46
- in /usr/src/bin/tcsh/sh.exec.c line 44
- in /usr/src/bin/tcsh/sh.func.c line 46
- in /usr/src/bin/tcsh/sh.set.c line 45
- in /usr/src/bin/tcsh/tc.func.c line 46
- in /usr/src/bin/tcsh/tw.help.c line 47
- in /usr/src/bin/tcsh/tw.init.c line 44
- in /usr/src/bin/tcsh/tw.parse.c line 47
- in /usr/src/bin/tcsh/tw.spell.c line 44

Last modified: 1991-08-20 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 680 |