home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ckc190.zip / ckucmd.h < prev    next >
C/C++ Source or Header  |  1994-08-25  |  5KB  |  150 lines

  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 Academic Information Systems, New York City.
  6.  
  7.   Copyright (C) 1985, 1993, Trustees of Columbia University in the City of New
  8.   York.  The C-Kermit software may not be, in whole or in part, licensed or
  9.   sold for profit as a software product itself, nor may it be included in or
  10.   distributed with commercial products or otherwise distributed by commercial
  11.   concerns to their clients or customers without written permission of the
  12.   Office of Kermit Development and Distribution, Columbia University.  This
  13.   copyright notice must not be removed, altered, or obscured.
  14. */
  15.  
  16. #ifndef CKUCMD_H
  17. #define CKUCMD_H
  18.  
  19. /* Special getchars... */
  20.  
  21. #ifdef DYNAMIC                /* Dynamic command buffers */
  22. /*
  23.   Use malloc() to allocate the many command-related buffers in ckucmd.c.
  24. */
  25. #ifdef pdp11                /* Not enough room */
  26. #define NORECALL
  27. #endif /* pdp11 */
  28.  
  29. #ifndef NORECALL
  30. #define CK_RECALL
  31. #else
  32. #ifdef CK_RECALL
  33. #undef CK_RECALL
  34. #endif /* CK_RECALL */
  35. #endif /* NORECALL */
  36. #endif /* DYNAMIC */
  37.  
  38. #ifdef VMS
  39. #ifdef getchar                /* This is for VMS GCC */
  40. #undef getchar
  41. #endif /* getchar */
  42. #define getchar()   vms_getchar()
  43. #endif /* VMS */
  44.  
  45. #ifdef aegis
  46. #undef getchar
  47. #define getchar()   coninc(0)
  48. #endif /* aegis */
  49.  
  50. #ifdef AMIGA
  51. #undef getchar
  52. #define getchar() coninc(0)
  53. #endif /* AMIGA */
  54.  
  55. /* Sizes of things */
  56.  
  57. #ifndef CMDDEP
  58. #define CMDDEP  20            /* Maximum command recursion depth */
  59. #endif /* CMDDEP */
  60. #define HLPLW   78            /* Width of ?-help line */
  61. #define HLPCW   19            /* Width of ?-help column */
  62. #define HLPBL  100            /* Help string buffer length */
  63. #define ATMBL  256            /* Command atom buffer length*/
  64. #ifdef NOSPL
  65. /* No script programming language, save some space */
  66. #define CMDBL 512            /* Command buffer length */
  67. #else
  68. #define CMDBL 1024            /* Command buffer length */
  69. #endif /* NOSPL */
  70.  
  71. /* Special characters */
  72.  
  73. #define RDIS 0022            /* Redisplay   (^R) */
  74. #define LDEL 0025            /* Delete line (^U) */
  75. #define WDEL 0027            /* Delete word (^W) */
  76. #ifdef CK_RECALL
  77. #define C_UP 0020            /* Go Up in recall buffer (^P) */
  78. #define C_UP2 0002            /* Alternate Go Up (^B) for VMS */
  79. #define C_DN 0016            /* Go Down in recall buffer (^N) */
  80. #endif /* CK_RECALL */ 
  81. /* Keyword table flags */
  82.  
  83. #define CM_INV 1            /* Invisible keyword */
  84. #define CM_ABR 2            /* Abbreviation */
  85.  
  86. /* Token flags */
  87.  
  88. #define CMT_COM 0            /* Comment (; or #) */
  89. #define CMT_SHE 1            /* Shell escape (!) */
  90. #define CMT_LBL 2            /* Label (:) */
  91. #define CMT_FIL 3            /* Indirect filespec (@) */
  92.  
  93. /* Keyword Table Template */
  94.  
  95. struct keytab {                /* Keyword table */
  96.     char *kwd;                /* Pointer to keyword string */
  97.     int kwval;                /* Associated value */
  98.     int flgs;                /* Flags (as defined above) */
  99. };
  100.  
  101. /* Function prototypes */
  102.  
  103. #ifdef CK_ANSIC                /* ANSI C */
  104. #ifdef M_SYSV                /* SCO Microsoft C wants no args */
  105. typedef int (*xx_strp)();
  106. #else
  107. typedef int (*xx_strp)(char *, char **, int *);
  108. #endif /* M_SYSV */
  109. #else                    /* Not ANSI C */
  110. typedef int (*xx_strp)();
  111. #endif /* CK_ANSIC */
  112.  
  113. _PROTOTYP( int xxesc, (char **) );
  114. _PROTOTYP( int cmrini, (int) );
  115. _PROTOTYP( VOID cmsetp, (char *) );
  116. _PROTOTYP( VOID cmsavp, (char [], int) );
  117. _PROTOTYP( VOID prompt, (xx_strp) );
  118. _PROTOTYP( VOID pushcmd, (void) );
  119. _PROTOTYP( VOID cmres, (void) );
  120. _PROTOTYP( VOID cmini, (int) );
  121. _PROTOTYP( int cmpush, (void) );
  122. _PROTOTYP( int cmpop, (void) );
  123. _PROTOTYP( VOID untab, (char *) );
  124. _PROTOTYP( int cmnum, (char *, char *, int, int *, xx_strp ) );
  125. _PROTOTYP( int cmofi, (char *, char *, char **, xx_strp ) );
  126. _PROTOTYP( int cmifi, (char *, char *, char **, int *, xx_strp ) );
  127. _PROTOTYP( int cmifi2,(char *, char *, char **, int *, int, xx_strp ) );
  128. _PROTOTYP( int cmdir, (char *, char *, char **, xx_strp ) );
  129. _PROTOTYP( int cmfld, (char *, char *, char **, xx_strp ) );
  130. _PROTOTYP( int cmtxt, (char *, char *, char **, xx_strp ) );
  131. _PROTOTYP( int cmkey, (struct keytab [], int, char *, char *, xx_strp) );
  132. _PROTOTYP( int cmkey2,(struct keytab [], int, char *, char *, char *,xx_strp));
  133. _PROTOTYP( int chktok, (char *) );
  134. _PROTOTYP( int cmcfm, (void) );
  135. _PROTOTYP( int rdigits, (char *) );
  136. _PROTOTYP( int chknum, (char *) );
  137. _PROTOTYP( int lower, (char *) );
  138. _PROTOTYP( int lookup, (struct keytab [], char *, int, int *) );
  139. _PROTOTYP( int ungword, (void) );
  140. _PROTOTYP( int cmdsquo, (int) );
  141. _PROTOTYP( int cmdgquo, (void) );
  142.  
  143. #ifdef DCMDBUF
  144. _PROTOTYP( int cmsetup, (void) );
  145. #endif /* DCMDBUF */
  146.  
  147. #endif /* CKUCMD_H */
  148.  
  149. /* End of ckucmd.h */
  150.