📄 ckcdeb.h
字号:
/* C K C D E B . H *//* 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 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, FDCCU@CUVMA.BITNET), Columbia University Center for Computing Activities. First released January 1985. Copyright (C) 1985, 1992, Trustees of Columbia University in the City of New York. Permission is granted to any individual or institution to use this software as long as it is not sold for profit. This copyright notice must be retained. This software may not be included in commercial products without written permission of Columbia University.*//* 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. See how it has grown...*/#ifndef CKCDEB_H /* Don't include me more than once. */#define CKCDEB_H#ifdef OS2 /* For OS/2 debugging */#include "ckoker.h"#endif /* OS2 */#include <stdio.h> /* Begin by including this. */#include <ctype.h> /* and this. */#ifdef MAC/* * The MAC doesn't use standard stdio routines. */#undef getchar#undef putchar#endif /* MAC *//* System-type compilation switches */#ifdef FT21 /* Fortune For:Pro 2.1 implies 1.8 */#ifndef FT18#define FT18#endif /* FT18 */#endif /* FT21 */#ifdef AIXPS2 /* AIXPS2 implies AIX370 */#ifndef AIX370#define AIX370#endif /* AIX370 */#endif /* AIXPS2 */#ifdef AIX370 /* AIX PS/2 or 370 implies BSD4 */#ifndef BSD4#define BSD4#endif /* BSD4 */#endif /* AIX370 */#ifdef DGUX540 /* DG UX 5.40 implies Sys V R 4 */#ifndef SVR4#define SVR4#endif /* SVR4 */#endif /* DGUX540 */#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 MIPS /* MIPS System V environment */#ifndef SVR3 /* implies System V R3 or later */#define SVR3#endif /* SVR3 */#endif /* MIPS *//* 4.4BSD is a mixture of System V R4, POSIX, and 4.3BSD.*/#ifdef BSD44 /* 4.4 BSD */#ifndef SVR4 /* BSD44 implies SVR4 */#define SVR4#endif /* SVR4 */#ifndef NOSETBUF /* NOSETBUF is safe */#define NOSETBUF#endif /* NOSETBUF */#ifndef DIRENT /* Uses <dirent.h> */#define DIRENT#endif /* DIRENT */#endif /* BSD44 */#ifdef SVR3 /* SVR3 implies ATTSV */#ifndef ATTSV#define ATTSV#endif /* ATTSV */#endif /* SVR3 */#ifdef SVR4 /* SVR4 implies ATTSV */#ifndef ATTSV#define ATTSV#endif /* ATTSV */#ifndef SVR3 /* ...as well as SVR3 */#define SVR3#endif /* SVR3 */#endif /* SVR4 */#ifdef UTSV /* UTSV implies ATTSV */#ifndef ATTSV#define ATTSV#endif /* ATTSV */#endif /* UTSV */#ifdef XENIX /* XENIX implies ATTSV */#ifndef ATTSV#define ATTSV#endif /* ATTSV */#endif /* XENIX */#ifdef AUX /* AUX implies ATTSV */#ifndef ATTSV#define ATTSV#endif /* ATTSV */#endif /* AUX */#ifdef ATT7300 /* ATT7300 implies ATTSV */#ifndef ATTSV#define ATTSV#endif /* ATTSV */#endif /* ATT7300 */#ifdef ATT6300 /* ATT6300 implies ATTSV */#ifndef ATTSV#define ATTSV#endif /* ATTSV */#endif /* ATT6300 */#ifdef HPUX /* HPUX implies ATTSV */#ifndef ATTSV#define ATTSV#endif /* ATTSV */#endif /* HPUX */#ifdef ISIII /* ISIII implies ATTSV */#ifndef ATTSV#define ATTSV#endif /* ATTSV */#endif /* ISIII */#ifdef NEXT /* NEXT implies BSD4 */#ifndef BSD4#define BSD4#endif /* BSD4 */#endif /* NEXT */#ifdef SUNOS4 /* SUNOS4 implies BSD4 */#ifndef BSD4#define BSD4#endif /* BSD4 */#endif /* SUNOS4 */#ifdef BSD41 /* BSD41 implies BSD4 */#ifndef BSD4#define BSD4#endif /* BSD4 */#endif /* BSD41 */#ifdef BSD43 /* BSD43 implies BSD4 */#ifndef BSD4#define BSD4#endif /* BSD4 */#endif /* BSD43 */#ifdef BSD4 /* BSD4 implies ANYBSD */#ifndef ANYBSD#define ANYBSD#endif /* ANYBSD */#endif /* BSD4 */#ifdef BSD29 /* BSD29 implies ANYBSD */#ifndef ANYBSD#define ANYBSD#endif /* ANYBSD */#endif /* BSD29 */#ifdef ATTSV /* ATTSV implies UNIX */#ifndef UNIX#define UNIX#endif /* UNIX */#endif /* ATTSV */#ifdef ANYBSD /* ANYBSD implies UNIX */#ifndef UNIX#define UNIX#endif /* UNIX */#endif /* ANYBSD */#ifdef POSIX /* POSIX implies UNIX */#ifndef UNIX#define UNIX#endif /* UNIX */#ifndef DIRENT /* and DIRENT, i.e. <dirent.h> */#ifndef SDIRENT#define DIRENT#endif /* SDIRENT */#endif /* DIRENT */#ifndef NOFILEH /* POSIX doesn't use <sys/file.h> */#define NOFILEH#endif /* NOFILEH */#endif /* POSIX */#ifdef V7#ifndef UNIX#define UNIX#endif /* UNIX */#endif /* V7 */#ifdef COHERENT#ifndef UNIX#define UNIX#endif /* UNIX */#endif /* COHERENT */#ifdef MINIX#ifndef UNIX#define UNIX#endif /* UNIX */#endif /* MINIX *//* The symbol SVORPOSIX is defined for both AT&T and POSIX compilations to make it easier to select items that System V and POSIX have in common, but which BSD, V7, etc, do not have.*/#ifdef ATTSV#ifndef SVORPOSIX#define SVORPOSIX#endif /* SVORPOSIX */#endif /* ATTSV */#ifdef POSIX#ifndef SVORPOSIX#define SVORPOSIX#endif /* SVORPOSIX */#endif /* POSIX *//* The symbol SVR4ORPOSIX is defined for both AT&T System V R4 and POSIX compilations to make it easier to select items that System V R4 and POSIX have in common, but which BSD, V7, and System V R3 and earlier, etc, do not have.*/#ifdef POSIX#ifndef SVR4ORPOSIX#define SVR4ORPOSIX#endif /* SVR4ORPOSIX */#endif /* POSIX */#ifdef SVR4#ifndef SVR4ORPOSIX#define SVR4ORPOSIX#endif /* SVR4ORPOSIX */#endif /* SVR4 *//* The symbol BSD44ORPOSIX is defined for both 4.4BSD and POSIX compilations to make it easier to select items that 4.4BSD and POSIX have in common, but which System V, BSD, V7, etc, do not have.*/#ifdef BSD44#ifndef BSD44ORPOSIX#define BSD44ORPOSIX#endif /* BSD44ORPOSIX */#endif /* BSD44 */#ifdef POSIX#ifndef BSD44ORPOSIX#define BSD44ORPOSIX#endif /* BSD44ORPOSIX */#endif /* POSIX */#ifdef apollo /* May be ANSI-C, check further */#ifdef __STDCPP__#define CK_ANSIC /* Yes, this is real ANSI-C */#define SIG_V#else#define NOANSI /* Nope, not ANSI */#undef __STDC__ /* Even though it say it is! */#define SIG_I#endif /* __STDCPP__ */#endif /* apollo */#ifdef POSIX /* -DPOSIX on cc command line */#ifndef _POSIX_SOURCE /* Implies _POSIX_SOURCE */#define _POSIX_SOURCE#endif /* _POSIX_SOURCE */#endif /* POSIX *//* ANSI C? That is, do we have function prototypes, new-style function declarations, and parameter type checking and coercion?*/#ifdef MAC /* MPW C is ANSI */#ifndef NOANSI#ifndef CK_ANSIC#define CK_ANSIC#endif /* CK_ANSIC */#endif /* NOANSI */#endif /* MAC */#ifndef NOANSI#ifdef __STDC__ /* __STDC__ means ANSI C */#ifndef CK_ANSIC#define CK_ANSIC#endif /* CK_ANSIC */#endif /* __STDC__ */#endif /* NOANSI *//* _PROTOTYP() is used for forward declarations of functions so we can have parameter and return value type checking if the compiler offers it. __STDC__ should be defined by the compiler only if function prototypes are allowed. Otherwise, we get old-style forward declarations. Our own private CK_ANSIC symbol tells whether we use ANSI C prototypes. To force use of ANSI prototypes, include -DCK_ANSIC on the cc command line. To disable the use of ANSI prototypes, include -DNOANSI.*/#ifdef CK_ANSIC#define _PROTOTYP( func, parms ) func parms#else /* Not ANSI C */#define _PROTOTYP( func, parms ) func()#endif /* CK_ANSIC *//* Altos-specific items: 486, 586, 986 models...*/#ifdef A986#define M_VOID#define void int#define CHAR char#define SIG_I#endif /* A986 *//* Void type */#ifndef VOID /* Used throughout all C-Kermit */#ifdef CK_ANSIC /* modules... */#define VOID void#else#define VOID int#endif /* CK_ANSIC */#endif /* VOID *//* Signal type */#ifndef SIG_V /* signal() type, if not def'd yet */#ifndef SIG_I#ifdef OS2#define SIG_V#else#ifdef POSIX#define SIG_V#else#ifdef SVR3 /* System V R3 and later */#define SIG_V#else#ifdef SUNOS4 /* SUNOS V 4.0 and later */#ifndef sun386#define SIG_V #else#define SIG_I#endif /* sun386 */#else#ifdef NEXT /* NeXT */#define SIG_V#else#ifdef AIX370#define SIG_V#define SIGTYP __SIGVOID /* AIX370 */#else#define SIG_I#endif /* AIX370 */#endif /* NEXT */#endif /* SUNOS4 */#endif /* SVR3 */#endif /* POSIX */#endif /* OS2 */#endif /* SIG_I */#endif /* SIG_V */#ifdef SIG_I#define SIGRETURN return(0)#ifndef SIGTYP#define SIGTYP int#endif /* SIGTYP */#endif /* SIG_I */#ifdef SIG_V#define SIGRETURN return#ifndef SIGTYP#define SIGTYP void#endif /* SIGTYP */#endif /* SIG_V */#ifndef SIGTYP#define SIGTYP int#endif /* SIGTYP */#ifndef SIGRETURN#define SIGRETURN return(0)#endif /* SIGRETURN *//* We want all characters to be unsigned if the compiler supports it */#ifdef PROVX1typedef char CHAR;/* typedef long LONG; */typedef int void;#else#ifdef MINIXtypedef unsigned char CHAR;#else#ifdef V7typedef char CHAR;#else#ifdef C70typedef char CHAR;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -