📄 ckuusr.h
字号:
/* C K U U S R . H -- Symbol definitions for C-Kermit ckuus*.c modules *//* Author: Frank da Cruz <fdc@columbia.edu>, Columbia University Academic Information Systems, New York City. Copyright (C) 1985, 2000, 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.*/#ifndef CKUUSR_H#define CKUUSR_H#include "ckucmd.h" /* Get symbols from command package *//* Sizes of things */#ifdef BIGBUFOK#define FNVALL 10238 /* Function return value length */#define MAXARGLEN 8191 /* 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 */#define MAC_MAX 16384 /* Maximum number of macros */#else /* Same as above but for smaller builds... */#define FNVALL 1022#define MAXARGLEN 1023#define MAXARGLIST 64#define FSPECL 300#define MSENDMAX 128#define MAC_MAX 1024#endif /* BIGBUFOK */#define GVARS 126 /* Highest global var allowed */#ifdef BIGBUFOK#define VNAML 4096 /* Max length for variable name */#define ARRAYREFLEN 1024 /* Max length for array reference */#define FORDEPTH 32 /* Maximum depth of nested FOR loops */#define MAXTAKE 54 /* Maximum nesting of TAKE files */#define MACLEVEL 128 /* Maximum nesting for macros */#define INPBUFSIZ 4096 /* Size of INPUT buffer */#define PROMPTL 1024 /* Max length for prompt */#else#define VNAML 256 /* Max length for variable name */#define ARRAYREFLEN 128 /* Max length for array reference */#define FORDEPTH 10 /* Maximum depth of nested FOR loops */#define MAXTAKE 32 /* Maximum nesting of TAKE files */#define MACLEVEL 64 /* Maximum nesting for macros */#define INPBUFSIZ 256#define PROMPTL 256 /* Max length for prompt */#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 */#ifdef UNIX#define CKPURGE#endif /* UNIX */#endif /* NOPURGE */#ifndef NOMINPUT /* MINPUT command */#ifndef NOSPL#define CK_MINPUT#ifndef MINPMAX#ifdef BIGBUFOK#define MINPMAX 96 /* Max number of MINPUT strings */#else#define MINPMAX 16#endif /* BIGBUFOK */#endif /* MINPMAX */#define MINPBUFL 256 /* Size of MINPUT temp buffer */#endif /* NOSPL */#endif /* NOMINPUT */#ifdef CK_SMALL#define PWBUFL 63#else#define PWBUFL 255#endif /* CK_SMALL */#define ARRAYBASE 95 /* Lowest array-name character */#ifndef NOKERBANG#ifndef KERBANG#define KERBANG#endif /* KERBANG */#endif /* NOKERBANG *//* Bit values (1, 2, 4, 8, ...) for the ccflgs field */#define CF_APC 1 /* Executing an APC command */#define CF_KMAC 2 /* Executing a \Kmacro */#define CF_CMDL 4 /* Macro from -C "blah" command line */#define CF_REXX 8 /* Macro from REXX interpreter */#define CF_IMAC 16 /* Internal macro like FOR, WHILE... */struct cmdptr { /* Command stack structure */ int src; /* Command Source */ int lvl; /* Current TAKE or DO level */ int ccflgs; /* Flags */};struct mtab { /* Macro table, like keyword table */ char *kwd; /* But with pointers for vals */ char *mval; /* instead of ints. */ short flgs;};struct localvar { /* Local variable structure. */ char * lv_name; char * lv_value; struct localvar * lv_next;};struct stringlist { /* General purpose string list */ char * sl_name; struct stringlist * sl_next;};#ifndef NOICP/* C-Kermit Initialization file... System-dependent defaults are built into the program, see below. These can be overridden in either of two ways: 1. CK_DSYSINI is defined at compile time, in which case a default system-wide initialization file name is chosen from below, or: 2: CK_SYSINI is defined to be a string, which lets the program builder choose the initialization filespec at compile time. These can be given on the CC command line, so the source code need not be changed.*/#ifndef CK_SYSINI /* If no initialization file given, */#ifdef CK_DSYSINI /* but CK_DSYSINI is defined... *//* Supply system-dependent "default default" initialization file */#ifdef UNIX /* For UNIX, system-wide *//* This allows one copy of the standard init file on the whole system, *//* rather than a separate copy in each user's home directory. */#ifdef HPUX10#define CK_SYSINI "/usr/share/lib/kermit/ckermit.ini"#else#ifdef CU_ACIS#define CK_SYSINI "/usr/share/lib/kermit/ckermit.ini"#else#ifdef __linux__#define CK_SYSINI "/usr/share/kermit/ckermit.ini"#else#define CK_SYSINI "/usr/local/bin/ckermit.ini"#endif /* linux */#endif /* CU_ACIS */#endif /* HPUX10 *//* Fill in #else..#ifdef's here for VMS, OS/2, etc. *//* Fill in matching #endif's here. */#endif /* UNIX */#endif /* CK_DSYSINI */#endif /* CK_SYSINI */#ifdef CK_SYSINI /* Init-file precedence */#ifndef CK_INI_A /* A means system-wide file first */#ifndef CK_INI_B /* B means user's first */#define CK_INI_A /* A is default */#endif /* CK_INI_B */#endif /* CK_INI_A */#else#ifdef CK_INI_A /* Otherwise */#undef CK_INI_A /* make sure these aren't defined */#endif /* CK_INI_A */#ifdef CK_INI_B#undef CK_INI_B#endif /* CK_INI_B */#endif /* CK_SYSINI */#ifdef CK_SYSINI /* One more check... */#ifdef CK_INI_A /* Make sure they're not both */#ifdef CK_INI_B /* defined. */#undef CK_INI_B#endif /* CK_INI_B */#endif /* CK_INI_A */#endif /* CK_SYSINI *//* If neither CK_DSYSINI nor CK_SYSINI are defined, these are the built-in defaults for each system:*/#ifdef vms#define KERMRC "CKERMIT.INI"#define KERMRCL 256#else#ifdef OS2#ifdef NT#define KERMRC "k95.ini"#else#define KERMRC "k2.ini"#endif /* NT */#define KERMRCL 256#else#ifdef UNIX#define KERMRC ".kermrc"#define KERMRCL 256#else#ifdef OSK#define KERMRC ".kermrc"#define KERMRCL 256#else#ifdef STRATUS#define KERMRC "ckermit.ini"#define KERMRCL 256#else#define KERMRC "CKERMIT.INI"#define KERMRCL 256#endif /* STRATUS */#endif /* OSK */#endif /* UNIX */#endif /* OS2 */#endif /* vms */#ifndef KERMRCL#define KERMRCL 256#endif /* KERMRCL */#endif /* NOICP *//* User interface features */#ifdef CK_CURSES /* Thermometer */#ifndef NO_PCT_BAR#ifndef CK_PCT_BAR#define CK_PCT_BAR#endif /* NO_PCT_BAR */#endif /* CK_PCT_BAR */#endif /* CK_CURSES */#ifdef KUI /* KUI requires the Thermometer code */#ifndef NO_PCT_BAR#ifndef CK_PCT_BAR#define CK_PCT_BAR#endif /* NO_PCT_BAR */#endif /* CK_PCT_BAR */#endif /* KUI *//* Includes */#ifdef MINIX/* why? */#include <sys/types.h>#endif /* MINIX *//* Symbols for command source */#define CMD_KB 0 /* KeyBoard or standard input */#define CMD_TF 1 /* TAKE command File */#define CMD_MD 2 /* Macro Definition *//* SET TRANSFER CANCELLATION command should be available in all versions. But for now...*/#ifdef UNIX /* UNIX has it */#ifndef XFRCAN#define XFRCAN#endif /* XFRCAN */#endif /* UNIX */#ifdef VMS /* VMS has it */#ifndef XFRCAN#define XFRCAN#endif /* XFRCAN */#endif /* VMS */#ifdef datageneral /* DG AOS/VS has it */#ifndef XFRCAN#define XFRCAN#endif /* XFRCAN */#endif /* datageneral */#ifdef STRATUS /* Stratus VOS has it */#ifndef XFRCAN#define XFRCAN#endif /* XFRCAN */#endif /* STRATUS */#ifdef OSK /* OS-9 */#ifndef XFRCAN#define XFRCAN#endif /* XFRCAN */#endif /* OSK */#ifndef NOCMDL/* Extended Command-Line Option Codes (keep alphabetical by keyword) */#define XA_ANON 0 /* --anonymous */#define XA_BAFI 1 /* --bannerfile */#define XA_CDFI 2 /* --cdfile */#define XA_CDMS 3 /* --cdmessage */#define XA_HELP 4 /* --help */#define XA_HEFI 5 /* --helpfile */#define XA_IKFI 6 /* --xferfile */#define XA_IKLG 7 /* --xferlog */#define XA_ANFI 8 /* --initfile */#define XA_PERM 9 /* --permissions */#define XA_ROOT 10 /* --root */#define XA_SYSL 11 /* --syslog */#define XA_USFI 12 /* --userfile */#define XA_WTFI 13 /* --wtmpfile */#define XA_WTMP 14 /* --wtmplog */#define XA_TIMO 15 /* --timeout */#define XA_NOIN 16 /* --nointerrupts */#define XA_DBAS 17 /* --database */#define XA_DBFI 18 /* --dbfile */#define XA_PRIV 19 /* --privid */#define XA_MAX 19 /* Highest extended option number */#endif /* NOCMDL */#ifndef NOICP/* Top Level Commands *//* Values associated with top-level commands must be 0 or greater. */#define XXBYE 0 /* BYE */#define XXCLE 1 /* CLEAR */#define XXCLO 2 /* CLOSE */#define XXCON 3 /* CONNECT *//* CONNECT Switches */#define CONN_II 0 /* Idle interval */#define CONN_IS 1 /* Idle string */#define CONN_IL 2 /* Idle limit */#define CONN_NV 3 /* Non-Verbose */#define CONN_TL 4 /* Time limit */#define CONN_TS 5 /* Trigger string */#define CONN_MAX 5 /* Number of CONNECT switches */#define XXCPY 4 /* COPY */#define XXCWD 5 /* CWD (Change Working Directory) */#define XXDEF 6 /* DEFINE (a macro or variable) */#define XXDEL 7 /* (Local) DELETE */#define XXDIR 8 /* (Local) DIRECTORY *//* DIRECTORY Command options... */#define DIR_BRF 1 /* BRIEF */#define DIR_VRB 2 /* VERBOSE */#define DIR_PAG 3 /* PAGE */#define DIR_NOP 4 /* NOPAGE */#define DIR_ISO 5 /* ISODATE */#define DIR_DAT 6 /* ENGLISHDATE */#define DIR_HDG 7 /* HEADINGS */#define DIR_NOH 8 /* NOHEADINGS */#define DIR_SRT 9 /* SORT */#define DIR_NOS 10 /* NOSORT */#define DIR_ASC 11 /* ASCENDING */#define DIR_DSC 12 /* DESCENDING */#define DIR_REC 13 /* RECURSIVE */#define DIR_NOR 14 /* NORECURIVE */#define DIR_DOT 15 /* DOTFILES */#define DIR_NOD 16 /* NODOTFILES */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -