imported 9.0.299 Beta.01
[ckermit.git] / ckuusr.h
index eecb78c..83891fb 100644 (file)
--- a/ckuusr.h
+++ b/ckuusr.h
@@ -4,7 +4,7 @@
   Author: Frank da Cruz <fdc@columbia.edu>,
   Columbia University Academic Information Systems, New York City.
 
-  Copyright (C) 1985, 2004,
+  Copyright (C) 1985, 2010,
     Trustees of Columbia University in the City of New York.
     All rights reserved.  See the C-Kermit COPYING.TXT file or the
     copyright text in the ckcmai.c module for disclaimer and permissions.
 #define LOCUS
 #endif /* NOLOCUS */
 
-/* Sizes of things */
+/* Sizes of things - FNVALL and MAXARGLEN increased from 8K 20050912 */
 
 #ifdef BIGBUFOK
-#define FNVALL 10238                   /* Function return value length */
-#define MAXARGLEN 8191                 /* Max func arg length after eval */
+#define FNVALL CMDBL                   /* Function return value length */
+#define MAXARGLEN CMDBL                        /* Max func arg length after eval */
 #define MAXARGLIST 1024                        /* Max number of args for a macro */
 #define FSPECL CMDBL                   /* Max length for MSEND/GET string */
 #define MSENDMAX 1024                  /* Number of filespecs for MSEND */
@@ -59,6 +59,7 @@
 #define MACLEVEL 128                   /* Maximum nesting for macros */
 #define INPBUFSIZ 4096                 /* Size of INPUT buffer */
 #define PROMPTL 1024                   /* Max length for prompt */
+#define LBLSIZ 8192                    /* Maximum length for a GOTO label */
 #else
 #define VNAML 256                      /* Max length for variable name */
 #define ARRAYREFLEN 128                        /* Max length for array reference */
 #define MACLEVEL 64                    /* Maximum nesting for macros */
 #define INPBUFSIZ 256
 #define PROMPTL 256                    /* Max length for prompt */
+#define LBLSIZ 128                     /* Maximum length for a GOTO label */
 #endif /* BIGBUFOK */
 #define NARGS 10                       /* Max number of macro arguments */
 #define LINBUFSIZ (CMDBL + 10)         /* Size of line[] buffer */
 #define TMPBUFSIZ (CMDBL + 10)         /* Size of temporary buffer */
-#define LBLSIZ 50                      /* Maximum length for a GOTO label */
+
 #define CMDSTKL ( MACLEVEL + MAXTAKE + 2) /* Command stack depth */
 
 #ifndef NOPURGE                                /* PURGE command */
@@ -133,6 +135,12 @@ struct stringlist {                        /* General purpose string list */
     struct stringlist * sl_next;
 };
 
+struct stringint {                     /* String and (wide) integer */
+    char * sval;                       /* used mainly with command switches */
+    int ival;
+    CK_OFF_T wval;
+};
+
 #ifndef NOICP
 /*
   C-Kermit Initialization file...
@@ -357,7 +365,9 @@ struct stringlist {                 /* General purpose string list */
 #define XA_WMIN  45
 #define XA_SCALE 46                     /* GUI Scale Font */
 #define XA_CHGD  47                     /* GUI Change Dimensions */
-#define XA_MAX  47                     /* Highest extended option number */
+#define XA_NOCLOSE 48                   /* GUI Disable Close Window */
+#define XA_UNBUF 49                    /* UNIX unbuffered console */
+#define XA_MAX  49                     /* Highest extended option number */
 #endif /* NOCMDL */
 
 #ifndef NOICP
@@ -415,6 +425,9 @@ struct stringlist {                 /* General purpose string list */
 #define DIR_LNK 38     /* follow symlinks */
 #define DIR_NLK 39     /* don't follow symlinks */
 #define DIR_OUT 40     /* Output file for listing */
+#define DIR_TOP 41     /* Top n lines */
+#define DIR_COU 42     /* COUNT:var */
+#define DIR_NOL 43     /* NOLINKS (don't show symlinks at at all) */
 
 #define DIRS_NM 0       /* Sort directory by NAME */
 #define DIRS_DT 1       /* Sort directory by DATE */
@@ -748,6 +761,12 @@ struct stringlist {                        /* General purpose string list */
 #define XXNSCR  261    /* NOSCROLL */
 #define XXSFTP  262    /* SFTP */
 #define XXSKRM  263    /* SKERMIT */
+#define XXWDIR  264    /* WDIRECTORY */
+#define XXHDIR  265    /* HDIRECTORY */
+#define XXTOUC  266    /* TOUCH */
+#define XXLOCU  267    /* LOCUS (for HELP) */
+#define XXPUTE  268     /* PUTENV */
+#define XXXMSG  269     /* XMESSAGE */
 
 /* End of Top-Level Commands */
 
@@ -833,6 +852,15 @@ struct stringlist {                        /* General purpose string list */
 #define DEL_LNK 25                     /* /FOLLOWLINKS */
 #define DEL_NLK 26                     /* /NOFOLLOWLINKS */
 
+/* RENAME switches that can be used in the same table as the DEL switches */
+
+#define REN_LOW 100                    /* Convert to lowercase */
+#define REN_UPP 101                    /* Converto to uppercase */
+#define REN_RPL 102                    /* String replacement */
+#define REN_OVW 103                    /* Overwrite file with same name */
+#define REN_XLA 104                    /* Translate character sets */
+#define REN_SPA 105                    /* Fix spaces */
+
 /* FILE operations */
 
 #define FIL_OPN  0                     /* OPEN */
@@ -1254,6 +1282,7 @@ struct stringlist {                       /* General purpose string list */
 #define   XYTITMO   62  /* SET TERM IDLE-TIMEOUT */
 #define   XYTIACT   63  /* SET TERM IDLE-ACTION  */
 #define   XYTLSP    64  /* SET TERM LINE-SPACING */
+#define   XYTLFD    65 /* SET TERM LF-DISPLAY   */
 
 #define XYATTR 34       /* Attribute packets  */
 #define XYSERV 35      /* Server parameters  */
@@ -1432,12 +1461,18 @@ struct stringlist {                     /* General purpose string list */
 #define XYX25  57       /* X.25 parameter (ANYX25) */
 #define XYPAD  58       /* X.3 PAD parameter (ANYX25) */
 #define XYWILD 59       /* Wildcard expansion method */
+
+#define WILD_OFF  0    /* Wildcard expansion off */
+#define WILD_ON   1    /* Wildcard expansion on  */
+#define WILD_KER  2    /* Wildcard expansion by Kermit */
+#define WILD_SHE  3    /* Wildcard expansion by Shell */
+
 #define XYSUSP 60       /* Suspend */
 #define XYMAIL 61      /* Mail-Command */
 #define XYPRIN 62      /* Print-Command */
 #define XYQUIE 63      /* Quiet */
 #define XYLCLE 64      /* Local-echo */
-#define XYSCRI 65      /* SCRIPT command paramaters */
+#define XYSCRI 65      /* SCRIPT command parameters */
 #define XYMSGS 66       /* MESSAGEs ON/OFF */
 #ifdef TNCODE
 #define XYTEL  67      /* SET TELNET parameters */
@@ -1585,6 +1620,7 @@ struct stringlist {                       /* General purpose string list */
 #define XYMSK  83       /* MS-DOS Kermit compatibility options */
 #define  MSK_COLOR 0    /*  Terminal color handling   */
 #define  MSK_KEYS  1    /*  SET KEY uses MSK keycodes */
+#define  MSK_REN   2    /*  File renaming uses 8.3 notation always */
 #endif /* OS2 */
 
 #define XYDEST  84     /* SET DESTINATION as in MS-DOS Kermit */
@@ -1710,6 +1746,9 @@ struct stringlist {                       /* General purpose string list */
 #define XYANSWER 131    /* SET ANSWER */
 #define XYMATCH  132    /* SET MATCHDOT */
 #define XYSFTP   133    /* SET SFTP */
+#define XY_REN   134    /* SET RENAME */
+#define XYEXTRN  135    /* SET EXTERNAL-PROTOCOL */
+#define XYVAREV  136    /* SET VARIABLE-EVALUATION */
 
 /* End of SET commands */
 
@@ -1957,7 +1996,8 @@ struct stringlist {                       /* General purpose string list */
 #define SHSEXP    68                   /* SHOW SEXPRESSIONS */
 #define SHOSSH    69                   /* SHOW SSH */
 #define SHOIKS    70                    /* SHOW IKS */
-#define SHOGUI    71                   /* SHOW RGB */
+#define SHOGUI    71                   /* SHOW GUI (K95) */
+#define SHOREN    72                   /* SHOW RENAME */
 
 /* REMOTE command symbols */
 
@@ -2350,6 +2390,14 @@ struct stringlist {                      /* General purpose string list */
 #define VN_LOG_CON  245                 /* Connection Log Filename */
 
 #define VN_ISCALE   246                        /* INPUT scale factor */
+#define VN_BITS     247                        /* Bits of this build (16, 32, 64) */
+#define VN_LASTFIL  248                        /* Last input filespec */
+#define VN_LASTKWV  249                        /* Last \fkeywordvalue() keyword */
+#define VN_DMSG     250                        /* Msg corresponding to dialstatus */
+#define VN_HOSTIP   251                        /* IP address of remote host */
+#define VN_INPMSG   252                        /* Msg corresponding to instatus */
+#define VN_VAREVAL  253                        /* SET VARIABLE-EVALUATION setting */
+#define VN_PREVCMD  254                        /* Previous command */
 #endif /* NOSPL */
 
 /* INPUT status values */
@@ -2360,6 +2408,14 @@ struct stringlist {                      /* General purpose string list */
 #define INP_IE  3                      /* Internal error */
 #define INP_IO  4                      /* I/O error or connection lost */
 #define INP_IKS 5                       /* Kermit Server Active */
+#define INP_BF  6                      /* Buffer full */
+
+/* INPUT switch values */
+
+#define INPSW_NOM 1                    /* /NOMATCH */
+#define INPSW_CLR 2                    /* /CLEAR */
+#define INPSW_NOW 4                    /* /NOWRAP */
+#define INPSW_COU 8                    /* /COUNT */
 
 #ifndef NOSPL
 /* Symbols for builtin functions */
@@ -2530,6 +2586,17 @@ struct stringlist {                      /* General purpose string list */
 #define FN_LNAME   154                 /* \fLongPathName() (Windows) */
 #define FN_SNAME   155                 /* \fShortPathName() (Windows) */
 #define FN_UNTAB   156                 /* \funtabify() */
+#define FN_LOPX    157                 /* \flopx() */
+#define FN_EMAIL   158                 /* \femailaddress() */
+#define FN_PICTURE 159                 /* \fpictureinfo() */
+#define FN_PID     160                 /* \fpidinfo() */
+#define FN_COUNT   161                 /* \fcount() */
+#define FN_FUNC    162                 /* \ffunction() */
+#define FN_RECURSE 163                 /* \frecurse() */
+#define FN_SQUEEZE 164                 /* \fsqueeze() */
+#define FN_UNPCT   165                 /* \fdecodehex() */
+#define FN_STRINGT 166                 /* \fstringtype() */
+#define FN_STRCMP  167                 /* \fstrcmp() */
 
 #endif /* NOSPL */
 
@@ -2682,6 +2749,12 @@ struct stringlist {                      /* General purpose string list */
 
 /* ANSI-C prototypes for user interface functions */
 
+#ifdef UNIX
+_PROTOTYP( int doputenv, ( char *, char * ) );
+#endif /* UNIX */
+
+_PROTOTYP( int chkaes, ( char, int ) );
+
 #ifndef NOICP
 _PROTOTYP( int matchname, ( char *, int, int ) );
 _PROTOTYP( int ck_cls, ( void ) );
@@ -2702,6 +2775,7 @@ _PROTOTYP( char * nvlook, (char *) );
 _PROTOTYP( int xarray, (char *) );
 _PROTOTYP( int arraynam, (char *, int *, int *) );
 _PROTOTYP( int arraybounds, (char *, int *, int *) );
+_PROTOTYP( int boundspair, (char *, char *, int *, int *, char *) );
 _PROTOTYP( int arrayitoa, (int) );
 _PROTOTYP( int arrayatoi, (int) );
 _PROTOTYP( char * bldlen, (char *, char *) );
@@ -2725,9 +2799,10 @@ _PROTOTYP( int doenable, (int, int) );
 _PROTOTYP( int dogoto, (char *, int) );
 _PROTOTYP( int dogta, (int) );
 _PROTOTYP( int dohlp, (int) );
+_PROTOTYP (int doincr, (int) );
 _PROTOTYP( int dohrmt, (int) );
 _PROTOTYP( int doif, (int) );
-_PROTOTYP( int doinput, (int, char *[], int[], int) );
+_PROTOTYP( int doinput, (int, char *[], int[], int, int) );
 _PROTOTYP( int doreinp, (int, char *, int) );
 _PROTOTYP( int dolog, (int) );
 _PROTOTYP( int dologin, (char *) );
@@ -2743,7 +2818,7 @@ _PROTOTYP( int dotype, (char *, int, int, int, char *, int, char *, int, int,
 _PROTOTYP( int transmit, (char *, char, int, int, int) );
 _PROTOTYP( int xlate, (char *, char *, int, int) );
 _PROTOTYP( int litcmd, (char **, char **, int) );
-_PROTOTYP( int incvar, (char *, int, int) );
+_PROTOTYP( int incvar, (char *, CK_OFF_T, int) );
 _PROTOTYP( int ckdial, (char *, int, int, int, int) );
 _PROTOTYP( int hmsg, (char *) );
 _PROTOTYP( int hmsga, (char * []) );
@@ -2768,7 +2843,7 @@ _PROTOTYP( int debopn, (char *,int) );
 _PROTOTYP( int diaopn, (char *,int,int) );
 _PROTOTYP( int prepop, (void) );
 _PROTOTYP( int popclvl, (void) );
-_PROTOTYP( int varval, (char *, int *) );
+_PROTOTYP( int varval, (char *, CK_OFF_T *) );
 _PROTOTYP( char * evala, (char *) );
 _PROTOTYP( char * evalx, (char *) );
 _PROTOTYP( int setalarm, (long) );