📄 ckcdeb.h
字号:
#define PID_T int#endif /* PID_T *//* Data types for uids and gids. Same deal as for pids. Wouldn't be nice if there was a preprocessor test to find out if a typedef existed?*/#ifdef VMS/* Not used in VMS so who cares */#define UID_T int#define GID_T int#endif /* VMS */#ifdef POSIX/* Or would it be better (or worse?) to use _POSIX_SOURCE here? */#ifndef UID_T#define UID_T uid_t#endif /* UID_T */#ifndef GID_T#define GID_T gid_t#endif /* GID_T */#else /* Not POSIX */#ifdef SVR4/* SVR4 and later have uid_t and gid_t. *//* SVR3 and earlier use int, or unsigned short, or.... */#ifndef UID_T#define UID_T uid_t#endif /* UID_T */#ifndef GID_T#define GID_T gid_t#endif /* GID_T */#else /* Not SVR4 */#ifdef BSD43#ifndef UID_T#define UID_T uid_t#endif /* UID_T */#ifndef GID_T#define GID_T gid_t#endif /* GID_T */#else /* Not BSD43 *//* Default these to int for older UNIX versions */#ifndef UID_T#define UID_T int#endif /* UID_T */#ifndef GID_T#define GID_T int#endif /* GID_T */#endif /* BSD43 */#endif /* SVR4 */#endif /* POSIX *//* getpwuid() arg type, which is not necessarily the same as UID_T, e.g. in SCO UNIX SVR3, it's int.*/#ifndef PWID_T#define PWID_T UID_T#endif /* PWID_T */#ifdef NEXT#define MACHWAIT#else#ifdef MACH#define MACHWAIT#endif /* MACH */#endif /* NEXT */#ifdef MACHWAIT /* WAIT_T argument for wait() */#include <sys/wait.h>#define CK_WAIT_Htypedef union wait WAIT_T;#else#ifdef POSIX#include <sys/wait.h>#define CK_WAIT_H#ifndef WAIT_Ttypedef int WAIT_T;#endif /* WAIT_T */#else /* !POSIX */typedef int WAIT_T;#endif /* POSIX */#endif /* MACHWAIT *//* Forward declarations of system-dependent functions callable from all *//* C-Kermit modules. *//* File-related functions from system-dependent file i/o module */#ifndef CKVFIO_C/* For some reason, this does not agree with DEC C */_PROTOTYP( int zkself, (void) );#endif /* CKVFIO_C */_PROTOTYP( int zopeni, (int, char *) );_PROTOTYP( int zopeno, (int, char *, struct zattr *, struct filinfo *) );_PROTOTYP( int zclose, (int) );#ifndef MAC_PROTOTYP( int zchin, (int, int *) );#endif /* MAC */_PROTOTYP( int zsinl, (int, char *, int) );_PROTOTYP( int zinfill, (void) );_PROTOTYP( int zsout, (int, char*) );_PROTOTYP( int zsoutl, (int, char*) );_PROTOTYP( int zsoutx, (int, char*, int) );_PROTOTYP( int zchout, (int, char) );_PROTOTYP( int zoutdump, (void) );_PROTOTYP( int zsyscmd, (char *) );_PROTOTYP( int zshcmd, (char *) );_PROTOTYP( int chkfn, (int) );_PROTOTYP( long zchki, (char *) );_PROTOTYP( int iswild, (char *) );_PROTOTYP( int isdir, (char *) );_PROTOTYP( int zchko, (char *) );_PROTOTYP( int zdelet, (char *) );_PROTOTYP( VOID zrtol, (char *,char *) );_PROTOTYP( VOID zltor, (char *,char *) );_PROTOTYP( VOID zstrip, (char *,char **) );_PROTOTYP( int zchdir, (char *) );_PROTOTYP( char * zhome, (void) );_PROTOTYP( char * zgtdir, (void) );_PROTOTYP( int zxcmd, (int, char *) );#ifndef MAC_PROTOTYP( int zclosf, (int) );#endif /* MAC */_PROTOTYP( int zxpand, (char *) );_PROTOTYP( int znext, (char *) );_PROTOTYP( int zchkspa, (char *, long) );_PROTOTYP( VOID znewn, (char *, char **) );_PROTOTYP( int zrename, (char *, char *) );_PROTOTYP( int zcopy, (char *, char *) );_PROTOTYP( int zsattr, (struct zattr *) );_PROTOTYP( int zfree, (char *) );_PROTOTYP( char * zfcdat, (char *) );_PROTOTYP( int zstime, (char *, struct zattr *, int) );_PROTOTYP( int zmail, (char *, char *) ); _PROTOTYP( int zprint, (char *, char *) ); _PROTOTYP( char * tilde_expand, (char *) ); _PROTOTYP( int zmkdir, (char *) ) ;_PROTOTYP( int zfseek, (long) ) ;_PROTOTYP( struct zfnfp * zfnqfp, (char *, int, char * ) ) ;#ifdef OS2_PROTOTYP( int os2setlongname, ( char * fn, char * ln ) ) ;_PROTOTYP( int os2getlongname, ( char * fn, char ** ln ) ) ;_PROTOTYP( int os2rexx, ( char *, char *, int ) ) ;_PROTOTYP( int os2rexxfile, ( char *, char *, char *, int) ) ;_PROTOTYP( int os2geteas, (char *) ) ;_PROTOTYP( int os2seteas, (char *) ) ;_PROTOTYP( char * get_os2_vers, (void) ) ;_PROTOTYP( int do_label_send, (char *) ) ;_PROTOTYP( int do_label_recv, (void) ) ;#ifdef OS2MOUSE_PROTOTYP( unsigned long os2_mouseon, (void) );_PROTOTYP( unsigned long os2_mousehide, (void) );_PROTOTYP( unsigned long os2_mouseshow, (void) );_PROTOTYP( unsigned long os2_mouseoff, (void) );_PROTOTYP( void os2_mouseevt, (void *) );#endif /* OS2MOUSE */#endif /* OS2 *//* Functions from system-dependent terminal i/o module */_PROTOTYP( int ttopen, (char *, int *, int, int) ); /* tty functions */#ifndef MAC_PROTOTYP( int ttclos, (int) );#endif /* MAC */_PROTOTYP( int tthang, (void) );_PROTOTYP( int ttres, (void) );_PROTOTYP( int ttpkt, (long, int, int) );#ifndef MAC_PROTOTYP( int ttvt, (long, int) );#endif /* MAC */_PROTOTYP( int ttsspd, (int) );_PROTOTYP( long ttgspd, (void) );_PROTOTYP( int ttflui, (void) );_PROTOTYP( int ttfluo, (void) );_PROTOTYP( int ttgwsiz, (void) );_PROTOTYP( int ttchk, (void) );_PROTOTYP( int ttxin, (int, CHAR *) );_PROTOTYP( int ttxout, (CHAR *, int) );_PROTOTYP( int ttol, (CHAR *, int) );_PROTOTYP( int ttoc, (char) );_PROTOTYP( int ttinc, (int) );_PROTOTYP( int ttscarr, (int) );_PROTOTYP( int ttgmdm, (void) );_PROTOTYP( int ttsndb, (void) );_PROTOTYP( int ttsndlb, (void) );#ifdef PARSENSE#ifdef UNIX_PROTOTYP( int ttinl, (CHAR *, int, int, CHAR, CHAR, int) );#else#ifdef VMS_PROTOTYP( int ttinl, (CHAR *, int, int, CHAR, CHAR, int) );#else#ifdef STRATUS_PROTOTYP( int ttinl, (CHAR *, int, int, CHAR, CHAR, int) );#else#ifdef OS2_PROTOTYP( int ttinl, (CHAR *, int, int, CHAR, CHAR, int) );#else#ifdef OSK_PROTOTYP( int ttinl, (CHAR *, int, int, CHAR, CHAR, int) );#else_PROTOTYP( int ttinl, (CHAR *, int, int, CHAR, CHAR) );#endif /* OSK */#endif /* OS2 */#endif /* STRATUS */#endif /* VMS */#endif /* UNIX */#else /* ! PARSENSE */_PROTOTYP( int ttinl, (CHAR *, int, int, CHAR) );#endif /* PARSENSE *//* XYZMODEM support *//* CK_XYZ enables the various commands and data structures. XYZ_INTERNAL means these protocols are built-in; if not defined, then they are external. XYZ_DLL is used to indicate a separate loadable library containing the XYZmodem protocol code.*/#ifndef NOCKXYZ#ifdef pdp11 /* No room for this in PDP-11 */#define NOCKXYZ#endif /* pdp11 */#ifndef CK_XYZ#ifdef UNIX#define CK_XYZ#else#ifdef OS2#define CK_XYZ#define XYZ_INTERNAL /* Internal and DLL */#ifndef NOXYZDLL#define XYZ_DLL#endif /* NOXYZDLL */#endif /* OS2 */#endif /* UNIX */#endif /* CK_XYZ */#endif /* NOCKXYZ */#ifdef XYZ_INTERNAL /* This ensures that XYZ_INTERNAL */#ifndef CK_XYZ /* is defined only if CK_XYZ is too */#undef XYZ_INTERNAL#endif /* CK_XYZ */#endif /* XYZ_INTERNAL */#ifdef XYZ_DLL /* This ensures XYZ_DLL is defined */#ifndef XYZ_INTERNAL /* only if XYZ_INTERNAL is too */#undef XYZ_DLL#endif /* XYZ_INTERNAL */#endif /* XYZ_DLL *//* Console functions */_PROTOTYP( int congm, (void) );#ifdef COMMENT_PROTOTYP( VOID conint, (SIGTYP (*)(int, int), SIGTYP (*)(int, int)) );#else_PROTOTYP( VOID conint, (SIGTYP (*)(int), SIGTYP (*)(int)) );#endif /* COMMENT */_PROTOTYP( VOID connoi, (void) );_PROTOTYP( int concb, (char) );#ifdef CONGSPD_PROTOTYP( long congspd, (void) );#endif /* CONGSPD */_PROTOTYP( int conbin, (char) );_PROTOTYP( int conres, (void) );_PROTOTYP( int conoc, (char) );_PROTOTYP( int conxo, (int, char *) );_PROTOTYP( int conol, (char *) );_PROTOTYP( int conola, (char *[]) );_PROTOTYP( int conoll, (char *) );_PROTOTYP( int conchk, (void) );_PROTOTYP( int coninc, (int) );_PROTOTYP( char * conkbg, (void) );_PROTOTYP( int psuspend, (int) );_PROTOTYP( int priv_ini, (void) );_PROTOTYP( int priv_on, (void) );_PROTOTYP( int priv_off, (void) );_PROTOTYP( int priv_can, (void) );_PROTOTYP( int priv_chk, (void) );_PROTOTYP( int priv_opn, (char *, int) );_PROTOTYP( int sysinit, (void) ); /* Misc Kermit functions */_PROTOTYP( int syscleanup, (void) );_PROTOTYP( int msleep, (int) );_PROTOTYP( VOID rtimer, (void) );_PROTOTYP( int gtimer, (void) );_PROTOTYP( VOID ttimoff, (void) );_PROTOTYP( VOID ztime, (char **) );_PROTOTYP( int parchk, (CHAR *, CHAR, int) );_PROTOTYP( VOID doexit, (int, int) );_PROTOTYP( int askmore, (void) );_PROTOTYP( VOID fatal, (char *) );_PROTOTYP( VOID fatal2, (char *, char *) );_PROTOTYP( int ckindex, (char *, char *, int, int, int) );#ifdef VMS_PROTOTYP( int ck_cancio, (void) );#endif /* VMS *//* Key mapping support */#ifdef NOICP#ifndef NOSETKEY#define NOSETKEY#endif /* NOSETKEY */#endif /* NOICP */#ifdef MAC#ifndef NOSETKEY#define NOSETKEY#endif /* NOSETKEY */#endif /* MAC */_PROTOTYP( int congks, (int) );#ifndef NOSETKEY#ifdef OS2#define KMSIZE 8916typedef ULONG KEY;typedef CHAR *MACRO;extern int wideresult;#else /* Not OS2 *//* Catch-all for systems where we don't know how to read keyboard scan codes > 255. Note: CHAR (i.e. unsigned char) is very important here.*/#define KMSIZE 256typedef CHAR KEY;typedef CHAR * MACRO;#define congks coninc#endif /* OS2 */#endif /* NOSETKEY */#ifndef NOKVERBS /* No \Kverbs unless... */#define NOKVERBS#endif /* NOKVERBS */#ifdef OS2 /* \Kverbs are supported in OS/2 */#undef NOKVERBS/* Note: this value chosen to be bigger than PC BIOS key modifier bits, but still fit in 16 bits without affecting sign. As of K95 1.1.5, this no longer fits in 16 bits, good thing we are 32 bit.*/#define F_MACRO 0x2000 /* Bit indicating a macro indice */#define IS_MACRO(x) (x & F_MACRO)#define F_KVERB 0x4000 /* Bit indicating a keyboard verb */#define IS_KVERB(x) (x & F_KVERB) /* Test this bit */#endif /* OS2 */#define F_ESC 0x8000 /* Bit indicating ESC char combination */#define IS_ESC(x) (x & F_ESC)#define F_CSI 0x10000 /* Bit indicating CSI char combination */#define IS_CSI(x) (x & F_CSI)#ifdef NOSPL /* This might be overkill.. */#ifndef NOKVERBS /* Not all \Kverbs require */#define NOKVERBS /* the script programming language. */#endif /* NOKVERBS */#endif /* NOSPL *//* Function prototypes for system and library functions.*/#ifdef _POSIX_SOURCE#ifndef VMS#ifndef MAC#define CK_ANSILIBS#endif /* MAC */#endif /* VMS */#endif /* _POSIX_SOURCE */#ifdef NEXT#define CK_ANSILIBS#endif /* NEXT */#ifdef SVR4#define CK_ANSILIBS#endif /* SVR4 */#ifdef STRATUS /* Stratus VOS uses ANSI libraries */#define CK_ANSILIBS#endif /* STRATUS */#ifdef OS2#define CK_ANSILIBS#define MYCURSES#define CK_RTSCTS#ifdef __IBMC__#define S_IFMT 0xF000#define timezone _timezone#endif /* __IBMC__ */#include <fcntl.h>#include <io.h>#ifdef __EMX__#ifndef __32BIT__#define __32BIT__#endif /* __32BIT__ */#include <sys/timeb.h>#else#include <direct.h>#ifdef OS2#undef SIGALRM#endif /* OS2 */#ifndef SIGUSR1#define SIGUSR1 7#endif /* SIGUSR1 */#define SIGALRM SIGUSR1_PROTOTYP( unsigned alarm, (unsigned) );_PROTOTYP( unsigned sleep, (unsigned) );#endif /* __EMX__ */#ifdef OS2_PROTOTYP( unsigned long zdskspace, (int) );#else_PROTOTYP( long zdskspace, (int) );#endif /* OS2 */_PROTOTYP( int zchdsk, (int) );_PROTOTYP( int conincraw, (int) );_PROTOTYP( int ttiscom, (int f) );_PROTOTYP( int IsFileNameValid, (char *) );_PROTOTYP( void ChangeNameForFAT, (char *) );_PROTOTYP( char *GetLoadPath, (void) );#endif /* OS2 *//* Fullscreen file transfer display items... */#ifdef MYCURSES /* MYCURSES implies CK_CURSES */#ifndef CK_CURSES#define CK_CURSES#endif /* CK_CURSES */#endif /* MYCURSES *//* The CK_WREFRESH symbol is defined if the curses library provides clearok() and wrefresh() functions, which are used in repainting the screen.*/#ifdef NOWREFRESH /* Override CK_WREFRESH */#ifdef CK_WREFRESH /* If this is defined, */#undef CK_WREFRESH /* undefine it. */#endif /* CK_WREFRESH */#else /* !NOWREFRESH */ /* No override... */#ifndef CK_WREFRESH /* If CK_WREFRESH not defined *//* Automatically define it for systems known to have it ...*/#ifdef VMS /* DEC (Open)VMS has it */#define CK_WREFRESH#else#ifdef ultrix /* DEC ULTRIX has it */#else#ifdef SVR3 /* System V has it */#define CK_WREFRESH#else#ifdef BSD44 /* 4.4 BSD has it */#define CK_WREFRESH#else#ifdef NEXT /* Define it for NeXTSTEP */#define CK_WREFRESH#else#ifdef SUNOS4 /* SunOS 4.x... */#define CK_WREFRESH#else#ifdef AIXRS /* RS/6000 AIX ... */#define CK_WREFRESH#else#ifdef RTAIX /* RT PC AIX ... */#define CK_WREFRESH#else#ifdef OSF /* DEC OSF/1 ... */#define CK_WREFRESH/* Add more here, or just define CK_WREFRESH on the CC command line... */#endif /* OSF */#endif /* RTAIX */#endif /* AIXRS */#endif /* SUNOS4 */#endif /* NEXT */#endif /* BSD44 */#endif /* SVR3 */#endif /* ultrix */#endif /* VMS */#else /* CK_WREFRESH is defined */#ifndef CK_CURSES /* CK_WREFRESH implies CK_CURSES */#define CK_CURSES#endif /* CK_CURSES */#endif /* CK_WREFRESH */#endif /* NOWREFRESH */#ifdef CK_CURSES /* Termcap buffer size for curses */#ifndef TRMBUFL#define TRMBUFL 1024#endif /* TRMBUFL */#endif /* CK_CURSES */#ifdef CK_ANSILIBS/* String library functions. For ANSI C, get prototypes from <string.h>. Otherwise, skip the prototypes.*/#include <string.h>/* Prototypes for other commonly used library functions, such as malloc, free, getenv, atol, atoi, and exit. Otherwise, no prototypes.*/#include <stdlib.h>#ifdef DIAB /* DIAB DS90 *//* #include <commonC.h> */#include <sys/wait.h>#define CK_WAIT_H#ifdef COMMENTextern void exit(int status);extern void _exit(int status);extern int uname(struct utsname *name);#endif /* COMMENT */extern int chmod(char *path, int mode);extern int ioctl(int fildes, int request, ...);extern int rdchk(int ttyfd);extern int nap(int m);#ifdef COMMENTextern int getppid(void);#endif /* COMMENT */extern int _filbuf(FILE *stream);extern int _flsbuf(char c,FILE *stream);#endif /* DIAB *//* Prototypes for UNIX functions like access, alarm, chdir, sleep, fork, and pause. Otherwise, no prototypes.*/#ifdef VMS#include <unixio.h>#endif /* VMS */#ifdef NEXT#ifndef NEXT33#include <libc.h>#endif /* NEXT33 */#else#ifndef AMIGA#ifndef OS2#ifdef STRATUS#include <c_utilities.h>#else /* !STRATUS */#include <unistd.h>#endif /* STRATUS */#endif /* OS2 */#endif /* AMIGA */#endif /* NEXT */#else /* Not ANSI libs... */#ifdef MAC#include <String.h>#include <StdLib.h>#endif /* MAC */#ifdef SUNOS41#include <unistd.h>#include <stdlib.h>#else#ifndef MAC/* It is essential that these are declared correctly! Which is not always easy. Take malloc() for instance ...*/#ifdef PYRAMID#ifdef SVR4#ifdef __STDC__#define SIZE_T_MALLOC#endif /
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -