📄 ckcdeb.h
字号:
/* C K C D E B . H *//* Tue Apr 6 14:00:16 2004 NOTE TO CONTRIBUTORS: This file, and all the other C-Kermit files, must be compatible with C preprocessors that support only #ifdef, #else, #endif, #define, and #undef. Please do not use #if, logical operators, or other later-model preprocessor features in any of the portable C-Kermit modules. You can, of course, use these constructions in platform-specific modules when you know they are supported.*//* This file is included by all C-Kermit modules, including the modules that aren't specific to Kermit (like the command parser and the ck?tio and ck?fio modules). It should be included BEFORE any other C-Kermit header files. It specifies format codes for debug(), tlog(), and similar functions, and includes any necessary definitions to be used by all C-Kermit modules, and also includes some feature selection compile-time switches, and also system- or compiler-dependent definitions, plus #includes and prototypes required by all C-Kermit modules.*//* Author: Frank da Cruz <fdc@columbia.edu>, Columbia University Academic Information Systems, New York City. Copyright (C) 1985, 2004, 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.*//* Etymology: The name of this file means "C-Kermit Common-C-Language Debugging Header", because originally it contained only the formats (F000-F111) for the debug() and tlog() functions. Since then it has grown to inlcude all material required by all other C-Kermit modules, including the non-Kermit specific ones.*/#ifndef CKCDEB_H /* Don't include me more than once. */#define CKCDEB_H#ifdef OS2#include "ckoker.h"#else /* OS2 *//* Unsigned numbers */#ifndef USHORT#define USHORT unsigned short#endif /* USHORT */#ifndef UINT#define UINT unsigned int#endif /* UINT */#ifndef ULONG#define ULONG unsigned long#endif /* ULONG */#endif /* OS2 *//* Structure definitions for Kermit file attributes *//* All strings come as pointer and length combinations *//* Empty string (or for numeric variables, -1) = unused attribute. */struct zstr { /* string format */ int len; /* length */ char *val; /* value */};struct zattr { /* Kermit File Attribute structure */ long lengthk; /* (!) file length in K */ struct zstr type; /* (") file type (text or binary) */ struct zstr date; /* (#) file creation date yyyymmdd[ hh:mm[:ss]] */ struct zstr creator; /* ($) file creator id */ struct zstr account; /* (%) file account */ struct zstr area; /* (&) area (e.g. directory) for file */ struct zstr password; /* (') password for area */ long blksize; /* (() file blocksize */ struct zstr xaccess; /* ()) file access: new, supersede, append, warn */ struct zstr encoding; /* (*) encoding (transfer syntax) */ struct zstr disp; /* (+) disposition (mail, message, print, etc) */ struct zstr lprotect; /* (,) protection (local syntax) */ struct zstr gprotect; /* (-) protection (generic syntax) */ struct zstr systemid; /* (.) ID for system of origin */ struct zstr recfm; /* (/) record format */ struct zstr sysparam; /* (0) system-dependent parameter string */ long length; /* (1) exact length on system of origin */ struct zstr charset; /* (2) transfer syntax character set */#ifdef OS2 struct zstr longname; /* OS/2 longname if applicable */#endif /* OS2 */ struct zstr reply; /* This goes last, used for attribute reply */};/* Kermit file information structure */struct filinfo { int bs; /* Blocksize */ int cs; /* Character set */ long rl; /* Record length */ int org; /* Organization */ int fmt; /* Record format */ int cc; /* Carriage control */ int typ; /* Type (text/binary) */ int dsp; /* Disposition */ char *os_specific; /* OS-specific attributes */#ifdef OS2 unsigned long int lblopts; /* LABELED FILE options bitmask */#else int lblopts;#endif /* OS2 */};#ifdef MACOSX10 /* Mac OS X 1.0 */#ifndef MACOSX /* implies Mac OS X */#define MACOSX#endif /* MACOSX */#endif /* MACOSX10 */#ifdef MACOSX /* Mac OS X */#ifndef BSD44 /* implies 4.4 BSD */#define BSD44#endif /* BSD44 */#endif /* MACOSX */#ifdef SCO_OSR505 /* SCO 3.2v5.0.5 */#ifndef SCO_OSR504 /* implies SCO 3.2v5.0.4 */#define SCO_OSR504#endif /* SCO_OSR504 */#endif /* SCO_OSR505 */#ifdef SCO_OSR504 /* SCO 3.2v5.0.4 */#ifndef CK_SCOV5 /* implies SCO 3.2v5.0 */#define CK_SCOV5#endif /* CK_SCOV5 */#include <sys/types.h> /* To sidestep header-file mess */#endif /* SCO_OSR504 */#ifdef CK_SCOV5#ifndef ANYSCO#define ANYSCO#endif /* ANYSCO */#endif /* CK_SCOV5 */#ifdef UNIXWARE#ifndef ANYSCO#define ANYSCO#endif /* ANYSCO */#endif /* UNIXWARE */#ifdef CK_SCO32V4 /* SCO 3.2v4 */#ifndef ANYSCO#define ANYSCO#endif /* ANYSCO */#ifndef XENIX#define XENIX#endif /* XENIX */#ifndef SVR3#define SVR3#endif /* SVR3 */#ifndef DIRENT#define DIRENT#endif /* DIRENT */#ifndef RENAME#define RENAME#endif /* RENAME */#ifndef SVR3JC#define SVR3JC#endif /* SVR3JC */#ifndef CK_RTSCTS#define CK_RTSCTS#endif /* CK_RTSCTS */#ifndef PID_T#define PID_T pid_t#endif /* PID_T */#ifndef PWID_T#define PWID_T int#endif /* PWID_T */#endif /* CK_SCO32V4 */#ifdef NOICP /* If no command parser */#ifndef NOSPL /* Then no script language either */#define NOSPL#endif /* NOSPL */#ifndef NOCSETS /* Or characer sets */#define NOCSETS#endif /* NOCSETS */#ifndef NOFTP /* Or FTP client */#define NOFTP#endif /* NOFTP */#endif /* NOICP *//* Built-in makefile entries */#ifdef SOLARIS9 /* Solaris 9 implies 8 */#ifndef SOLARIS8#define SOLARIS8#endif /* SOLARIS8 */#endif /* SOLARIS9 */#ifdef SOLARIS8 /* Solaris 8 implies 7 */#ifndef SOLARIS7#define SOLARIS7#endif /* SOLARIS7 */#endif /* SOLARIS8 */#ifdef SOLARIS7 /* Solaris 7 implies 2.6 */#ifndef SOLARIS26#define SOLARIS26#endif /* SOLARIS26 */#endif /* SOLARIS7 */#ifdef SOLARIS26 /* Solaris 2.6 implies 2.5 */#ifndef SOLARIS25#define SOLARIS25#endif /* SOLARIS25 */#endif /* SOLARIS26 */#ifdef SOLARIS25 /* Solaris 2.5 implies Solaris */#ifndef SOLARIS#define SOLARIS#endif /* SOLARIS */#ifndef POSIX /* And POSIX */#define POSIX#endif /* POSIX */#ifndef CK_WREFRESH /* And this (curses) */#define CK_WREFRESH#endif /* CK_WREFRESH */#endif /* SOLARIS25 */#ifdef SOLARIS24 /* Solaris 2.4 implies Solaris */#ifndef SOLARIS#define SOLARIS#endif /* SOLARIS */#endif /* SOLARIS24 */#ifdef SOLARIS /* Solaris gets "POSIX" RTS/CTS API */#ifdef POSIX#ifndef POSIX_CRTSCTS#define POSIX_CRTSCTS#endif /* POSIX_CRTSCTS */#endif /* POSIX */#endif /* SOLARIS */#ifdef SUN4S5 /* Sun-4 System V environment */#ifndef SVR3 /* implies System V R3 or later */#define SVR3#endif /* SVR3 */#endif /* SUN4S5 */#ifdef SUNOS41 /* SUNOS41 implies SUNOS4 */#ifndef SUNOS4#define SUNOS4#endif /* SUNOS4 */#endif /* SUNOS41 */#ifdef SUN4S5 /* Sun-4 System V environment */#ifndef SVR3 /* implies System V R3 or later */#define SVR3#endif /* SVR3 */#endif /* SUN4S5 */#ifdef SUNOS41 /* SUNOS41 implies SUNOS4 */#ifndef SUNOS4#define SUNOS4#endif /* SUNOS4 */#endif /* SUNOS41 */#ifdef SUNOS4 /* Built-in SUNOS4 makefile entry */#ifndef UNIX#define UNIX#endif /* UNIX */#ifndef BSD4#define BSD4#endif /* BSD4 */#ifndef NOSETBUF#define NOSETBUF#endif /* NOSETBUF */#ifndef DIRENT#define DIRENT#endif /* DIRENT */#ifndef NONET#ifndef TCPSOCKET#define TCPSOCKET#endif /* TCPSOCKET */#endif /* NONET */#ifndef SAVEDUID#define SAVEDUID#endif /* SAVEDUID */#ifndef DYNAMIC#define DYNAMIC#endif /* DYNAMIC */#endif /* SUNOS4 */#ifdef SOLARIS /* Built in makefile entry */#ifndef NOSETBUF /* for Solaris 2.x */#define NOSETBUF#endif /* NOSETBUF */#ifndef NOCURSES#ifndef CK_CURSES#define CK_CURSES#endif /* CK_CURSES */#endif /* NOCURSES */#ifndef CK_NEWTERM#define CK_NEWTERM#endif /* CK_NEWTERM */#ifndef DIRENT#define DIRENT#endif /* DIRENT */#ifndef NONET#ifndef TCPSOCKET#define TCPSOCKET#endif /* TCPSOCKET */#endif /* NONET */#ifndef UNIX#define UNIX#endif /* UNIX */#ifndef SVR4#define SVR4#endif /* SVR4 */#ifndef HADDRLIST#define HADDRLIST#endif /* HADDRLIST */#ifndef STERMIOX#define STERMIOX#endif /* STERMIOX */#ifndef SELECT#define SELECT#endif /* SELECT */#ifndef DYNAMIC#define DYNAMIC#endif /* DYNAMIC */#ifndef NOUUCP#ifndef HDBUUCP#define HDBUUCP#endif /* HDBUUCP */#endif /* NOUUCP */#endif /* SOLARIS *//* Features that can be eliminated from a no-file-transfer version */#ifdef NOXFER#ifndef NOFTP#define NOFTP#endif /* NOFTP */#ifndef OS2#ifndef NOCURSES /* Fullscreen file-transfer display */#define NOCURSES#endif /* NOCURSES */#endif /* OS2 */#ifndef NOCKXYZ /* XYZMODEM support */#define NOCKXYZ#endif /* NOCKXYZ */#ifndef NOCKSPEED /* Ctrl-char unprefixing */#define NOCKSPEED#endif /* NOCKSPEED */#ifndef NOSERVER /* Server mode */#define NOSERVER#endif /* NOSERVER */#ifndef NOCKTIMERS /* Dynamic packet timers */#define NOCKTIMERS#endif /* NOCKTIMERS */#ifndef NOPATTERNS /* File-type patterns */#define NOPATTERNS#endif /* NOPATTERNS */#ifndef NOSTREAMING /* Streaming */#define NOSTREAMING#endif /* NOSTREAMING */#ifndef NOIKSD /* Internet Kermit Service */#define NOIKSD#endif /* NOIKSD */#ifndef NOPIPESEND /* Sending from pipes */#define NOPIPESEND#endif /* NOPIPESEND */#ifndef NOAUTODL /* Autodownload */#define NOAUTODL#endif /* NOAUTODL */#ifndef NOMSEND /* MSEND */#define NOMSEND#endif /* NOMSEND */#ifndef NOTLOG /* Transaction logging */#define NOTLOG#endif /* NOTLOG */#ifndef NOCKXXCHAR /* Packet character doubling */#define NOCKXXCHAR#endif /* NOCKXXCHAR */#endif /* NOXFER */#ifdef NOICP /* No Interactive Command Parser */#ifndef NODIAL /* Implies No DIAL command */#define NODIAL#endif /* NODIAL */#ifndef NOCKXYZ /* and no external protocols */#define NOCKXYZ#endif /* NOCKXYZ */#endif /* NOICP */#ifndef NOIKSD#ifdef IKSDONLY#ifndef IKSD#define IKSD#endif /* IKSD */#ifndef NOLOCAL#define NOLOCAL#endif /* NOLOCAL */#ifndef NOPUSH#define NOPUSH#endif /* NOPUSH */#ifndef TNCODE#define TNCODE#endif /* TNCODE */#ifndef TCPSOCKET#define TCPSOCKET#endif /* TCPSOCKET */#ifndef NETCONN#define NETCONN#endif /* NETCONN */#ifdef SUNX25#undef SUNX25#endif /* SUNX25 */#ifdef IBMX25#undef IBMX25#endif /* IBMX25 */#ifdef STRATUSX25#undef STRATUSX25#endif /* STRATUSX25 */#ifdef CK_NETBIOS#undef CK_NETBIOS#endif /* CK_NETBIOS */#ifdef SUPERLAT#undef SUPERLAT#endif /* SUPERLAT */#ifdef NPIPE#undef NPIPE#endif /* NPIPE */#ifdef NETFILE#undef NETFILE#endif /* NETFILE */#ifdef NETCMD#undef NETCMD#endif /* NETCMD */#ifdef NETPTY#undef NETPTY#endif /* NETPTY */#ifdef RLOGCODE#undef RLOGCODE#endif /* RLOGCODE */#ifdef NETDLL#undef NETDLL#endif /* NETDLL */#ifndef NOSSH#undef NOSSH#endif /* NOSSH */#ifndef NOFORWARDX#define NOFORWARDX#endif /* NOFORWARDX */#ifndef NOBROWSER#define NOBROWSER#endif /* NOBROWSER */#ifndef NOHTTP#define NOHTTP#endif /* NOHTTP */#ifndef NOFTP#define NOFTP#endif /* NOFTP */#ifndef NO_COMPORT#define NO_COMPORT#endif /* NO_COMPORT */#endif /* IKSDONLY */#endif /* NOIKSD *//* Features that can be eliminated from a remote-only version */#ifdef NOLOCAL#ifndef NOFTP#define NOFTP#endif /* NOFTP */#ifndef NOHTTP#define NOHTTP#endif /* NOHTTP */#ifndef NOSSH#define NOSSH#endif /* NOSSH */#ifndef NOTERM#define NOTERM#endif /* NOTERM */#ifndef NOCURSES /* Fullscreen file-transfer display */#define NOCURSES#endif /* NOCURSES */#ifndef NODIAL#define NODIAL#endif /* NODIAL */#ifndef NOSCRIPT#define NOSCRIPT#endif /* NOSCRIPT */#ifndef NOSETKEY#define NOSETKEY#endif /* NOSETKEY */#ifndef NOKVERBS#define NOKVERBS#endif /* NOKVERBS */#ifndef NOXMIT#define NOXMIT#endif /* NOXMIT */#ifdef CK_CURSES#undef CK_CURSES#endif /* CK_CURSES */#ifndef IKSDONLY#ifndef NOAPC#define NOAPC#endif /* NOAPC */#ifndef NONET#define NONET#endif /* NONET */#endif /* IKSDONLY */#endif /* NOLOCAL */#ifdef NONET#ifdef NETCONN#undef NETCONN#endif /* NETCONN */#ifdef TCPSOCKET#undef TCPSOCKET#endif /* TCPSOCKET */#ifndef NOTCPOPTS#define NOTCPOPTS#endif /* NOTCPOPTS */#ifdef SUNX25#undef SUNX25#endif /* SUNX25 */#ifdef IBMX25#undef IBMX25#endif /* IBMX25 */#ifdef STRATUSX25#undef STRATUSX25#endif /* STRATUSX25 */#ifdef CK_NETBIOS#undef CK_NETBIOS#endif /* CK_NETBIOS */#ifdef SUPERLAT#undef SUPERLAT#endif /* SUPERLAT */#ifdef NPIPE#undef NPIPE#endif /* NPIPE */#ifdef NETFILE#undef NETFILE#endif /* NETFILE */#ifdef NETCMD#undef NETCMD#endif /* NETCMD */#ifdef NETPTY#undef NETPTY#endif /* NETPTY */#ifdef RLOGCODE#undef RLOGCODE#endif /* RLOGCODE */#ifdef NETDLL#undef NETDLL#endif /* NETDLL */#ifndef NOSSH#define NOSSH#endif /* NOSSH */#ifndef NOFTP#define NOFTP#endif /* NOFTP */#ifndef NOHTTP#define NOHTTP#endif /* NOHTTP */#ifndef NOBROWSER#define NOBROWSER#endif /* NOBROWSER */#ifndef NOFORWARDX#define NOFORWARDX#endif /* NOFORWARDX */#endif /* NONET */#ifdef IKSDONLY#ifdef SUNX25#undef SUNX25#endif /* SUNX25 */#ifdef IBMX25#undef IBMX25#endif /* IBMX25 */#ifdef STRATUSX25#undef STRATUSX25#endif /* STRATUSX25 */#ifdef CK_NETBIOS#undef CK_NETBIOS#endif /* CK_NETBIOS */#ifdef SUPERLAT#undef SUPERLAT#endif /* SUPERLAT */#ifdef NPIPE#undef NPIPE#endif /* NPIPE */#ifdef NETFILE#undef NETFILE#endif /* NETFILE */#ifdef NETCMD#undef NETCMD#endif /* NETCMD */#ifdef NETPTY#undef NETPTY#endif /* NETPTY */#ifdef RLOGCODE#undef RLOGCODE#endif /* RLOGCODE */#ifdef NETDLL#undef NETDLL#endif /* NETDLL */#ifndef NOSSH#define NOSSH#endif /* NOSSH */#ifndef NOHTTP#define NOHTTP#endif /* NOHTTP */#ifndef NOBROWSER#define NOBROWSER#endif /* NOBROWSER */#endif /* IKSDONLY *//* Note that none of the above precludes TNCODE, which can be defined in the absence of TCPSOCKET, etc, to enable server-side Telnet negotation.*/#ifndef TNCODE /* This is for the benefit of */#ifdef TCPSOCKET /* modules that might need TNCODE */#define TNCODE /* not all of ckcnet.h... */#endif /* TCPSOCKET */#endif /* TNCODE */#ifndef NETCONN#ifdef TCPSOCKET#define NETCONN
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -