1: /*  C K U C M D . H  --  Header file for Unix cmd package  */
   2: 
   3: /*
   4:   Author: Frank da Cruz (fdc@columbia.edu, FDCCU@CUVMA.BITNET),
   5:   Columbia University Center for Computing Activities.
   6:   First released January 1985.
   7:   Copyright (C) 1985, 1992, Trustees of Columbia University in the City of New
   8:   York.  Permission is granted to any individual or institution to use this
   9:   software as long as it is not sold for profit.  This copyright notice must be
  10:   retained.  This software may not be included in commercial products without
  11:   written permission of Columbia University.
  12: */
  13: 
  14: #ifndef CKUCMD_H
  15: #define CKUCMD_H
  16: 
  17: /* Special getchars... */
  18: 
  19: #ifdef DYNAMIC              /* Dynamic command buffers */
  20: #define DCMDBUF
  21: /*
  22:   Use malloc() to allocate the many command-related buffers in ckucmd.c.
  23: */
  24: #endif /* DYNAMIC */
  25: 
  26: #ifdef VMS
  27: #define getchar()   vms_getchar()
  28: #endif /* VMS */
  29: 
  30: #ifdef aegis
  31: #undef getchar
  32: #define getchar()   coninc(0)
  33: #endif /* aegis */
  34: 
  35: #ifdef AMIGA
  36: #undef getchar
  37: #define getchar() coninc(0)
  38: #endif /* AMIGA */
  39: 
  40: /* Sizes of things */
  41: 
  42: #ifndef CMDDEP
  43: #define CMDDEP  20          /* Maximum command recursion depth */
  44: #endif /* CMDDEP */
  45: #define HLPLW   78          /* Width of ?-help line */
  46: #define HLPCW   19          /* Width of ?-help column */
  47: #define HLPBL  100          /* Help string buffer length */
  48: #define ATMBL  256          /* Command atom buffer length*/
  49: #ifdef NOSPL
  50: /* No script programming language, save some space */
  51: #define CMDBL 512           /* Command buffer length */
  52: #else
  53: #define CMDBL 1024          /* Command buffer length */
  54: #endif /* NOSPL */
  55: 
  56: /* Special characters */
  57: 
  58: #define RDIS 0022           /* Redisplay   (^R) */
  59: #define LDEL 0025           /* Delete line (^U) */
  60: #define WDEL 0027           /* Delete word (^W) */
  61: 
  62: /* Keyword table flags */
  63: 
  64: #define CM_INV 1            /* Invisible keyword */
  65: #define CM_ABR 2            /* Abbreviation */
  66: 
  67: /* Token flags */
  68: 
  69: #define CMT_COM 0           /* Comment (; or #) */
  70: #define CMT_SHE 1           /* Shell escape (!) */
  71: #define CMT_LBL 2           /* Label (:) */
  72: #define CMT_FIL 3           /* Indirect filespec (@) */
  73: 
  74: /* Keyword Table Template */
  75: 
  76: struct keytab {             /* Keyword table */
  77:     char *kwd;              /* Pointer to keyword string */
  78:     int kwval;              /* Associated value */
  79:     int flgs;               /* Flags (as defined above) */
  80: };
  81: 
  82: /* Function prototypes */
  83: 
  84: #ifdef CK_ANSIC             /* ANSI C */
  85: #ifdef M_SYSV               /* SCO Microsoft C wants no args */
  86: typedef int (*xx_strp)();
  87: #else
  88: typedef int (*xx_strp)(char *, char **, int *);
  89: #endif /* M_SYSV */
  90: #else                   /* Not ANSI C */
  91: typedef int (*xx_strp)();
  92: #endif /* CK_ANSIC */
  93: 
  94: _PROTOTYP( int xxesc, (char **) );
  95: _PROTOTYP( VOID cmsetp, (char *) );
  96: _PROTOTYP( VOID cmsavp, (char [], int) );
  97: _PROTOTYP( VOID prompt, (xx_strp) );
  98: _PROTOTYP( VOID pushcmd, (void) );
  99: _PROTOTYP( VOID cmres, (void) );
 100: _PROTOTYP( VOID cmini, (int) );
 101: _PROTOTYP( int cmpush, (void) );
 102: _PROTOTYP( int cmpop, (void) );
 103: _PROTOTYP( VOID untab, (char *) );
 104: _PROTOTYP( int cmnum, (char *, char *, int, int *, xx_strp ) );
 105: _PROTOTYP( int cmofi, (char *, char *, char **, xx_strp ) );
 106: _PROTOTYP( int cmifi, (char *, char *, char **, int *, xx_strp ) );
 107: _PROTOTYP( int cmdir, (char *, char *, char **, xx_strp ) );
 108: _PROTOTYP( int cmfld, (char *, char *, char **, xx_strp ) );
 109: _PROTOTYP( int cmtxt, (char *, char *, char **, xx_strp ) );
 110: _PROTOTYP( int cmkey, (struct keytab [], int, char *, char *, xx_strp) );
 111: _PROTOTYP( int cmkey2,(struct keytab [], int, char *, char *, char *,xx_strp));
 112: _PROTOTYP( int chktok, (char *) );
 113: _PROTOTYP( int cmcfm, (void) );
 114: _PROTOTYP( int rdigits, (char *) );
 115: _PROTOTYP( int chknum, (char *) );
 116: _PROTOTYP( int lower, (char *) );
 117: _PROTOTYP( int lookup, (struct keytab [], char *, int, int *) );
 118: _PROTOTYP( int ungword, (void) );
 119: 
 120: #ifdef DCMDBUF
 121: _PROTOTYP( int cmsetup, (void) );
 122: #endif /* DCMDBUF */
 123: 
 124: #endif /* CKUCMD_H */
 125: 
 126: /* End of ckucmd.h */

Defined struct's

keytab defined in line 76; used 304 times

Defined macros

ATMBL defined in line 48; used 6 times
CKUCMD_H defined in line 15; used 1 times
  • in line 14
CMDDEP defined in line 43; used 7 times
CMT_COM defined in line 69; never used
CMT_FIL defined in line 72; never used
CMT_LBL defined in line 71; never used
CMT_SHE defined in line 70; never used
HLPBL defined in line 47; used 2 times
HLPCW defined in line 46; used 1 times
HLPLW defined in line 45; used 1 times
LDEL defined in line 59; used 1 times
RDIS defined in line 58; used 1 times
WDEL defined in line 60; used 1 times
getchar defined in line 37; used 8 times

Usage of this include

Last modified: 1992-11-24
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1111
Valid CSS Valid XHTML 1.0 Strict