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
ESC defined in line 89; never used
FALSE defined in line 84; used 14 times
FILSIZ defined in line 88; used 20 times
FREE_DIR defined in line 70; used 3 times
FREE_ITEMS defined in line 62; used 2 times
ITEMS_INCR defined in line 115; used 2 times
ITEMS_START defined in line 114; used 2 times
NUMCMDS_INCR defined in line 113; used 4 times
NUMCMDS_START defined in line 112; used 2 times
OFF defined in line 87; never used
ON defined in line 86; never used
SEARCHLIST defined in line 95; used 1 times
TRUE defined in line 81; used 6 times
_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

Usage of this include

Last modified: 1991-08-20
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 657
Valid CSS Valid XHTML 1.0 Strict