4 Mon Aug 23 09:22:05 2010
6 NOTE TO CONTRIBUTORS: This file, and all the other C-Kermit files, must be
7 compatible with C preprocessors that support only #ifdef, #else, #endif,
8 #define, and #undef. Please do not use #if, logical operators, or other
9 later-model preprocessor features in any of the portable C-Kermit modules.
10 You can, of course, use these constructions in platform-specific modules
11 when you know they are supported.
15 This file is included by all C-Kermit modules, including the modules
16 that aren't specific to Kermit (like the command parser and the ck?tio and
17 ck?fio modules). It should be included BEFORE any other C-Kermit header
18 files. It specifies format codes for debug(), tlog(), and similar
19 functions, and includes any necessary definitions to be used by all C-Kermit
20 modules, and also includes some feature selection compile-time switches, and
21 also system- or compiler-dependent definitions, plus #includes and prototypes
22 required by all C-Kermit modules.
26 Author: Frank da Cruz <fdc@columbia.edu>,
27 Columbia University Academic Information Systems, New York City.
29 Copyright (C) 1985, 2010,
30 Trustees of Columbia University in the City of New York.
31 All rights reserved. See the C-Kermit COPYING.TXT file or the
32 copyright text in the ckcmai.c module for disclaimer and permissions.
36 Etymology: The name of this file means "C-Kermit Common-C-Language Debugging
37 Header", because originally it contained only the formats (F000-F111) for
38 the debug() and tlog() functions. Since then it has grown to include all
39 material required by all other C-Kermit modules, including the non-Kermit
40 specific ones. In other words, this is the one header file that is
41 guaranteed to be included by all C-Kermit source modules.
44 #ifndef CKCDEB_H /* Don't include me more than once. */
50 /* Unsigned numbers */
53 #define USHORT unsigned short
57 #define UINT unsigned int
61 #define ULONG unsigned long
65 #ifdef MACOSX10 /* Mac OS X 1.0 */
66 #ifndef MACOSX /* implies Mac OS X */
71 #ifdef MACOSX /* Mac OS X */
72 #ifndef BSD44 /* implies 4.4 BSD */
77 #ifdef SCO_OSR505 /* SCO 3.2v5.0.5 */
78 #ifndef SCO_OSR504 /* implies SCO 3.2v5.0.4 */
80 #endif /* SCO_OSR504 */
81 #endif /* SCO_OSR505 */
83 #ifdef SCO_OSR504 /* SCO 3.2v5.0.4 */
84 #ifndef CK_SCOV5 /* implies SCO 3.2v5.0 */
87 #include <sys/types.h> /* To sidestep header-file mess */
88 #endif /* SCO_OSR504 */
100 #endif /* UNIXWARE */
102 #ifndef MINIX /* Minix versions */
113 #endif /* MINIX315 */
116 #ifdef CK_SCO32V4 /* SCO 3.2v4 */
137 #endif /* CK_RTSCTS */
144 #endif /* CK_SCO32V4 */
146 #ifdef NOICP /* If no command parser */
147 #ifndef NOSPL /* Then no script language either */
150 #ifndef NOCSETS /* Or characer sets */
153 #ifndef NOFTP /* Or FTP client */
158 /* Built-in makefile entries */
160 #ifdef SOLARIS11 /* Solaris 11 implies 10 */
163 #endif /* SOLARIS10 */
164 #endif /* SOLARIS11 */
166 #ifdef SOLARIS10 /* Solaris 10 implies 9 */
169 #endif /* SOLARIS9 */
170 #endif /* SOLARIS10 */
172 #ifdef SOLARIS9 /* Solaris 9 implies 8 */
175 #endif /* SOLARIS8 */
176 #endif /* SOLARIS9 */
178 #ifdef SOLARIS8 /* Solaris 8 implies 7 */
181 #endif /* SOLARIS7 */
182 #endif /* SOLARIS8 */
184 #ifdef SOLARIS7 /* Solaris 7 implies 2.6 */
187 #endif /* SOLARIS26 */
188 #endif /* SOLARIS7 */
190 #ifdef SOLARIS26 /* Solaris 2.6 implies 2.5 */
193 #endif /* SOLARIS25 */
194 #endif /* SOLARIS26 */
196 #ifdef SOLARIS25 /* Solaris 2.5 implies Solaris */
200 #ifndef POSIX /* And POSIX */
203 #ifndef CK_WREFRESH /* And this (curses) */
205 #endif /* CK_WREFRESH */
206 #endif /* SOLARIS25 */
208 #ifdef SOLARIS24 /* Solaris 2.4 implies Solaris */
212 #endif /* SOLARIS24 */
214 #ifdef SOLARIS /* Solaris gets "POSIX" RTS/CTS API */
216 #ifndef POSIX_CRTSCTS
217 #define POSIX_CRTSCTS
218 #endif /* POSIX_CRTSCTS */
225 #endif /* STERMIOX */
237 #endif /* BIGBUFOK */
240 #endif /* CK_NEWTERM */
243 #ifdef SUN4S5 /* Sun-4 System V environment */
244 #ifndef SVR3 /* implies System V R3 or later */
248 #ifdef SUNOS41 /* SUNOS41 implies SUNOS4 */
254 #ifdef SUN4S5 /* Sun-4 System V environment */
255 #ifndef SVR3 /* implies System V R3 or later */
260 #ifdef SUNOS41 /* SUNOS41 implies SUNOS4 */
266 #ifdef SUNOS4 /* Built-in SUNOS4 makefile entry */
275 #endif /* NOSETBUF */
282 #endif /* TCPSOCKET */
286 #endif /* SAVEDUID */
292 #ifdef SOLARIS /* Built in makefile entry */
293 #ifndef NOSETBUF /* for Solaris 2.x */
295 #endif /* NOSETBUF */
299 #endif /* CK_CURSES */
300 #endif /* NOCURSES */
303 #endif /* CK_NEWTERM */
310 #endif /* TCPSOCKET */
320 #endif /* HADDRLIST */
323 #endif /* STERMIOX */
337 /* Features that can be eliminated from a no-file-transfer version */
344 #ifndef NOCURSES /* Fullscreen file-transfer display */
346 #endif /* NOCURSES */
348 #ifndef NOCKXYZ /* XYZMODEM support */
351 #ifndef NOCKSPEED /* Ctrl-char unprefixing */
353 #endif /* NOCKSPEED */
354 #ifndef NOSERVER /* Server mode */
356 #endif /* NOSERVER */
357 #ifndef NOCKTIMERS /* Dynamic packet timers */
359 #endif /* NOCKTIMERS */
360 #ifndef NOPATTERNS /* File-type patterns */
362 #endif /* NOPATTERNS */
363 #ifndef NOSTREAMING /* Streaming */
365 #endif /* NOSTREAMING */
366 #ifndef NOIKSD /* Internet Kermit Service */
369 #ifndef NOPIPESEND /* Sending from pipes */
371 #endif /* NOPIPESEND */
372 #ifndef NOAUTODL /* Autodownload */
374 #endif /* NOAUTODL */
375 #ifndef NOMSEND /* MSEND */
378 #ifndef NOTLOG /* Transaction logging */
381 #ifndef NOCKXXCHAR /* Packet character doubling */
383 #endif /* NOCKXXCHAR */
386 #ifdef NOICP /* No Interactive Command Parser */
387 #ifndef NODIAL /* Implies No DIAL command */
390 #ifndef NOCKXYZ /* and no external protocols */
411 #endif /* TCPSOCKET */
423 #endif /* STRATUSX25 */
426 #endif /* CK_NETBIOS */
429 #endif /* SUPERLAT */
444 #endif /* RLOGCODE */
453 #endif /* NOFORWARDX */
456 #endif /* NOBROWSER */
465 #endif /* NO_COMPORT */
466 #endif /* IKSDONLY */
469 /* Features that can be eliminated from a remote-only version */
484 #ifndef NOCURSES /* Fullscreen file-transfer display */
486 #endif /* NOCURSES */
492 #endif /* NOSCRIPT */
495 #endif /* NOSETKEY */
498 #endif /* NOKVERBS */
504 #endif /* CK_CURSES */
512 #endif /* IKSDONLY */
521 #endif /* TCPSOCKET */
524 #endif /* NOTCPOPTS */
533 #endif /* STRATUSX25 */
536 #endif /* CK_NETBIOS */
539 #endif /* SUPERLAT */
554 #endif /* RLOGCODE */
569 #endif /* NOBROWSER */
572 #endif /* NOFORWARDX */
584 #endif /* STRATUSX25 */
587 #endif /* CK_NETBIOS */
590 #endif /* SUPERLAT */
605 #endif /* RLOGCODE */
617 #endif /* NOBROWSER */
618 #endif /* IKSDONLY */
620 Note that none of the above precludes TNCODE, which can be defined in
621 the absence of TCPSOCKET, etc, to enable server-side Telnet negotation.
623 #ifndef TNCODE /* This is for the benefit of */
624 #ifdef TCPSOCKET /* modules that might need TNCODE */
625 #define TNCODE /* not all of ckcnet.h... */
626 #endif /* TCPSOCKET */
632 #endif /* TCPSOCKET */
635 #ifndef DEFPAR /* Default parity */
636 #define DEFPAR 0 /* Must be here because it is used */
637 #endif /* DEFPAR */ /* by all classes of modules */
642 #endif /* OS2ORWIN32 */
648 #ifdef OS2 /* For OS/2 debugging */
651 #endif /* OS2ORWIN32 */
662 #endif /* OS2ORUNIX */
665 #endif /* OS2ORVMS */
668 #include <stdio.h> /* Begin by including this. */
669 #include <ctype.h> /* and this. */
672 #include <types.h> /* Ensure off_t. */
673 #include "ckvrms.h" /* Get NAMDEF NAMX_C_MAXRSS. */
676 /* System-type compilation switches */
678 #ifdef FT21 /* Fortune For:Pro 2.1 implies 1.8 */
688 #endif /* __bsdi__ */
690 #ifdef AIXPS2 /* AIXPS2 implies AIX370 */
696 #ifdef AIX370 /* AIX PS/2 or 370 implies BSD4 */
702 #ifdef AIXESA /* AIX/ESA implies BSD4.4 */
708 #ifdef AIX53 /* AIX53 implies AIX52 */
714 #ifdef AIX52 /* AIX52 implies AIX51 */
720 #ifdef AIX51 /* AIX51 implies AIX50 */
726 #ifdef AIX50 /* AIX50 implies AIX45 */
732 #ifdef AIX45 /* AIX45 implies AIX44 */
738 #ifdef AIX44 /* AIX44 implies AIX43 */
744 #ifdef AIX43 /* AIX43 implies AIX42 */
750 #ifdef AIX42 /* AIX42 implies AIX41 */
756 #ifdef SV68R3V6 /* System V/68 R32V6 implies SVR3 */
760 #endif /* SV68R3V6 */
762 #ifdef SV88R32 /* System V/88 R32 implies SVR3 */
768 #ifdef DGUX540 /* DG UX 5.40 implies Sys V R 4 */
775 #ifdef DGUX540 /* DG/UX 5.40 implies DGUX */
778 #ifdef DGUX430 /* So does DG/UX 4.30 */
784 #ifdef IRIX65 /* IRIX 6.5 implies IRIX 6.4 */
790 #ifdef IRIX64 /* IRIX 6.4 implies IRIX 6.2 */
792 #define BSD44ORPOSIX /* for ckutio's benefit */
793 #endif /* BSD44ORPOSIX */
799 #ifdef IRIX62 /* IRIX 6.2 implies IRIX 6.0 */
805 #ifdef IRIX60 /* IRIX 6.0 implies IRIX 5.1 */
809 #ifndef IRIX52 /* And IRIX 5.2 (for hwfc) */
814 #ifndef IRIX /* IRIX 4.0 or greater implies IRIX */
836 #ifdef MIPS /* MIPS System V environment */
837 #ifndef SVR3 /* implies System V R3 or later */
842 #ifdef HPUX9 /* HP-UX 9.x */
851 #endif /* HPUX9PLUS */
854 #ifdef HPUX10 /* HP-UX 10.x */
855 #ifndef HPUX1010 /* If anything higher is defined */
856 #ifdef HPUX1020 /* define HPUX1010 too. */
858 #endif /* HPUX1020 */
861 #endif /* HPUX1030 */
862 #endif /* HPUX1010 */
864 #ifdef HPUX1100 /* HP-UX 11.00 implies 10.10 */
867 #endif /* HPUX1010 */
868 #endif /* HPUX1100 */
878 #endif /* HPUX9PLUS */
881 #ifdef QNX /* QNX Software Systems Inc */
882 #ifndef POSIX /* QNX 4.0 or later is POSIX */
885 #ifndef __386__ /* Comes in 16-bit and 32-bit */
895 4.4BSD is a mixture of System V R4, POSIX, and 4.3BSD.
897 #ifdef BSD44 /* 4.4 BSD */
898 #ifndef SVR4 /* BSD44 implies SVR4 */
901 #ifndef NOSETBUF /* NOSETBUF is safe */
903 #endif /* NOSETBUF */
904 #ifndef DIRENT /* Uses <dirent.h> */
909 #ifdef OPENBSD /* OpenBSD might or might not */
910 #ifndef __OpenBSD__ /* have this defined... */
912 #endif /* __OpenBSD__ */
915 #ifdef SVR3 /* SVR3 implies ATTSV */
921 #ifdef SVR4 /* SVR4 implies ATTSV */
925 #ifndef SVR3 /* ...as well as SVR3 */
932 #define ATTSV /* OXOS implies ATTSV */
934 #define SW_ACC_ID /* access() wants privs on */
935 #define kill priv_kill /* kill() wants privs on */
937 #define NOSETBUF /* NOSETBUF is safe */
938 #endif /* ! NOSETBUF */
941 #ifdef UTSV /* UTSV implies ATTSV */
947 #ifdef XENIX /* XENIX implies ATTSV */
953 #ifdef AUX /* AUX implies ATTSV */
959 #ifdef ATT7300 /* ATT7300 implies ATTSV */
965 #ifdef ATT6300 /* ATT6300 implies ATTSV */
971 #ifdef HPUX /* HPUX implies ATTSV */
977 #ifdef ISIII /* ISIII implies ATTSV */
983 #ifdef NEXT33 /* NEXT33 implies NEXT */
989 #ifdef NEXT /* NEXT implies BSD4 */
995 #ifdef BSD41 /* BSD41 implies BSD4 */
1001 #ifdef BSD43 /* BSD43 implies BSD4 */
1007 #ifdef BSD4 /* BSD4 implies ANYBSD */
1013 #ifdef BSD29 /* BSD29 implies ANYBSD */
1019 #ifdef ATTSV /* ATTSV implies UNIX */
1025 #ifdef ANYBSD /* ANYBSD implies UNIX */
1031 #ifdef POSIX /* POSIX implies UNIX */
1035 #ifndef DIRENT /* and DIRENT, i.e. <dirent.h> */
1038 #endif /* SDIRENT */
1040 #ifndef NOFILEH /* POSIX doesn't use <sys/file.h> */
1042 #endif /* NOFILEH */
1058 #endif /* NOCURSES */
1059 #endif /* COMMENT */
1060 #endif /* COHERENT */
1068 The symbol SVORPOSIX is defined for both AT&T and POSIX compilations
1069 to make it easier to select items that System V and POSIX have in common,
1070 but which BSD, V7, etc, do not have.
1075 #endif /* SVORPOSIX */
1081 #endif /* SVORPOSIX */
1085 The symbol SVR4ORPOSIX is defined for both AT&T System V R4 and POSIX
1086 compilations to make it easier to select items that System V R4 and POSIX
1087 have in common, but which BSD, V7, and System V R3 and earlier, etc, do
1093 #endif /* SVR4ORPOSIX */
1098 #endif /* SVR4ORPOSIX */
1102 The symbol BSD44ORPOSIX is defined for both 4.4BSD and POSIX compilations
1103 to make it easier to select items that 4.4BSD and POSIX have in common,
1104 but which System V, BSD, V7, etc, do not have.
1107 #ifndef BSD44ORPOSIX
1108 #define BSD44ORPOSIX
1109 #endif /* BSD44ORPOSIX */
1113 #ifndef BSD44ORPOSIX
1114 #define BSD44ORPOSIX
1115 #endif /* BSD44ORPOSIX */
1118 #ifdef UNIX /* For items common to OS/2 and UNIX */
1121 #endif /* OS2ORUNIX */
1124 #ifdef UNIX /* For items common to VMS and UNIX */
1131 #endif /* OS2ORVMS */
1135 #ifndef UNIXOROSK /* UNIX or OS-9 (or OS-9000) */
1143 #endif /* UNIXOROSK */
1148 #endif /* UNIXOROSK */
1149 #endif /* OSKORUNIX */
1152 #define CK_ANSIC /* OS/2 supports ANSIC and more extensions */
1155 #ifdef OSF50 /* Newer OSF/1 versions imply older ones */
1185 #ifdef __DECC /* For DEC Alpha VMS or OSF/1 */
1187 #define CK_ANSIC /* Even with /stand=vaxc, need ansi */
1188 #endif /* CKANSIC */
1190 #define SIG_V /* and signal type is VOID */
1193 #define CK_ANSILIBS /* (Martin Zinser, Feb 1995) */
1194 #endif /* CK_ANSILIBS */
1195 #ifndef _POSIX_C_SOURCE
1196 #define _POSIX_C_SOURCE 1
1197 #endif /* _POSIX_C_SOURCE */
1201 #ifdef __ia64 /* VMS on Itanium */
1206 #ifndef VMS64BIT /* 64-bit VMS on Itanium or Alpha */
1213 #endif /* __ALPHA */
1214 #endif /* VMS64BIT */
1217 #ifdef apollo /* May be ANSI-C, check further */
1219 #define CK_ANSIC /* Yes, this is real ANSI-C */
1222 #define NOANSI /* Nope, not ANSI */
1223 #undef __STDC__ /* Even though it say it is! */
1225 #endif /* __STDCPP__ */
1228 #ifdef POSIX /* -DPOSIX on cc command line */
1229 #ifndef _POSIX_SOURCE /* Implies _POSIX_SOURCE */
1230 #define _POSIX_SOURCE
1231 #endif /* _POSIX_SOURCE */
1235 ANSI C? That is, do we have function prototypes, new-style
1236 function declarations, and parameter type checking and coercion?
1238 #ifdef MAC /* MPW C is ANSI */
1242 #endif /* CK_ANSIC */
1246 #ifdef STRATUS /* Stratus VOS */
1249 #endif /* CK_ANSIC */
1253 #endif /* STRATUS */
1256 #ifdef __STDC__ /* __STDC__ means ANSI C */
1259 #endif /* CK_ANSIC */
1260 #endif /* __STDC__ */
1263 _PROTOTYP() is used for forward declarations of functions so we can have
1264 parameter and return value type checking if the compiler offers it.
1265 __STDC__ should be defined by the compiler only if function prototypes are
1266 allowed. Otherwise, we get old-style forward declarations. Our own private
1267 CK_ANSIC symbol tells whether we use ANSI C prototypes. To force use of
1268 ANSI prototypes, include -DCK_ANSIC on the cc command line. To disable the
1269 use of ANSI prototypes, include -DNOANSI.
1272 #define _PROTOTYP( func, parms ) func parms
1273 #else /* Not ANSI C */
1274 #define _PROTOTYP( func, parms ) func()
1275 #endif /* CK_ANSIC */
1278 #ifdef NOLOGIN /* NOLOGIN implies NOIKSD */
1282 #endif /* NOLOGIN */
1285 #ifdef NOIKSD /* Internet Kermit Service Daemon */
1287 #ifndef NOPRINTFSUBST
1288 #define NOPRINTFSUBST
1289 #endif /* NOPRINTFSUBST */
1293 #endif /* NOLOGIN */
1296 #endif /* NOSYSLOG */
1302 #ifdef OS2ORUNIX /* Platforms where IKSD is supported */
1304 #endif /* OS2ORUNIX */
1308 #ifdef IKSD /* IKSD options... */
1309 #ifndef IKSDCONF /* IKSD configuration file */
1311 #define IKSDCONF "/etc/iksd.conf"
1314 #define IKSDCONF "iksd.ksc"
1317 #endif /* IKSDCONF */
1319 #ifndef IKSDB /* IKSD database */
1322 #define IK_LCKTRIES 16 /* How many times to try to get lock */
1323 #define IK_LCKSLEEP 1 /* How long to sleep between tries */
1324 #define IK_LOCKFILE "iksd.lck" /* Database lockfilename */
1325 #define IK_DBASEDIR "/var/log/" /* Database directory */
1326 #define IK_DBASEFIL "iksd.db" /* Database filename */
1330 #ifndef NOFTRUNCATE /* ftruncate() not available */
1332 #endif /* NOFTRUNCATE */
1333 #define IK_LCKTRIES 16 /* How many times to try to get lock */
1334 #define IK_LCKSLEEP 1 /* How long to sleep between tries */
1335 #define IK_LOCKFILE "iksd.lck" /* DB lockfilename (in systemroot) */
1336 #define IK_DBASEFIL "iksd.db" /* Database filename */
1340 #endif /* NOIKSDB */
1343 Substitutes for printf() and friends used in IKS to compensate for
1344 lack of a terminal driver, mainly to supply CR after LF.
1346 #ifndef NOPRINTFSUBST
1349 * The MAC doesn't use standard stdio routines.
1352 #define getchar() mac_getchar()
1354 #define putchar(c) mac_putchar(c)
1355 #define printf mac_printf
1356 #define perror mac_perror
1357 #define puts mac_puts
1358 extern int mac_putchar (int c);
1359 extern int mac_puts (const char *string);
1360 extern int mac_printf(const char *, ...);
1361 extern int mac_getchar (void);
1365 #define printf Vscrnprintf
1366 #define fprintf Vscrnfprintf
1367 extern int Vscrnprintf(const char *, ...);
1368 extern int Vscrnprintw(const char *, ...);
1369 extern int Vscrnfprintf(FILE *, const char *, ...);
1372 #endif /* putchar */
1373 #define putchar(x) Vscrnprintf("%c",x)
1374 #define perror(x) Vscrnperror(x)
1382 #endif /* CKXPRINTF */
1385 #endif /* CKWART_C */
1386 #endif /* NOPRINTFSUBST */
1389 #define printf ckxprintf
1390 #define fprintf ckxfprintf
1392 _PROTOTYP(int ckxprintf,(const char *, ...));
1394 _PROTOTYP(void ckxperror,(const char *));
1397 _PROTOTYP(void ckxperror,(const char *));
1399 _PROTOTYP(int ckxperror,(const char *));
1400 #endif /* CK_SCOV5 */
1402 _PROTOTYP(int ckxfprintf,(FILE *, const char *, ...));
1403 #endif /* CK_ANSIC */
1406 #endif /* putchar */
1407 #define putchar(x) ckxprintf("%c",x)
1411 #define putc(a,b) ckxfprintf(b,"%c",a)
1412 #define perror(x) ckxperror(x)
1413 #endif /* CKXPRINTF */
1416 Altos-specific items: 486, 586, 986 models...
1425 /* Signal handling */
1428 #ifndef CK_POSIX_SIG
1429 #define CK_POSIX_SIG
1430 #endif /* CK_POSIX_SIG */
1434 void type, normally available only in ANSI compilers.
1435 The HP-UX exception (for its "bundled" non-ANSI C compiler)
1436 is known to be valid back to HP-UX 6.5.
1437 Adjustments might be needed for earlier HP-UX versions.
1439 #ifndef VOID /* Used throughout all C-Kermit */
1440 #ifdef CK_ANSIC /* modules... */
1448 #endif /* CK_ANSIC */
1451 Exactly the same as VOID but for use in contexts where the VOID symbol
1452 conflicts some header-file definition. This is needed for the section
1453 of ckuusx.c that provides C-Kermit's curses interface, roughly the
1454 second half of ckuusx.c.
1465 #endif /* CK_ANSIC */
1485 #endif /* CK_ANSIC */
1486 #endif /* CK_SCO32V4 */
1492 #ifndef SIG_V /* signal() type, if not def'd yet */
1500 #ifdef SVR3 /* System V R3 and later */
1503 #ifdef SUNOS4 /* SUNOS V 4.0 and later */
1510 #ifdef NEXT /* NeXT */
1516 #define SIGTYP __SIGVOID /* AIX370 */
1518 #ifdef STRATUS /* Stratus VOS */
1531 #else /* Everything else */
1534 #endif /* STRATUS */
1545 #define SIGRETURN return(0)
1552 #define SIGRETURN return
1569 #define SIGRETURN return(0)
1570 #endif /* SIGRETURN */
1573 /* This does not work, so don't use it. */
1574 #define signal ckntsignal
1575 SIGTYP (*ckntsignal(int type, SIGTYP (*)(int)))(int);
1576 #endif /* CKNTSIG */
1578 /* We want all characters to be unsigned if the compiler supports it */
1584 #define CHAR unsigned char
1588 /* typedef long LONG; */
1592 typedef unsigned char CHAR;
1599 /* typedef long LONG; */
1603 /* typedef long LONG; */
1606 #define CHAR unsigned char /* 3.22 compiler */
1609 #define CHAR unsigned char
1613 #define CHAR unsigned char
1618 typedef unsigned char CHAR;
1622 typedef unsigned char CHAR;
1627 typedef unsigned char CHAR;
1631 #endif /* datageneral */
1639 union ck_short { /* Mainly for Unicode */
1644 #ifdef MAC /* Macintosh file routines */
1645 #ifndef CKWART_C /* But not in "wart"... */
1649 #define feof mac_feof
1650 #define rewind mac_rewind
1651 #define fgets mac_fgets
1652 #define fopen mac_fopen
1653 #define fclose mac_fclose
1659 #endif /* CKCPRO_W */
1662 Systems whose mainline modules have access to the communication-line
1663 file descriptor, ttyfd.
1677 #endif /* CK_TTYFD */
1679 /* Systems where we can get our own process ID */
1693 /* Systems that support the Microsoft Telephony API (TAPI) */
1700 #endif /* CK_TAPI */
1717 #endif /* datageneral */
1719 #endif /* OS2ORUNIX */
1720 #endif /* NZXPAND */
1724 #endif /* NZXPAND */
1725 #endif /* NONZXPAND */
1727 /* nzxpand() option flags */
1729 #define ZX_FILONLY 1 /* Match only regular files */
1730 #define ZX_DIRONLY 2 /* Match only directories */
1731 #define ZX_RECURSE 4 /* Descend through directory tree */
1732 #define ZX_MATCHDOT 8 /* Match "dot files" */
1733 #define ZX_NOBACKUP 16 /* Don't match "backup files" */
1734 #define ZX_NOLINKS 32 /* Don't follow symlinks */
1737 #define nzxpand(a,b) zxpand(a)
1738 #endif /* NZXPAND */
1741 #ifndef ZXREWIND /* Platforms that have zxrewind() */
1756 #endif /* STRATUS */
1758 #endif /* datageneral */
1760 #endif /* OS2ORUNIX */
1761 #endif /* ZXREWIND */
1765 #endif /* ZXREWIND */
1766 #endif /* NOZXREWIND */
1768 /* Temporary-directory-for-RECEIVE feature ... */
1769 /* This says whether we have the isdir() function defined. */
1771 #ifdef UNIX /* UNIX has it */
1775 #define TMPDIRLEN 256
1777 #endif /* CK_TMPDIR */
1780 #ifdef VMS /* VMS too */
1783 #define TMPDIRLEN 256
1784 #endif /* CK_TMPDIR */
1787 #ifdef OS2 /* OS two too */
1790 #define TMPDIRLEN 129
1791 #endif /* CK_TMPDIR */
1794 #ifdef STRATUS /* Stratus VOS too. */
1797 #define TMPDIRLEN 256
1798 #endif /* CK_TMPDIR */
1799 #endif /* STRATUS */
1801 #ifdef OSK /* OS-9 too */
1804 #define TMPDIRLEN 256
1805 #endif /* CK_TMPDIR */
1808 #ifdef datageneral /* AOS/VS too */
1811 #define TMPDIRLEN 256
1812 #endif /* CK_TMPDIR */
1813 #endif /* datageneral */
1815 #ifdef CK_TMPDIR /* Needs command parser */
1819 #endif /* CK_TMPDIR */
1821 /* Whether to include <sys/time.h> */
1823 #ifndef NOTIMEH /* <time.h> */
1827 #endif /* NOTIMEH */
1829 #ifndef NOSYSTIMEH /* <sys/time.h> */
1831 #ifdef UNIX /* UNIX */
1832 #ifdef SVORPOSIX /* System V or POSIX... */
1861 #endif /* SV68R3V6 */
1865 #endif /* __linux__ */
1868 #endif /* SCO_32V4 */
1871 #else /* Not SVORPOSIX */
1873 #ifndef BELLV10 /* All but these... */
1879 #endif /* COHERENT */
1883 #endif /* BELLV10 */
1884 #endif /* SVORPOSIX */
1886 #endif /* SYSTIMEH */
1887 #endif /* NOSYSTIMEH */
1889 #ifndef NOSYSTIMEBH /* <sys/timeb.h> */
1911 #endif /* BELLV10 */
1916 #endif /* COHERENT */
1918 #endif /* SYSTIMEBH */
1919 #endif /* NOSYSTIMEBH */
1922 Debug and transaction logging is included automatically unless you define
1923 NODEBUG or NOTLOG. Do this if you want to save the space and overhead.
1924 (Note, in version 4F these definitions changed from "{}" to the null string
1925 to avoid problems with semicolons after braces, as in: "if (x) tlog(this);
1936 #endif /* NODEBUG */
1948 /* debug() macro style selection. */
1953 #endif /* IFDEBUG */
1959 #endif /* IFDEBUG */
1965 #endif /* IFDEBUG */
1968 #ifdef OXOS /* tst is faster than jsr */
1971 #endif /* IFDEBUG */
1978 extern int matchdot;
1983 _PROTOTYP( void bleep, (short) );
1985 #define bleep(x) if(tt_bell)putchar('\07')
1989 #ifdef BEBOX /* This was used only for DR7 */
1992 #ifdef BEOS /* This is used for BeOS 4.x */
1996 #endif /* BEOSORBEBOX */
2004 /* Formats for debug() and tlog() */
2019 #endif /* __linux__ */
2021 /* Platforms where small size is needed */
2027 /* Can we use realpath()? */
2033 #endif /* NOREALPATH */
2072 #endif /* COHERENT */
2076 #endif /* CK_SCOV5 */
2077 #endif /* CK_SCO32V4 */
2079 #endif /* SV68R3V6 */
2084 #endif /* NOREALPATH */
2089 #endif /* NOREALPATH */
2090 #endif /* CKREALPATH */
2098 #endif /* OS2ORUNIX */
2099 #endif /* CKREALPATH */
2101 /* CKSYMLINK should be set only if we can use readlink() */
2107 #endif /* NOSYMLINK */
2108 #endif /* CKSYMLINK */
2111 /* Platforms where we can use lstat() instead of stat() (for symlinks) */
2112 /* This should be set only if both lstat() and readlink() are available */
2119 #ifdef SVR4 /* SVR4 has lstat() */
2122 #ifdef BSD42 /* 4.2BSD and 4.3BSD have it */
2123 #define USE_LSTAT /* This should include old HPUXs */
2125 #ifdef BSD44 /* 4.4BSD has it */
2128 #ifdef LINUX /* LINUX has it */
2131 #ifdef SUNOS4 /* SunOS has it */
2138 #endif /* CKSYMLINK */
2140 #endif /* USE_LSTAT */
2141 #endif /* NOSYMLINK */
2142 #endif /* NOLSTAT */
2147 #endif /* USE_LSTAT */
2148 #endif /* NOLSTAT */
2150 #ifndef NOTTYLOCK /* UNIX systems that have ttylock() */
2152 #ifdef AIXRS /* AIX 3.1 and later */
2155 #ifdef USE_UU_LOCK /* FreeBSD or other with uu_lock() */
2159 Prior to 8.0.299 Alpha.08 this was HAVE_BAUDBOY which was added for
2160 Red Hat 7.2 in May 2003 but which is no longer supported in Debian and
2161 OpenSuse (at least).
2165 #endif /* HAVE_LOCKDEV */
2166 #endif /* USE_UU_LOCK */
2168 #endif /* USETTYLOCK */
2169 #endif /* NOTTYLOCK */
2171 #ifndef NO_OPENPTY /* Can use openpty() */
2172 #ifndef HAVE_OPENPTY
2174 #define HAVE_OPENPTY
2177 #define HAVE_OPENPTY
2180 #define HAVE_OPENPTY
2183 #define HAVE_OPENPTY
2186 #define HAVE_OPENPTY
2187 #endif /* MACOSX10 */
2188 #endif /* __NetBSD__ */
2189 #endif /* __OpenBSD__ */
2190 #endif /* __FreeBSD__ */
2191 #endif /* __linux__ */
2192 #endif /* HAVE_OPENPTY */
2193 #endif /* NO_OPENPTY */
2195 /* Kermit feature selection */
2198 #ifndef NOCHANNELIO /* Channel-based file i/o package */
2211 #endif /* STRATUS */
2215 #endif /* CKCHANNELIO */
2216 #endif /* NOCHANNELIO */
2219 #ifndef NOCKEXEC /* EXEC command */
2222 #ifdef UNIX /* UNIX can do it */
2227 #endif /* NOCKEXEC */
2229 #ifndef NOFAST /* Fast Kermit protocol by default */
2242 #endif /* CK_FAST */
2245 #ifdef UNIX /* Transparent print */
2250 #endif /* NOXPRINT */
2253 #ifndef NOHWPARITY /* Hardware parity */
2255 #ifdef SVORPOSIX /* System V or POSIX can have it */
2258 #ifdef SUNOS41 /* SunOS 4.1 can have it */
2261 #ifdef OS2 /* K95 can have it */
2264 #endif /* SUNOS41 */
2265 #endif /* SVORPOSIX */
2266 #endif /* HWPARITY */
2267 #endif /* NOHWPARITY */
2269 #ifndef NOSTOPBITS /* Stop-bit selection */
2272 /* In Unix really this should only be if CSTOPB is defined. */
2273 /* But we don't know that yet. */
2278 #endif /* TN_COMPORT */
2279 #endif /* OS2ORUNIX */
2280 #endif /* STOPBITS */
2281 #endif /* NOSTOPBITS */
2284 #ifndef NETCMD /* Can SET NETWORK TYPE COMMAND */
2289 /* Pty support, nonportable, available on a case-by-case basis */
2292 #ifdef NEXT /* NeXTSTEP (tested on 3.1)*/
2295 #ifdef CK_SCOV5 /* SCO OSR5 (tested on 5.0.5)*/
2298 #ifdef QNX /* QNX (tested on 4.25) */
2301 #ifdef SINIX /* Sinix (tested on 5.42) */
2304 #ifdef DGUX540 /* DG/UX 5.4++ (tested on 5.4R4.11) */
2307 #ifdef OSF32 /* Digital Unix 3.2 */
2310 #ifdef OSF40 /* Digital Unix 4.0 / Tru64 */
2313 #ifdef IRIX60 /* IRIX 6.0 (not earlier) */
2316 #ifdef HPUX10 /* HPUX 10.00 or later */
2318 #ifndef HAVE_PTYTRAP
2319 #define HAVE_PTYTRAP
2320 #endif /* HAVE_PTYTRAP */
2322 #ifdef HPUX9 /* HPUX 9.00 (not earlier) */
2324 #ifndef HAVE_PTYTRAP
2325 #define HAVE_PTYTRAP
2326 #endif /* HAVE_PTYTRAP */
2328 #ifdef BSD44 /* BSD44, {Net,Free,Open}BSD */
2331 #ifdef BSDI /* BSDI/OS (tested in 4) */
2334 #ifdef SOLARIS /* Solaris (tested in 2.5) */
2337 #ifdef UW7 /* Unixware 7 */
2340 #ifdef SUNOS41 /* SunOS (tested in 4.1.3) */
2343 #ifdef AIX41 /* AIX 4.1 and later */
2346 #ifdef LINUX /* Linux */
2350 #endif /* SUNOS41 */
2352 #endif /* SOLARIS */
2360 #endif /* DGUX540 */
2363 #endif /* CK_SCOV5 */
2373 #ifdef NETPTY /* NETCMD required for NETPTY */
2379 #ifndef CK_UTSNAME /* Can we call uname()? */
2386 #ifdef POSIX /* It's in POSIX.1 */
2389 #ifdef SUNOS41 /* It's in SunOS 4.1 */
2392 #ifdef AIXRS /* It's in AIX */
2395 #ifdef SVR4 /* It's in SVR4 (but not SVR3) */
2398 #ifdef HPUX /* It's in HP-UX 5.00 and later */
2401 #ifdef OSF /* It's in OSF/1 / Digital UNIX */
2406 #endif /* CK_SCOV5 */
2411 #endif /* SUNOS41 */
2415 #endif /* CK_UTSNAME */
2417 /* This section for anything that might use floating-point */
2419 /* If the following causes trouble use -DFLOAT=float on the command line */
2424 #endif /* FNFLOAT */
2427 #endif /* CKFLOAT */
2434 /* Don't use double on 64-bit platforms -- bad things happen */
2435 #define CKFLOAT float
2436 #define CKFLOAT_S "float"
2438 #define CKFLOAT double
2439 #define CKFLOAT_S "double"
2440 #endif /* __alpha */
2441 #endif /* CKFLOAT */
2443 #ifndef NOGFTIMER /* Floating-point timers */
2445 #ifdef UNIX /* For UNIX */
2448 #ifdef VMS /* VMS */
2449 #ifndef OLD_VMS /* 5.0 and later */
2451 #endif /* OLD_VMS */
2453 #ifdef OS2 /* And K95 */
2456 #ifdef STRATUS /* And Stratus VOS */
2458 #endif /* STRATUS */
2459 #endif /* GFTIMER */
2460 #endif /* NOGFTIMER */
2463 #ifndef FNFLOAT /* Floating-point math functions */
2464 #ifdef VMS /* defined by default in VMS */
2467 #ifdef OS2 /* and K95 */
2471 #endif /* FNFLOAT */
2474 #else /* NOFLOAT is defined */
2478 #endif /* CKFLOAT */
2482 #endif /* GFTIMER */
2486 #endif /* FNFLOAT */
2488 #endif /* NOFLOAT */
2490 #ifdef GFTIMER /* Fraction of second to use when */
2491 #ifndef GFMINTIME /* elapsed time is <= 0 */
2492 #define GFMINTIME 0.005
2493 #endif /* GFMINTIME */
2494 #endif /* GFTIMER */
2497 extern long ztmsec, ztusec; /* Fraction of sec of current time */
2500 #ifndef NOUNPREFIXZERO /* Allow unprefixing of NUL (0) */
2501 #ifndef UNPREFIXZERO /* in file-transfer packets */
2502 #define UNPREFIXZERO
2503 #endif /* UNPREFIXZERO */
2504 #endif /* NOUNPREFIXZERO */
2507 #define NOCAL /* Calibrate */
2508 #endif /* CK_SMALL */
2510 #ifndef NOPATTERNS /* Filetype matching patterns */
2515 #endif /* CK_SMALL */
2517 #endif /* PATTERNS */
2518 #endif /* NOPATTERNS */
2523 #endif /* CALIBRATE */
2527 #endif /* CALIBRATE */
2530 #ifndef NORECURSE /* Recursive directory traversal */
2538 #endif /* CK_SMALL */
2546 #endif /* STRATUS */
2547 #endif /* OS2ORUNIX */
2549 #endif /* RECURSIVE */
2550 #endif /* NORECURSE */
2552 #ifndef CK_SMALL /* Enable file-transfer tuning code */
2553 #ifndef CKTUNING /* in which more code is added */
2554 #ifndef NOTUNING /* to avoid function calls, etc */
2556 #endif /* NOTUNING */
2557 #endif /* CKTUNING */
2558 #endif /* CK_SMALL */
2560 #ifndef NOURL /* Parse URLs in SET HOST, etc */
2562 #define NO_FTP_AUTH /* No auth "ftp" / "anonymous" */
2566 #ifndef CK_TRIGGER /* Trigger string to exit CONNECT */
2567 #ifdef OS2ORUNIX /* OK for UNIX and K95 */
2570 #ifdef VMS /* and VMS */
2573 #ifdef datageneral /* and AOS/VS */
2575 #endif /* datageneral */
2576 #endif /* OS2ORUNIX */
2578 #endif /* CK_TRIGGER */
2579 #endif /* NOTRIGGER */
2582 #define TRIGGERS 8 /* How many triggers allowed */
2583 #endif /* CK_TRIGGER */
2585 #ifndef XLIMITS /* CONNECT limits */
2589 #endif /* XLIMITS */
2594 #endif /* NOBROWSER */
2598 #endif /* NOFRILLS */
2600 #ifndef NOHTTP /* HTTP features need... */
2601 #ifdef NOICP /* an interactive command parser */
2605 #ifndef OS2ORUNIX /* K95 or UNIX (because of */
2606 #define NOHTTP /* time functions, time_t, etc) */
2607 #endif /* OS2ORUNIX */
2615 /* The HTTP code is not very portable, so it must be asked for with -DCKHTTP */
2619 #ifdef SUNOS4 /* We can use it in SunOS */
2622 #ifdef SOLARIS /* And in Solaris */
2624 #endif /* SOLARIS */
2625 #ifdef LINUX /* And Linux */
2628 #ifdef HPUX10 /* And HP-UX 10 and above */
2631 #ifdef OS2 /* And in K-95 */
2634 #ifdef AIX41 /* In AIX 4.1 and higher */
2637 #ifdef UNIXWARE /* In Unixware 2.1 and higher */
2638 #define CKHTTP /* and probably also in 1.x and 2.0 */
2639 #endif /* UNIXWARE */
2642 #endif /* CK_SCOV5 */
2643 #ifdef OSF /* And in OSF Digital UNIX/True 64 */
2646 #ifdef ultrix /* And in Ultrix Mips */
2651 #ifdef __NetBSD__ /* NetBSD */
2653 #endif /* __NetBSD__ */
2656 #endif /* __FreeBSD__ */
2659 #endif /* __OpenBSD__ */
2660 /* Add more here... */
2662 #ifndef CKHTTP /* If CKHTTP not defined yet */
2663 #define NOHTTP /* then define NOHTTP */
2667 #ifdef NETCONN /* Special "network" types... */
2672 #endif /* NETFILE */
2684 #endif /* NOLOCAL */
2685 #endif /* NETCONN */
2692 #endif /* OS2ORUNIX */
2722 #endif /* BROWSER */
2729 #endif /* BROWSER */
2734 #endif /* BROWSER */
2735 #endif /* NOBROWSER */
2737 #else /* TCPSOCKET */
2738 #ifndef NOHTTP /* HTTP requires TCPSOCKET */
2741 #endif /* TCPSOCKET */
2745 #ifndef NOCKGETFQHOST
2747 #define NOCKGETFQHOST
2748 #else /* __ia64__ */
2750 #define NOCKGETFQHOST
2753 #define NOCKGETFQHOST
2754 #endif /* HPUXPRE65 */
2757 #endif /* NOCKGETFQHOST */
2759 Regarding System V/68 (SV68) (from Gerry Belanger, Oct 2002):
2761 1) The gethostbyname() appears to return the actual host IP
2762 address in the hostent struct, instead of the expected pointer
2763 to the address. Hence the bogus address in the bcopy/memcopy.
2764 This is despite the header agreeing with our expectations.
2766 2) the expected argument swap between bcopy and memcopy
2767 did not happen. What grief this might cause, I know not.
2769 #endif /* TCPSOCKET */
2775 #endif /* NOSOCKS */
2776 #endif /* OS2ONLY */
2780 #endif /* CK_SOCKS */
2783 #endif /* CK_SOCKS5 */
2788 #endif /* CK_SOCKS */
2790 #ifdef CK_SOCKS5 /* CK_SOCKS5 implies CK_SOCKS */
2793 #endif /* CK_SOCKS */
2794 #endif /* CK_SOCKS5 */
2795 #endif /* NOSOCKS */
2796 #endif /* TCPSOCKET */
2799 #ifndef CK_AUTHENTICATION
2821 #endif /* NO_SSL_KRB5 */
2822 #endif /* _M_ALPHA */
2825 #endif /* NO_KERBEROS */
2829 #define CK_AUTHENTICATION
2831 #endif /* CK_AUTHENTICATION */
2833 #ifdef CK_AUTHENTICATION /* Encryption must have Auth */
2834 #ifndef CK_ENCRYPTION
2835 #ifndef NO_ENCRYPTION
2837 #define CK_ENCRYPTION
2841 #endif /* NO_ENCRYPTION */
2842 #endif /* CK_ENCRYPTION */
2843 #endif /* CK_AUTHENTICATION */
2845 #ifdef NO_AUTHENTICATION /* Allow authentication to be */
2846 #ifdef CK_AUTHENTICATION /* disabled in NT and OS/2 */
2847 #undef CK_AUTHENTICATION
2848 #endif /* CK_AUTHENTICATION */
2851 #endif /* CK_KERBEROS */
2855 #ifdef CK_ENCRYPTION
2856 #undef CK_ENCRYPTION
2857 #endif /* CK_ENCRYPTION */
2858 #endif /* NO_AUTHENTICATION */
2860 #ifdef NO_ENCRYPTION /* Allow encryption to be */
2861 #ifdef CK_ENCRYPTION /* disabled in NT and OS/2 */
2862 #undef CK_ENCRYPTION
2863 #endif /* CK_ENCRYPTION */
2864 #endif /* NO_ENCRYPTION */
2866 #ifdef CK_KERBEROS /* Disable funcs not yet supported with Heimdal */
2870 #endif /* HEIMDAL */
2872 #endif /* CK_KERBEROS */
2875 SSH section. NOSSH disables any form of SSH support.
2876 If NOSSH is not defined (or implied by NONET, NOLOCAL, etc)
2877 then SSHBUILTIN is defined for K95 and SSHCMD is defined for UNIX.
2878 Then, if either SSHBUILTIN or SSHCMD is defined, ANYSSH is also defined.
2885 #endif /* OS2ONLY */
2896 #ifdef NOSSH /* NOSSH */
2897 #ifdef SSHBUILTIN /* undefines any SSH selctors */
2899 #endif /* SSHBUILTIN */
2902 #endif /* SFTP_BUILTIN */
2909 #else /* Not NOSSH */
2914 #endif /* SSHBUILTIN */
2932 #else /* SSHBUILTIN */
2936 #endif /* SSHBUILTIN */
2938 #endif /* NOLOCAL */
2941 /* This is in case #ifdef SSH is used anywhere in the K95 modules */
2948 #endif /* SSHBUILTIN */
2951 #ifdef CK_AUTHENTICATION
2955 #define CK_AUTHENTICATION
2958 #endif /* CK_AUTHENTICATION */
2960 /* Environment stuff */
2965 #endif /* NOPUTENV */
2966 #endif /* OS2ORUNIX */
2968 #ifndef CK_ENVIRONMENT
2970 #define CK_ENVIRONMENT
2973 #define CK_ENVIRONMENT
2976 #define CK_ENVIRONMENT
2979 #define CK_ENVIRONMENT
2981 #endif /* STRATUS */
2984 #endif /* CK_ENVIRONMENT */
2985 #ifndef NOSNDLOC /* RFC 779 SEND LOCATION */
2988 #endif /* CK_SNDLOC */
2989 #endif /* NOSNDLOC */
2990 #ifndef NOXDISPLOC /* RFC 1096 XDISPLOC */
2993 #endif /* CK_XDISPLOC */
2994 #endif /* NOXDISPLOC */
2998 #ifndef CK_FORWARD_X
2999 #ifdef CK_AUTHENTICATION
3001 #define CK_FORWARD_X
3002 #endif /* OS2ONLY */
3003 #endif /* CK_AUTHENTICATION */
3004 #endif /* CK_FORWARD_X */
3005 #endif /* NOSELECT */
3006 #endif /* NOPUTENV */
3007 #endif /* NOFORWARDX */
3012 #endif /* TN_COMPORT */
3013 #endif /* TCPSOCKET */
3014 #endif /* NO_COMPORT */
3018 #ifndef NOCTRLZ /* Allow SET FILE EOF CTRL-Z */
3022 #endif /* OS2ORUNIX */
3023 #endif /* CK_CTRLZ */
3024 #endif /* NOCTRLZ */
3027 #ifndef NOPERMS /* File permissions in A packets */
3036 #endif /* CK_PERMS */
3037 #endif /* NOPERMS */
3039 #define CK_PERMLEN 24 /* Max length of sys-dependent perms */
3040 #endif /* CK_PERMS */
3042 #ifdef UNIX /* NOSETBUF for everybody */
3044 #ifndef USE_SETBUF /* This is the escape clause */
3046 #endif /* USE_SETBUF */
3047 #endif /* NOSETBUF */
3050 #ifndef USE_STRERROR /* Whether to use strerror() */
3052 #define USE_STRERROR
3054 #endif /* USE_STRERROR */
3056 #ifdef VMS /* Features for all VMS builds */
3062 #endif /* NOSETBUF */
3065 #endif /* DYNAMIC */
3069 #endif /* CK_CURSES */
3070 #endif /* NOCURSES */
3073 #ifndef NOCKTIMERS /* Dynamic timeouts */
3076 #endif /* CK_TIMERS */
3077 #endif /* NOCKTIMERS */
3079 #define CK_SPEED /* Control-prefix removal */
3082 #endif /* NOCKSPEED */
3093 #endif /* CKXXCHAR */
3094 #endif /* NOCKXXCHAR */
3096 #ifdef MAC /* For Macintosh, no escape */
3097 #define NOPUSH /* to operating system */
3100 /* Systems where we can call zmkdir() to create directories. */
3121 #endif /* STRATUS */
3129 #endif /* datageneral */
3131 #endif /* CK_MKDIR */
3132 #endif /* NOMKDIR */
3134 #ifdef NOMKDIR /* Allow for command-line override */
3137 #endif /* CK_MKDIR */
3138 #endif /* NOMKDIR */
3140 /* Systems for which we can enable the REDIRECT command automatically */
3141 /* As of 6.0.193, it should work for all UNIX... */
3148 #ifdef OS2 /* As well as OS/2 and friends... */
3151 #endif /* CK_REDIR */
3152 #endif /* NOREDIRECT */
3154 #ifdef NOPUSH /* But... REDIRECT command is not */
3155 #ifdef CK_REDIR /* allowed if NOPUSH is defined. */
3157 #endif /* CK_REDIR */
3158 #ifdef NETCMD /* Nor is SET NET COMMAND */
3166 #ifndef PEXITSTAT /* \v(pexitstat) variable defined */
3173 #endif /* OS2ORUNIX */
3174 #endif /* PEXITSTAT */
3176 /* The following allows automatic enabling of REDIRECT to be overridden... */
3187 #endif /* CK_REDIR */
3188 #endif /* NOREDIRECT */
3197 #endif /* NONETCMD */
3200 _PROTOTYP( int ttruncmd, (char *) );
3201 #endif /* CK_REDIR */
3203 /* Use built-in DIRECTORY command */
3217 #endif /* UNIXOROSK */
3218 #endif /* DOMYDIR */
3219 #endif /* NOMYDIR */
3221 /* Sending from and receiving to commands/pipes */
3230 #endif /* PIPESEND */
3235 #endif /* NOPIPESEND */
3239 #endif /* PIPESEND */
3244 #endif /* BROWSER */
3247 /* Versions where we support the RESEND command */
3272 #endif /* datageneral */
3276 #endif /* STRATUS */
3282 #endif /* CK_RESEND */
3283 #endif /* NORESEND */
3286 /* Systems implementing "Doomsday Kermit" protocol ... */
3300 #endif /* STRATUS */
3304 #endif /* DOOMSDAY */
3306 /* Systems where we want the Thermometer to be used for fullscreen */
3311 #endif /* CK_PCT_BAR */
3314 /* Systems where we have a REXX command */
3321 #endif /* __32BIT__ */
3324 /* Platforms that have a ZCHKPID function */
3328 #endif /* OS2ORUNIX */
3331 /* If we can't check pids then we have treat all pids as active & valid. */
3332 #define zchkpid(x) 1
3333 #endif /* ZCHKPID */
3335 /* Systems that have a ZRENAME function */
3337 #define ZRENAME /* They all do */
3339 /* Systems that have a ZCOPY function */
3353 #endif /* STRATUS */
3359 /* Systems that have ttgwsiz() (they all should but they don't) */
3378 #endif /* CK_TTGWSIZ */
3379 #endif /* NOTTGWSIZ */
3384 #endif /* CK_TTGWSIZ */
3385 #endif /* NOTTGWSIZ */
3388 /* OS/2 C-Kermit features not available in 16-bit version... */
3393 #ifdef PCFONTS /* PC Font support */
3395 #endif /* PCFONTS */
3396 #ifdef NPIPE /* Named Pipes communication */
3399 #ifdef CK_NETBIOS /* NETBIOS communication */
3401 #endif /* CK_NETBIOS */
3402 #ifdef OS2MOUSE /* Mouse */
3404 #endif /* OS2MOUSE */
3405 #ifdef OS2PM /* Presentation Manager */
3408 #endif /* NOLOCAL */
3409 #ifdef CK_REXX /* Rexx */
3411 #endif /* CK_REXX */
3412 #endif /* __32BIT__ */
3413 #endif /* OS2ONLY */
3415 /* OS/2 C-Kermit features not available in Windows NT version... */
3418 #ifdef PCFONTS /* PC Font support */
3420 #endif /* PCFONTS */
3421 #ifdef OS2PM /* Presentation Manager */
3424 #ifdef CK_REXX /* Rexx */
3426 #endif /* CK_REXX */
3431 Systems that have select().
3432 This is used for both msleep() and for read-buffer checking in in_chk().
3434 #define CK_SLEEPINT 250 /* milliseconds - set this to something that
3435 divides evenly into 1000 */
3452 Not really. I think it's only in HP-UX 7.0 and later, except it's also
3453 in earlier versions that have TCP/IP installed. Override this default
3454 in particular HP-UX makefile entries by adding -DNOSELECT, as in (e.g.)
3485 #endif /* __linux__ */
3487 #endif /* NOSELECT */
3491 The following section moved here from ckcnet.h in 6.1 because select()
3492 is now used for non-networking purposes.
3495 /* On HP-9000/500 HP-UX 5.21 this stuff is not defined in any header file */
3498 #ifndef NEEDSELECTDEFS
3499 #define NEEDSELECTDEFS
3500 #endif /* NEEDSELECTDEFS */
3501 #endif /* hp9000s500 */
3503 #ifdef NEEDSELECTDEFS
3504 typedef long fd_mask;
3509 #define FD_SETSIZE 32
3510 #endif /* FD_SETSIZE */
3512 #define NFDBITS (sizeof(fd_mask) * NBBY)
3513 #endif /* NFDBITS */
3515 #define howmany(x,y) (((x)+((y)-1))/(y))
3516 #endif /* howmany */
3517 typedef struct fd_set {
3518 fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
3521 #define FD_SET(n,p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
3524 #define FD_CLR(n,p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
3527 #define FD_ISSET(n,p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
3528 #endif /* FD_ISSET */
3530 #define FD_COPY(f,t) (bcopy(f,t,sizeof(*(f)))
3531 #endif /* FD_COPY */
3533 #define FD_ZERO(p) bzero((char *)(p),sizeof(*(p)))
3534 #endif /* FD_ZERO */
3535 #endif /* NEEDSELECTDEFS */
3538 CK_NEED_SIG is defined if the system cannot check the console to
3539 to see if characters are waiting. This is used during local-mode file
3540 transfer to interrupt the transfer, refresh the screen display, etc.
3541 If CK_NEED_SIG is defined, then file-transfer interruption characters
3542 have to be preceded a special character, e.g. the SIGQUIT character.
3543 CK_NEED_SIG should be defined if the conchk() function is not operational.
3545 #ifdef NOPOLL /* For overriding CK_POLL definition */
3548 #endif /* CK_POLL */
3551 #ifndef CK_POLL /* If we don't have poll() */
3552 #ifndef RDCHK /* And we don't have rdchk() */
3553 #ifndef SELECT /* And we don't have select() */
3560 #endif /* datageneral */
3566 #endif /* CK_NEED_SIG */
3570 #endif /* CK_POLL */
3572 #ifdef HPUX /* HP-UX has select() */
3575 #endif /* CK_NEED_SIG */
3578 #ifdef AIXRS /* AIX has select() */
3581 #endif /* CK_NEED_SIG */
3584 #ifdef BSD44 /* 4.4BSD has FIONREAD */
3587 #endif /* CK_NEED_SIG */
3590 #ifdef QNX /* QNX has FIONREAD and select() */
3593 #endif /* CK_NEED_SIG */
3599 #endif /* NOTIMEZONE */
3600 #endif /* COHERENT */
3603 #ifndef HAVE_TZ /* Can we use struct timezone? */
3614 #endif /* BELLV10 */
3615 #endif /* COHERENT */
3618 #endif /* NOTIMEZONE */
3619 #endif /* HAVE_TZ */
3620 #ifndef NOTIMEVAL /* Can we use struct timeval? */
3623 #endif /* HAVE_TV */
3624 #endif /* NOTIMEVAL */
3628 #endif /* HAVE_TZ */
3629 #endif /* NOTIMEZONE */
3635 #endif /* HAVE_TV */
3638 #endif /* HAVE_TZ */
3641 #endif /* NOTIMEVAL */
3644 #endif /* NOTIMEZONE */
3650 #endif /* HAVE_TV */
3653 #endif /* HAVE_TZ */
3656 #endif /* NOTIMEVAL */
3659 #endif /* NOTIMEZONE */
3660 #endif /* ATT7300 */
3663 Automatic parity detection.
3664 This actually implies a lot more now: length-driven packet reading,
3665 "Doomsday Kermit" IBM Mainframe file transfer through 3270 data streams, etc.
3667 #ifdef UNIX /* For Unix */
3670 #endif /* NOPARSEN */
3673 #ifdef VMS /* ... and VMS */
3676 #endif /* NOPARSEN */
3679 #endif /* __GNUC__ */
3682 #ifdef MAC /* and Macintosh */
3685 #endif /* NOPARSEN */
3688 #ifdef STRATUS /* and Stratus VOS */
3691 #endif /* NOPARSEN */
3692 #endif /* STRATUS */
3694 #ifdef OS2 /* and OS/2, finally */
3697 #endif /* NOPARSEN */
3700 #ifndef NODYNAMIC /* DYNAMIC is default for UNIX */
3701 #ifndef DYNAMIC /* as of C-Kermit 7.0 */
3705 #endif /* DYNAMIC */
3706 #endif /* NODYNAMIC */
3708 #ifdef DYNAMIC /* If DYNAMIC is defined */
3709 #define DCMDBUF /* then also define this. */
3710 #endif /* DYNAMIC */
3712 #ifndef CK_LBRK /* Can send Long BREAK */
3714 #ifdef UNIX /* (everybody but OS-9) */
3722 #endif /* datageneral */
3734 #endif /* STRATUS */
3736 #endif /* CK_LBRK */
3738 /* Carrier treatment */
3739 /* These are defined here because they are shared by the system dependent */
3740 /* and the system independent modules. */
3742 #define CAR_OFF 0 /* Off: ignore carrier always. */
3743 #define CAR_ON 1 /* On: heed carrier always, except during DIAL. */
3744 #define CAR_AUT 2 /* Auto: heed carrier, but only if line is declared */
3745 /* to be a modem line, and only during CONNECT. */
3747 /* And more generically (for use with any ON/OFF/AUTO feature) */
3754 Serial interface speeds available.
3756 As of C-Kermit 6.1 there is a new method to get the supported
3757 speeds, which obviates the need for all the craziness below. At runtime,
3758 just call the new ttspdlist() routine to get a list of supported speeds.
3759 Then the user interface module can build a keyword table or menu from it.
3762 #ifdef UNIX /* For now, only for UNIX */
3763 #ifndef OLINUXHISPEED /* But not systems with hacks for */
3764 #ifndef MINIX /* high speeds, like 110 = 115200 */
3767 #endif /* OLINUXHISPEED */
3770 #define TTSPDLIST /* VMS gets it too */
3773 #endif /* TTSPDLIST */
3775 #ifndef NODIAL /* Hangup by modem command */
3780 #endif /* NOMDMHUP */
3784 #ifndef NOLOGDIAL /* Connection log needs mjd(), etc. */
3786 #endif /* NOLOGDIAL */
3793 #ifndef NOLOGDIAL /* Connection log */
3795 #define CXLOGFILE "CX.LOG" /* Default connection log file name */
3796 #endif /* CXLOGFILE */
3800 #define CXLOGBUFL 1024 /* Connection log record buffer size */
3801 #endif /* CK_SMALL */
3802 #endif /* NOLOGDIAL */
3803 #endif /* CKLOGDIAL */
3805 #endif /* NOLOCAL */
3807 #ifdef NOTTSPDLIST /* Except if NOTTSPDLIST is defined */
3810 #endif /* TTSPDLIST */
3811 #endif /* NOTTSPDLIST */
3815 _PROTOTYP( long * ttspdlist, (void) );
3817 #else /* TTSPDLIST not defined */
3819 We must use a long and convoluted series of #ifdefs that have to be kept in
3820 sync with the code in the ck?tio.c module.
3822 We assume that everybody supports: 0, 110, 300, 600, 1200, 2400, 4800, and
3823 9600 bps. Symbols for other speeds are defined here. You can also add
3824 definitions on the CC command lines. These definitions affect the SET SPEED
3825 keyword table, and are not necessarily usable in the system-dependent
3826 speed-setting code in the ck?tio.c modules, which depends on system-specific
3827 symbols like (in UNIX) B19200. In other words, just defining it doesn't
3828 mean it'll work -- you also have to supply the supporting code in ttsspd()
3829 and ttgspd() in ck?tio.c.
3831 The symbols have the form BPS_xxxx, where xxxx is the speed in bits per
3832 second, or (for bps values larger than 9999) thousands of bps followed by K.
3833 The total symbol length should be 8 characters or less. Some values are
3834 enabled automatically below. You can disable a particular value by defining
3835 NOB_xxxx on the CC command line.
3840 #define BPS_50 /* 50 bps */
3844 #define BPS_75 /* 75 bps */
3849 #define BPS_7512 /* 75/1200 Split Speed */
3851 #endif /* NOB7512 */
3857 #undef BPS_134 /* 134.5 bps (IBM 2741) */
3858 #endif /* BPS_134 */
3862 #define BPS_150 /* 150 bps */
3866 #define BPS_200 /* 200 bps */
3871 #define BPS_1800 /* 1800 bps */
3881 #define BPS_3600 /* 3600 bps */
3887 #define BPS_7200 /* 7200 bps */
3888 #endif /* SOLARIS25 */
3893 #define BPS_14K /* 14400 bps */
3911 #endif /* NOB_14K */
3914 #define BPS_19K /* 19200 bps */
3925 #define BPS_28K /* 28800 bps */
3928 #define BPS_28K /* 28800 bps */
3933 #endif /* NOB_28K */
3936 #define BPS_38K /* 38400 bps */
3947 #define BPS_57K /* 57600 bps */
3988 #endif /* SCO_OSR504 */
3990 #endif /* BEOSORBEBOX */
3993 #endif /* __NetBSD__ */
3994 #endif /* __FreeBSD__ */
3995 #endif /* __386BSD__ */
3998 #endif /* __linux__ */
4001 #endif /* SOLARIS25 */
4003 #endif /* NOB_57K */
4014 #endif /* SOLARIS25 */
4016 #define BPS_76K /* 76800 bps */
4021 #endif /* __32BIT__ */
4031 #endif /* SCO_OSR504 */
4032 #endif /* NOB_76K */
4043 #endif /* SOLARIS25 */
4045 #define BPS_115K /* 115200 bps */
4068 #endif /* __32BIT__ */
4078 #endif /* SCO_OSR504 */
4080 #endif /* BEOSORBEBOX */
4082 #endif /* __NetBSD__ */
4083 #endif /* __FreeBSD__ */
4084 #endif /* __386BSD__ */
4085 #endif /* __linux__ */
4089 #endif /* NOB_115K */
4091 #ifndef NOB_230K /* 230400 bps */
4107 #endif /* __32BIT__ */
4111 #endif /* SOLARIS25 */
4112 #endif /* __linux__ */
4113 #endif /* SCO_OSR504 */
4115 #endif /* NOB_230K */
4117 #ifndef NOB_460K /* 460800 bps */
4127 #endif /* __32BIT__ */
4130 #endif /* __linux__ */
4131 #endif /* SCO_OSR504 */
4133 #endif /* NOB_460K */
4135 #ifndef NOB_921K /* 921600 bps */
4138 #endif /* SCO_OSR504 */
4139 #endif /* NOB_921K */
4141 #ifdef BPS_921K /* Maximum speed defined */
4142 #define MAX_SPD 921600L
4145 #define MAX_SPD 460800L
4148 #define MAX_SPD 230400L
4151 #define MAX_SPD 115200L
4154 #define MAX_SPD 76800L
4157 #define MAX_SPD 57600L
4160 #define MAX_SPD 38400L
4163 #define MAX_SPD 28800L
4166 #define MAX_SPD 19200L
4169 #define MAX_SPD 14400L
4171 #define MAX_SPD 9600L
4182 #endif /* TTSPDLIST */
4184 #ifndef CONGSPD /* Systems that can call congspd() */
4193 #endif /* STRATUS */
4194 #endif /* CONGSPD */
4196 /* Types of flow control available */
4198 #define CK_XONXOFF /* Everybody can do this, right? */
4200 #ifdef AMIGA /* Commodore Amiga */
4201 #define CK_RTSCTS /* has RTS/CTS */
4204 #ifdef SUN4S5 /* SunOS in System V environment */
4206 #else /* SunOS 4.0/4.1 in BSD environment */
4207 #ifdef SUNOS4 /* SunOS 4.0+later supports RTS/CTS */
4208 #ifdef SUNOS41 /* Easy in 4.1 and later */
4210 #else /* Harder in 4.0 */
4211 #ifndef __GNUC__ /* (see tthflow() in ckutio.c) */
4213 #define CK_RTSCTS /* Only if not using GNU gcc */
4214 #endif /* __GNUC__ */
4216 #endif /* SUNOS41 */
4220 #ifdef BSD44 /* And in 4.4 BSD, including BSDI */
4224 #ifdef TERMIOX /* Sys V R4 <termiox.h> */
4227 #endif /* CK_RTSCTS */
4230 #endif /* CK_DTRCD */
4232 #ifdef STERMIOX /* Sys V R4 <sys/termiox.h> */
4235 #endif /* CK_RTSCTS */
4238 #endif /* CK_DTRCD */
4239 #endif /* STERMIOX */
4240 #endif /* TERMIOX */
4242 #ifdef OXOS /* Olivetti X/OS R2 struct termios */
4243 #define CK_RTSCTS /* Ditto. */
4247 #ifdef AIXRS /* RS/6000 with AIX 3.x */
4248 #define CK_RTSCTS /* Has its own peculiar method... */
4251 #ifdef __linux__ /* Linux */
4253 #endif /* __linux__ */
4255 Hardware flow control is not defined in POSIX.1. Nevertheless, a certain
4256 style API for hardware flow control, using tcsetattr() and the CRTSCTS
4257 bit(s), seems to be gaining currency on POSIX-based UNIX systems. The
4258 following code defines the symbol POSIX_CRTSCTS for such systems.
4261 #ifdef __bsdi__ /* BSDI, a.k.a. BSD/386 */
4262 #define POSIX_CRTSCTS
4263 #endif /* __bsdi__ */
4264 #ifdef __linux__ /* Linux */
4265 #define POSIX_CRTSCTS
4266 #endif /* __linux__ */
4267 #ifdef __NetBSD__ /* NetBSD */
4268 #define POSIX_CRTSCTS
4269 #endif /* __NetBSD__ */
4271 #define POSIX_CRTSCTS
4272 #endif /* __OpenBSD__ */
4273 #ifdef BEOSORBEBOX /* BeBOX */
4274 #define POSIX_CRTSCTS
4275 /* BEBOX defines CRTSFL as (CTSFLOW & RTSFLOW) */
4276 #define CRTSCTS CRTSFL
4277 #endif /* BEOSORBEBOX */
4278 #ifdef IRIX52 /* IRIX 5.2 and later */
4279 #define POSIX_CRTSCTS
4280 #define CRTSCTS CNEW_RTSCTS /* See <sys/termios.h> */
4282 #endif /* CK_RTSCTS */
4284 /* Implementations that have implemented the ttsetflow() function. */
4286 #ifndef CK_TTSETFLOW
4288 #define CK_TTSETFLOW
4291 #define CK_TTSETFLOW
4293 #endif /* CK_TTSETFLOW */
4296 _PROTOTYP( int ttsetflow, (int) );
4297 #endif /* CK_TTSETFLOW */
4299 Systems where we can expand tilde at the beginning of file or directory names
4321 #ifdef HPUX /* I don't know why this is */
4322 #ifndef DTILDE /* necessary, since -DHPUX */
4323 #define DTILDE /* automatically defines ATTSV */
4324 #endif /* DTILDE */ /* (see above) ... */
4328 This is mainly for the benefit of ckufio.c (UNIX and OS/2 file support).
4329 Systems that have an atomic rename() function, so we don't have to use
4330 link() and unlink().
4348 #endif /* SUNOS41 */
4368 #ifdef NORENAME /* Allow for compile-time override */
4372 #endif /* NORENAME */
4374 #ifdef STRATUS /* Stratus VOS */
4378 #endif /* STRATUS */
4380 /* Line delimiter for text files */
4383 If the system uses a single character for text file line delimitation,
4384 define NLCHAR to the value of that character. For text files, that
4385 character will be converted to CRLF upon output, and CRLF will be converted
4386 to that character on input during text-mode (default) packet operations.
4388 #ifdef MAC /* Macintosh */
4391 #ifdef OSK /* OS-9/68K */
4393 #else /* All Unix-like systems */
4399 At this point, if there's a system that uses ordinary CRLF line
4400 delimitation AND the C compiler actually returns both the CR and
4401 the LF when doing input from a file, then #undef NLCHAR.
4403 #ifdef OS2 /* OS/2 */
4407 #ifdef GEMDOS /* Atari ST */
4412 VMS file formats are so complicated we need to do all the conversion
4413 work in the CKVFIO module, so we tell the rest of C-Kermit not to fiddle
4421 /* The device name of a job's controlling terminal */
4422 /* Special for VMS, same for all Unixes (?), not used by Macintosh */
4425 #define CTTNAM dftty
4428 #define CTTNAM "SYS$INPUT:" /* (4 Jan 2002) Was TT: */
4431 #define CTTNAM "@output"
4434 extern char myttystr[];
4435 #define CTTNAM myttystr
4438 #define CTTNAM "con"
4441 #define CTTNAM "/dev/tty"
4444 #define CTTNAM "aux:"
4447 extern char myttystr[];
4448 #define CTTNAM myttystr
4449 #else /* Anyone else... */
4450 #define CTTNAM "stdout" /* This is a kludge used by Mac */
4451 #endif /* STRATUS */
4456 #endif /* datageneral */
4468 #endif /* HAVECTTNAM */
4470 #ifndef ZFCDAT /* zfcdat() function available? */
4492 #endif /* datageneral */
4496 #endif /* STRATUS */
4501 #define tolower _tolower
4502 #define toupper _toupper
4503 #endif /* SUNS4S5 */
4508 #ifdef _CRAYCOM /* Cray Computer Corp. */
4510 #else /* _CRAYCOM */
4511 #include <errno.h> /* Cray Research UNICOS defines */
4512 /* errno as a function. */
4513 #endif /* _CRAYCOM */ /* OK for UNICOS 6.1 and 7.0. */
4515 #ifdef STRATUS /* Stratus VOS */
4517 #else /* not STRATUS */
4522 "glibc uses threads, kermit uses glibc; errno access is in Thread Local
4523 Storage (TLS) from glibc-3.2.2. ...a thread specific errno is being run in
4524 thread local storage relative to the %gs segment register, so some means to
4525 revector gets/puts needs to be done." - Jeff Johnson, Red Hat, Feb 2003.
4530 The following declaration would cause problems for VMS and OS/2, in which
4531 errno is an "extern volatile int noshare"... NOTE: by now (2007) the
4532 following is an anachronism and should be the execption rather than the
4536 #endif /* __GLIBC__ */
4539 #endif /* STRATUS */
4542 #ifdef UNIX /* Catch-all so we can have */
4543 #ifndef ESRCH /* access to error mnemonics */
4544 #include <errno.h> /* in all modules - 2007/08/25 */
4548 #ifdef pdp11 /* Try to make some space on PDP-11 */
4554 #endif /* NOCURSES */
4557 #endif /* NOBIGBUF */
4561 #ifndef BIGBUFOK /* Platforms with lots of memory */
4563 #ifdef QNX /* QNX */
4564 #ifndef QNX16 /* But not 16-bit versions */
4573 #ifdef STRATUS /* Stratus VOS */
4575 #endif /* STRATUS */
4577 #ifdef sparc /* SPARC processors */
4581 #ifdef mips /* MIPS processors */
4585 #ifdef HPUX9 /* HP-UX 9.x */
4589 #ifdef HPUX10 /* HP-UX 10.0 PA-RISC */
4593 #ifdef NEXT /* NeXTSTEP */
4594 #ifdef mc68000 /* on NEXT platforms... */
4596 #endif /* mc68000 */
4599 #ifdef LINUX /* Linux in 1998 should be OK */
4602 #endif /* BIGBUFOK */
4605 #ifdef OS2 /* 32-bit OS/2 2.x and above */
4608 #endif /* __32BIT__ */
4614 #ifdef Plan9 /* Plan 9 is OK */
4618 #ifdef VMS /* Any VMS is OK */
4621 #endif /* BIGBUFOK */
4624 #ifdef __alpha /* DEC 64-bit Alpha, e.g. OSF/1 */
4625 #ifndef BIGBUFOK /* Might already be defined for VMS */
4627 #endif /* BIGBUFOK */
4628 #endif /* __alpha */
4630 #ifdef sgi /* SGI with IRIX 4.0 or later */
4633 #endif /* BIGBUFOK */
4636 #ifdef AIXRS /* AIX on RISC */
4640 #ifdef CK_SCOV5 /* SCO OSR5 */
4643 #endif /* BIGBUFOK */
4644 #endif /* CK_SCOV5 */
4646 #ifdef SOLARIS /* Solaris x86 */
4649 #endif /* BIGBUFOK */
4650 #endif /* SOLARIS */
4652 #endif /* BIGBUFOK */
4653 #endif /* NOBIGBUF */
4658 #endif /* BIGBUFOK */
4659 #endif /* CK_SMALL */
4661 /* If "memory is no problem" then this improves performance */
4667 #endif /* IFDEBUG */
4668 #endif /* BIGBUFOK */
4671 /* File System Defaults */
4673 #ifndef UIDBUFLEN /* Length of User ID */
4675 #define UIDBUFLEN 256
4678 #define UIDBUFLEN 256
4680 #define UIDBUFLEN 64
4681 #endif /* BIGBUFOK */
4683 #endif /* UIDBUFLEN */
4693 #define MAXWLD 102400
4696 #endif /* BIGBUFOK */
4701 #define MAXWLD 102400 /* Maximum wildcard filenames */
4708 #endif /* STRATUS */
4709 #endif /* datageneral */
4721 /* Communication device / network host name length */
4724 #define TTNAMLEN 512
4727 #define TTNAMLEN 256
4730 #define TTNAMLEN 128
4733 #endif /* CK_SMALL */
4735 #endif /* BIGBUFOK */
4737 /* Program return codes for DECUS C and UNIX (VMS uses UNIX codes) */
4740 #define GOOD_EXIT IO_NORMAL
4741 #define BAD_EXIT IO_ERROR
4747 /* Special hack for Fortune, which doesn't have <sys/file.h>... */
4754 /* Special hack for OS-9/68k */
4757 #define SIGALRM 30 /* May always cancel I/O */
4759 #define SIGARB 1234 /* Arbitrary for I/O */
4760 SIGTYP (*signal())();
4766 #endif /* putchar */
4767 #define putchar(c) (putc(c,stdout)!=EOF)&&fflush(stdout)
4770 #ifdef datageneral /* Data General AOS/VS */
4773 #endif /* putchar */
4774 #define putchar(c) conoc(c)
4775 #endif /* datageneral */
4777 /* Escape/quote character used by the command parser */
4781 /* Symbols for RS-232 modem signals */
4783 #define KM_FG 1 /* Frame ground */
4784 #define KM_TXD 2 /* Transmit */
4785 #define KM_RXD 3 /* Receive */
4786 #define KM_RTS 4 /* Request to Send */
4787 #define KM_CTS 5 /* Clear to Send */
4788 #define KM_DSR 6 /* Data Set Ready */
4789 #define KM_SG 7 /* Signal ground */
4790 #define KM_DCD 8 /* Carrier Detect */
4791 #define KM_DTR 20 /* Data Terminal Ready */
4792 #define KM_RI 22 /* Ring Indication */
4794 /* Bit mask values for modem signals */
4796 #define BM_CTS 0001 /* Clear to send (From DCE) */
4797 #define BM_DSR 0002 /* Dataset ready (From DCE) */
4798 #define BM_DCD 0004 /* Carrier (From DCE) */
4799 #define BM_RNG 0010 /* Ring Indicator (From DCE) */
4800 #define BM_DTR 0020 /* Data Terminal Ready (From DTE) */
4801 #define BM_RTS 0040 /* Request to Send (From DTE) */
4803 /* Codes for full duplex flow control */
4805 #define FLO_NONE 0 /* None */
4806 #define FLO_XONX 1 /* Xon/Xoff (soft) */
4807 #define FLO_RTSC 2 /* RTS/CTS (hard) */
4808 #define FLO_DTRC 3 /* DTR/CD (hard) */
4809 #define FLO_ETXA 4 /* ETX/ACK (soft) */
4810 #define FLO_STRG 5 /* String-based (soft) */
4811 #define FLO_DIAL 6 /* DIALing kludge */
4812 #define FLO_DIAX 7 /* Cancel dialing kludge */
4813 #define FLO_DTRT 8 /* DTR/CTS (hard) */
4814 #define FLO_KEEP 9 /* Keep, i.e. don't touch or change */
4815 #define FLO_AUTO 10 /* Figure out automatically */
4817 /* Types of connections */
4819 #define CXT_REMOTE 0 /* Remote mode - no connection */
4820 #define CXT_DIRECT 1 /* Direct serial connection */
4821 #define CXT_MODEM 2 /* Modem dialout */
4822 #define CXT_TCPIP 3 /* TCP/IP - Telnet, Rlogin, etc */
4823 #define CXT_X25 4 /* X.25 peer-to-peer */
4824 #define CXT_DECNET 5 /* DECnet (CTERM, etc) */
4825 #define CXT_LAT 6 /* LAT */
4826 #define CXT_NETBIOS 7 /* NETBIOS */
4827 #define CXT_NPIPE 8 /* Named Pipe */
4828 #define CXT_PIPE 9 /* Pipe, Command, PTY, DLL, etc */
4829 #define CXT_SSH 10 /* SSH */
4830 #define CXT_MAX 10 /* Highest connection type */
4832 /* Autodownload Detection Options */
4834 #define ADL_PACK 0 /* Auto-Download detect packet */
4835 #define ADL_STR 1 /* Auto-Download detect string */
4837 /* And finally... */
4839 #ifdef COMMENT /* Make sure this is NOT defined! */
4841 #endif /* COMMENT */
4843 /* zstr zattr filinfo were here (moved to top for DECC 5 Jun 2000) */
4845 #ifndef ZFNQFP /* Versions that have zfnqfp() */
4860 #endif /* STRATUS */
4861 #endif /* datageneral */
4866 int len; /* Length of full pathname */
4867 char * fpath; /* Pointer to full pathname */
4868 char * fname; /* Pointer to name part */
4872 /* Systems that support FILE TYPE LABELED */
4882 #endif /* __32BIT__ */
4886 /* LABELED FILE options bitmask */
4888 #ifdef VMS /* For VMS */
4889 #define LBL_NAM 1 /* Ignore incoming name if set */
4890 #define LBL_PTH 2 /* Use complete path if set */
4891 #define LBL_ACL 4 /* Preserve ACLs if set */
4892 #define LBL_BCK 8 /* Preserve backup date if set */
4893 #define LBL_OWN 16 /* Preserve ownership if set */
4897 #ifdef OS2 /* Ditto for OS/2 */
4898 #define LBL_NOR 0x0000 /* Normal file */
4899 #define LBL_ARC 0x0020 /* Archive */
4900 #define LBL_DIR 0x0010 /* Directory */
4901 #define LBL_HID 0x0002 /* Hidden file */
4902 #define LBL_RO 0x0001 /* Read only file */
4903 #define LBL_SYS 0x0004 /* System file */
4904 #define LBL_EXT 0x0040 /* Extended */
4909 Data types. First the header file for data types so we can pick up the
4910 types used for pids, uids, and gids. Override this section by putting
4911 -DCKTYP_H=xxx on the command line to specify the header file where your
4912 system defines these types.
4918 #endif /* MULTINET */
4919 #endif /* __ALPHA */
4921 #ifdef CK_TGV_AXP /* Alpha, VMS, MultiNet */
4923 Starting in DECC 5.0, <stdlib.h> no longer includes <types.h>.
4924 But before that an elaborate workaround is required, which results in
4925 including <types.h> sometimes but not others, evidently depending on whether
4926 <types.h> protects itself against multiple inclusion, which in turn probably
4927 differentiates between DECC <types.h> and TGV <types.h>. Unfortunately I
4928 don't remember the details. (fdc, 25 Oct 96)
4932 Previously the test here was for DEC version prior to 4.0, but since the
4933 test involved an "#if" statement, it was not portable and broke some non-VMS
4934 builds. In any case, condition was never satisfied, so the result of
4935 commenting this section out is the same as the previous "#if" condition.
4937 #ifndef __TYPES_LOADED
4938 #define __TYPES_LOADED /* Work around bug in .h files */
4939 #endif /* __TYPES_LOADED */
4940 #endif /* COMMENT */
4941 #include <sys/types.h>
4944 #include <if.h> /* Needed to put up u_int typedef */
4945 #endif /* MULTINET */
4946 #else /* IF_DOT_H */
4948 typedef unsigned int u_int;
4949 #endif /* NEEDUINT */
4950 #endif /* IF_DOT_H */
4951 #else /* !CK_TGV_AXP */
4952 #ifdef OSK /* OS-9 */
4954 #else /* General case, not OS-9 */
4959 #define CKTYP_H <sys/types.h>
4963 #endif /* CKTYP_H */
4972 #include <sys/types.h>
4975 #ifdef CKTYP_H /* Include it. */
4976 #ifdef COHERENT /* Except for COHERENT */
4978 #include <sys/types.h>
4980 #ifdef datageneral /* AOS/VS */
4981 #include <sys/types.h>
4982 #else /* All others */
4983 #ifdef __bsdi__ /* BSDI */
4985 #undef _POSIX_SOURCE
4987 #endif /* __bsdi__ */
4991 #define _POSIX_SOURCE
4993 #endif /* __bsdi__ */
4994 #endif /* datageneral */
4995 #endif /* COHERENT */
4996 #endif /* CKTYP_H */
4999 #endif /* CK_TGV_AXP */
5000 #endif /* STRATUS */ /* End of types.h section */
5003 File lengths and offsets. This section is expected to grow as we
5004 support long files on 32-bit platforms. We want this data type to be
5005 signed because so many functions return either a file size or a negative
5006 value to indicate an error.
5011 #define CK_OFF_T __int64
5013 #define CK_OFF_T long
5016 #endif /* CK_OFF_T */
5018 /* FreeBSD and OpenBSD set off_t to the appropriate size unconditionally */
5022 #define CK_OFF_T off_t
5025 #define CK_OFF_T off_t
5026 #endif /* __OpenBSD__ */
5027 #endif /* __FreeBSD__ */
5028 #endif /* CK_OFF_T */
5030 /* 32-bit platforms that support long files thru "transitional interface" */
5031 /* These include Linux, Solaris, NetBSD... */
5036 #define CK_OFF_T off_t
5037 #endif /* CK_OFF_T */
5038 #endif /* _LARGE_FILES */
5041 #ifdef _LARGEFILE_SOURCE
5043 #define CK_OFF_T off_t
5044 #endif /* CK_OFF_T */
5046 #define CKFSEEK(a,b,c) fseek64(a,b,c)
5047 #define CKFTELL(a) ftell64(a)
5049 #define CKFSEEK(a,b,c) fseeko(a,b,c)
5050 #define CKFTELL(a) ftello(a)
5052 #else /* Not _LARGEFILE_SOURCE */
5053 #define CKFSEEK(a,b,c) fseek(a,b,c)
5054 #define CKFTELL(a) ftell(a)
5055 /* See below the next section for the catch-all case */
5056 #endif /* _LARGEFILE_SOURCE */
5058 /* 32-bit or 64-bit platforms */
5060 /* CK_64BIT is a compile-time symbol indicating a true 64-bit build */
5061 /* meaning that longs and pointers are 64 bits */
5063 #ifndef VMS /* VMS Alpha and IA64 are 32-bit! */
5065 #ifdef _LP64 /* Solaris */
5068 #ifdef __LP64__ /* MacOS X 10.4 (or _LP64,__ppc64__) */
5071 #ifdef __arch64__ /* gcc alpha, sparc */
5074 #ifdef __alpha /* Alpha decc (or __ALPHA) */
5077 #ifdef __amd64 /* AMD x86_64 (or __x86_64) */
5080 #ifdef __ia64 /* Intel IA64 */
5085 #endif /* __amd64 */
5086 #endif /* __alpha */
5087 #endif /* __arch64__ */
5088 #endif /* __LP64__ */
5090 #endif /* CK_64BIT */
5095 #define CK_OFF_T off_t /* This has to be signed */
5096 #else /* CK_64BIT */
5097 #define CK_OFF_T long /* Signed */
5098 #endif /* CK_64BIT */
5099 #endif /* CK_OFF_T */
5102 #define tlog(a,b,c,d)
5105 /* Debugging included. Declare debug log flag in main program only. */
5106 extern int tralog, tlogfmt;
5108 _PROTOTYP(VOID dotlog,(int, char *, char *, CK_OFF_T));
5109 #define tlog(a,b,c,d) if (tralog && tlogfmt) dotlog(a,b,c,(CK_OFF_T)d)
5110 _PROTOTYP(VOID doxlog,(int, char *, CK_OFF_T, int, int, char *));
5114 /* Compile all the debug() statements away. Saves a lot of space and time. */
5115 #define debug(a,b,c,d)
5116 #define ckhexdump(a,b,c)
5117 /* Now define the debug() macro. */
5119 _PROTOTYP(int dodebug,(int,char *,char *,CK_OFF_T));
5120 _PROTOTYP(int dohexdump,(CHAR *,CHAR *,int));
5122 /* Use this form to avoid function calls: */
5124 #define debug(a,b,c,d) if (deblog) dodebug(a,b,(char *)(c),(CK_OFF_T)(d))
5125 #define ckhexdump(a,b,c) if (deblog) dohexdump((CHAR *)(a),(CHAR *)(b),c)
5128 #define debug(a,b,c,d) \
5129 ((void)(deblog?dodebug(a,b,(char *)(c),(CK_OFF_T)(d)):0))
5130 #define ckhexdump(a,b,c) \
5131 ((void)(deblog?dohexdump((CHAR *)(a),(CHAR *)(b),c):0))
5133 #define debug(a,b,c,d) (deblog?dodebug(a,b,(char *)(c),(CK_OFF_T)(d)):0)
5134 #define ckhexdump(a,b,c) (deblog?dohexdump((CHAR *)(a),(CHAR *)(b),c):0)
5135 #endif /* CK_ANSIC */
5136 #endif /* COMMENT */
5138 /* Use this form to save space: */
5139 #define debug(a,b,c,d) dodebug(a,b,(char *)(c),(CK_OFF_T)(d))
5140 #define ckhexdump(a,b,c) dohexdump((CHAR *)(a),(CHAR *)(b),c)
5141 #endif /* IFDEBUG */
5145 /* Structure definitions for Kermit file attributes */
5146 /* All strings come as pointer and length combinations */
5147 /* Empty string (or for numeric variables, -1) = unused attribute. */
5149 struct zstr { /* string format */
5150 int len; /* length */
5151 char *val; /* value */
5154 struct zattr { /* Kermit File Attribute structure */
5155 CK_OFF_T lengthk; /* (!) file length in K */
5156 struct zstr type; /* (") file type (text or binary) */
5157 struct zstr date; /* (#) file creation date yyyymmdd[ hh:mm[:ss]] */
5158 struct zstr creator; /* ($) file creator id */
5159 struct zstr account; /* (%) file account */
5160 struct zstr area; /* (&) area (e.g. directory) for file */
5161 struct zstr password; /* (') password for area */
5162 long blksize; /* (() file blocksize */
5163 struct zstr xaccess; /* ()) file access: new, supersede, append, warn */
5164 struct zstr encoding; /* (*) encoding (transfer syntax) */
5165 struct zstr disp; /* (+) disposition (mail, message, print, etc) */
5166 struct zstr lprotect; /* (,) protection (local syntax) */
5167 struct zstr gprotect; /* (-) protection (generic syntax) */
5168 struct zstr systemid; /* (.) ID for system of origin */
5169 struct zstr recfm; /* (/) record format */
5170 struct zstr sysparam; /* (0) system-dependent parameter string */
5171 CK_OFF_T length; /* (1) exact length on system of origin */
5172 struct zstr charset; /* (2) transfer syntax character set */
5174 struct zstr longname; /* OS/2 longname if applicable */
5176 struct zstr reply; /* This goes last, used for attribute reply */
5179 /* Kermit file information structure */
5182 int bs; /* Blocksize */
5183 int cs; /* Character set */
5184 long rl; /* Record length */
5185 int org; /* Organization */
5186 int fmt; /* Record format */
5187 int cc; /* Carriage control */
5188 int typ; /* Type (text/binary) */
5189 int dsp; /* Disposition */
5190 char *os_specific; /* OS-specific attributes */
5192 unsigned long int lblopts; /* LABELED FILE options bitmask */
5200 Data type for pids. If your system uses a different type, put something
5201 like -DPID_T=pid_t on command line, or override here.
5207 Data types for uids and gids. Same deal as for pids.
5208 Wouldn't be nice if there was a preprocessor test to find out if a
5212 /* Not used in VMS so who cares */
5218 /* Or would it be better (or worse?) to use _POSIX_SOURCE here? */
5225 #else /* Not POSIX */
5227 /* SVR4 and later have uid_t and gid_t. */
5228 /* SVR3 and earlier use int, or unsigned short, or.... */
5235 #else /* Not SVR4 */
5243 #else /* Not BSD43 */
5244 /* Default these to int for older UNIX versions */
5256 getpwuid() arg type, which is not necessarily the same as UID_T,
5257 e.g. in SCO UNIX SVR3, it's int.
5260 #define PWID_T UID_T
5272 #ifdef MACHWAIT /* WAIT_T argument for wait() */
5273 #include <sys/wait.h>
5275 typedef union wait WAIT_T;
5279 /* OSF wait.h defines BSD wait if _BSD is defined so hide _BSD from wait.h */
5285 #include <sys/wait.h>
5290 #ifdef CK_OSF_BSD /* OSF/1: Restore _BSD definition */
5293 #endif /* CK_OSF_BSD */
5297 #endif /* MACHWAIT */
5300 #endif /* CK_REDIR */
5302 /* Assorted other blah_t's handled here... */
5305 #define SIZE_T size_t
5308 /* Forward declarations of system-dependent functions callable from all */
5309 /* C-Kermit modules. */
5311 /* File-related functions from system-dependent file i/o module */
5314 /* For some reason, this does not agree with DEC C */
5315 _PROTOTYP( int zkself, (void) );
5316 #endif /* CKVFIO_C */
5317 _PROTOTYP( int zopeni, (int, char *) );
5318 _PROTOTYP( int zopeno, (int, char *, struct zattr *, struct filinfo *) );
5319 _PROTOTYP( int zclose, (int) );
5321 _PROTOTYP( int zchin, (int, int *) );
5323 _PROTOTYP( int zxin, (int, char *, int) );
5324 _PROTOTYP( int zsinl, (int, char *, int) );
5325 _PROTOTYP( int zinfill, (void) );
5326 _PROTOTYP( int zsout, (int, char*) );
5327 _PROTOTYP( int zsoutl, (int, char*) );
5328 _PROTOTYP( int zsoutx, (int, char*, int) );
5329 _PROTOTYP( int zchout, (int, char) );
5330 _PROTOTYP( int zoutdump, (void) );
5331 _PROTOTYP( int zsyscmd, (char *) );
5332 _PROTOTYP( int zshcmd, (char *) );
5334 _PROTOTYP( int zsetfil, (int, int) );
5335 _PROTOTYP( int zchkpid, (unsigned long) );
5338 _PROTOTYP( VOID z_exec, (char *, char **, int) );
5340 _PROTOTYP( int chkfn, (int) );
5341 _PROTOTYP( CK_OFF_T zchki, (char *) );
5343 _PROTOTYP( CK_OFF_T zgetfs, (char *) );
5346 _PROTOTYP( CK_OFF_T zgetfs, (char *) );
5348 #define zgetfs(a) zchki(a)
5350 #endif /* VMSORUNIX */
5351 _PROTOTYP( int iswild, (char *) );
5352 _PROTOTYP( int isdir, (char *) );
5353 _PROTOTYP( int zchko, (char *) );
5354 _PROTOTYP( int zdelet, (char *) );
5355 _PROTOTYP( VOID zrtol, (char *,char *) );
5356 _PROTOTYP( VOID zltor, (char *,char *) );
5357 _PROTOTYP( VOID zstrip, (char *,char **) );
5359 _PROTOTYP( char * zrelname, (char *, char *) );
5361 _PROTOTYP( int zchdir, (char *) );
5362 _PROTOTYP( char * zhome, (void) );
5363 _PROTOTYP( char * zgtdir, (void) );
5364 _PROTOTYP( int zxcmd, (int, char *) );
5366 _PROTOTYP( int zclosf, (int) );
5369 _PROTOTYP( int nzxpand, (char *, int) );
5371 _PROTOTYP( int zxpand, (char *) );
5372 #endif /* NZXPAND */
5373 _PROTOTYP( int znext, (char *) );
5375 _PROTOTYP( int zxrewind, (void) );
5376 #endif /* ZXREWIND */
5377 _PROTOTYP( int zchkspa, (char *, CK_OFF_T) );
5378 _PROTOTYP( VOID znewn, (char *, char **) );
5379 _PROTOTYP( int zrename, (char *, char *) );
5380 _PROTOTYP( int zcopy, (char *, char *) );
5381 _PROTOTYP( int zsattr, (struct zattr *) );
5382 _PROTOTYP( int zfree, (char *) );
5383 _PROTOTYP( char * zfcdat, (char *) );
5384 _PROTOTYP( int zstime, (char *, struct zattr *, int) );
5386 _PROTOTYP( char * zgperm, (char *) );
5387 _PROTOTYP( char * ziperm, (char *) );
5388 #endif /* CK_PERMS */
5389 _PROTOTYP( int zmail, (char *, char *) );
5390 _PROTOTYP( int zprint, (char *, char *) );
5391 _PROTOTYP( char * tilde_expand, (char *) );
5392 _PROTOTYP( int zmkdir, (char *) ) ;
5393 _PROTOTYP( int zfseek, (CK_OFF_T) ) ;
5395 _PROTOTYP( struct zfnfp * zfnqfp, (char *, int, char * ) ) ;
5397 #define zfnqfp(a,b,c) ckstrncpy(c,a,b)
5399 _PROTOTYP( int zvuser, (char *) ) ;
5400 _PROTOTYP( int zvpass, (char *) ) ;
5401 _PROTOTYP( VOID zvlogout, (void) ) ;
5403 _PROTOTYP( int os2setlongname, ( char * fn, char * ln ) ) ;
5404 _PROTOTYP( int os2getlongname, ( char * fn, char ** ln ) ) ;
5405 _PROTOTYP( int os2rexx, ( char *, char *, int ) ) ;
5406 _PROTOTYP( int os2rexxfile, ( char *, char *, char *, int) ) ;
5407 _PROTOTYP( int os2geteas, (char *) ) ;
5408 _PROTOTYP( int os2seteas, (char *) ) ;
5409 _PROTOTYP( char * get_os2_vers, (void) ) ;
5410 _PROTOTYP( int do_label_send, (char *) ) ;
5411 _PROTOTYP( int do_label_recv, (void) ) ;
5413 _PROTOTYP( unsigned long os2_mouseon, (void) );
5414 _PROTOTYP( unsigned long os2_mousehide, (void) );
5415 _PROTOTYP( unsigned long os2_mouseshow, (void) );
5416 _PROTOTYP( unsigned long os2_mouseoff, (void) );
5417 _PROTOTYP( void os2_mouseevt, (void *) );
5418 _PROTOTYP( int mousebuttoncount, (void));
5419 #endif /* OS2MOUSE */
5422 /* Functions from system-dependent terminal i/o module */
5424 _PROTOTYP( int ttopen, (char *, int *, int, int) ); /* tty functions */
5426 _PROTOTYP( int ttclos, (int) );
5428 _PROTOTYP( int tthang, (void) );
5429 _PROTOTYP( int ttres, (void) );
5430 _PROTOTYP( int ttpkt, (long, int, int) );
5432 _PROTOTYP( int ttvt, (long, int) );
5434 _PROTOTYP( int ttsspd, (int) );
5435 _PROTOTYP( long ttgspd, (void) );
5436 _PROTOTYP( int ttflui, (void) );
5437 _PROTOTYP( int ttfluo, (void) );
5438 _PROTOTYP( int ttpushback, (CHAR *, int) );
5439 _PROTOTYP( int ttpeek, (void) );
5440 _PROTOTYP( int ttgwsiz, (void) );
5441 _PROTOTYP( int ttchk, (void) );
5442 _PROTOTYP( int ttxin, (int, CHAR *) );
5443 _PROTOTYP( int ttxout, (CHAR *, int) );
5444 _PROTOTYP( int ttol, (CHAR *, int) );
5445 _PROTOTYP( int ttoc, (char) );
5446 _PROTOTYP( int ttinc, (int) );
5447 _PROTOTYP( int ttscarr, (int) );
5448 _PROTOTYP( int ttgmdm, (void) );
5449 _PROTOTYP( int ttsndb, (void) );
5450 _PROTOTYP( int ttsndlb, (void) );
5452 _PROTOTYP( char * ttglckdir, (void) );
5456 _PROTOTYP( int ttinl, (CHAR *, int, int, CHAR, CHAR, int) );
5459 _PROTOTYP( int ttinl, (CHAR *, int, int, CHAR, CHAR, int) );
5462 _PROTOTYP( int ttinl, (CHAR *, int, int, CHAR, CHAR, int) );
5465 _PROTOTYP( int ttinl, (CHAR *, int, int, CHAR, CHAR, int) );
5468 _PROTOTYP( int ttinl, (CHAR *, int, int, CHAR, CHAR, int) );
5470 _PROTOTYP( int ttinl, (CHAR *, int, int, CHAR, CHAR) );
5473 #endif /* STRATUS */
5476 #else /* ! PARSENSE */
5477 _PROTOTYP( int ttinl, (CHAR *, int, int, CHAR) );
5478 #endif /* PARSENSE */
5480 /* XYZMODEM support */
5483 CK_XYZ enables the various commands and data structures.
5484 XYZ_INTERNAL means these protocols are built-in; if not defined,
5485 then they are external. XYZ_DLL is used to indicate a separate
5486 loadable library containing the XYZmodem protocol code.
5488 #ifdef pdp11 /* No room for this in PDP-11 */
5492 #ifndef NOCKXYZ /* Alternative protocols */
5500 #define XYZ_INTERNAL /* Internal and DLL */
5502 #endif /* NOXYZDLL */
5506 #endif /* NOCKXYZ */
5508 #ifdef XYZ_INTERNAL /* This ensures that XYZ_INTERNAL */
5509 #ifndef CK_XYZ /* is defined only if CK_XYZ is too */
5512 #endif /* XYZ_INTERNAL */
5513 #ifdef XYZ_DLL /* This ensures XYZ_DLL is defined */
5514 #ifndef XYZ_INTERNAL /* only if XYZ_INTERNAL is too */
5516 #endif /* XYZ_INTERNAL */
5517 #endif /* XYZ_DLL */
5519 /* Console functions */
5521 _PROTOTYP( int congm, (void) );
5523 _PROTOTYP( VOID conint, (SIGTYP (*)(int, int), SIGTYP (*)(int, int)) );
5525 _PROTOTYP( VOID conint, (SIGTYP (*)(int), SIGTYP (*)(int)) );
5526 #endif /* COMMENT */
5527 _PROTOTYP( VOID connoi, (void) );
5528 _PROTOTYP( int concb, (char) );
5530 _PROTOTYP( long congspd, (void) );
5531 #endif /* CONGSPD */
5532 _PROTOTYP( int conbin, (char) );
5533 _PROTOTYP( int conres, (void) );
5534 _PROTOTYP( int conoc, (char) );
5535 _PROTOTYP( int conxo, (int, char *) );
5536 _PROTOTYP( int conol, (char *) );
5537 _PROTOTYP( int conola, (char *[]) );
5538 _PROTOTYP( int conoll, (char *) );
5539 _PROTOTYP( int conchk, (void) );
5540 _PROTOTYP( int coninc, (int) );
5541 _PROTOTYP( char * conkbg, (void) );
5542 _PROTOTYP( int psuspend, (int) );
5543 _PROTOTYP( int priv_ini, (void) );
5544 _PROTOTYP( int priv_on, (void) );
5545 _PROTOTYP( int priv_off, (void) );
5546 _PROTOTYP( int priv_can, (void) );
5547 _PROTOTYP( int priv_chk, (void) );
5548 _PROTOTYP( int priv_opn, (char *, int) );
5550 _PROTOTYP( int sysinit, (void) ); /* Misc Kermit functions */
5551 _PROTOTYP( int syscleanup, (void) );
5552 _PROTOTYP( int msleep, (int) );
5553 _PROTOTYP( VOID rtimer, (void) );
5554 _PROTOTYP( int gtimer, (void) );
5556 _PROTOTYP( VOID rftimer, (void) );
5557 _PROTOTYP( CKFLOAT gftimer, (void) );
5558 #endif /* GFTIMER */
5559 _PROTOTYP( VOID ttimoff, (void) );
5560 _PROTOTYP( VOID ztime, (char **) );
5561 _PROTOTYP( int parchk, (CHAR *, CHAR, int) );
5562 _PROTOTYP( VOID doexit, (int, int) );
5563 _PROTOTYP( int askmore, (void) );
5564 _PROTOTYP( VOID fatal, (char *) );
5565 _PROTOTYP( VOID fatal2, (char *, char *) );
5567 _PROTOTYP( int ck_cancio, (void) );
5570 /* Key mapping support */
5575 #endif /* NOSETKEY */
5581 #endif /* NOSETKEY */
5584 _PROTOTYP( int congks, (int) );
5586 /* OS2 requires these definitions even if SET KEY is not being supported */
5589 typedef CHAR *MACRO;
5590 extern int wideresult;
5594 Catch-all for systems where we don't know how to read keyboard scan
5598 /* Note: CHAR (i.e. unsigned char) is very important here. */
5600 typedef CHAR * MACRO;
5601 #define congks coninc
5602 #endif /* NOSETKEY */
5606 #ifndef NOKVERBS /* No \Kverbs unless... */
5608 #endif /* NOKVERBS */
5614 Note: this value chosen to be bigger than PC BIOS key modifier bits,
5615 but still fit in 16 bits without affecting sign.
5617 As of K95 1.1.5, this no longer fits in 16 bits, good thing we are 32 bit.
5619 #define F_MACRO 0x2000 /* Bit indicating a macro indice */
5620 #define IS_MACRO(x) (x & F_MACRO)
5621 #define F_KVERB 0x4000 /* Bit indicating a keyboard verb */
5622 #define IS_KVERB(x) (x & F_KVERB) /* Test this bit */
5624 #endif /* NOKVERBS */
5626 #define F_ESC 0x8000 /* Bit indicating ESC char combination */
5627 #define IS_ESC(x) (x & F_ESC)
5628 #define F_CSI 0x10000 /* Bit indicating CSI char combination */
5629 #define IS_CSI(x) (x & F_CSI)
5631 #ifdef NOSPL /* This might be overkill.. */
5632 #ifndef NOKVERBS /* Not all \Kverbs require */
5633 #define NOKVERBS /* the script programming language. */
5634 #endif /* NOKVERBS */
5637 #endif /* NOTAKEARGS */
5641 Function prototypes for system and library functions.
5643 #ifdef _POSIX_SOURCE
5649 #endif /* _POSIX_SOURCE */
5659 #ifdef STRATUS /* Stratus VOS uses ANSI libraries */
5661 #endif /* STRATUS */
5667 #endif /* NOCURSES */
5670 #define S_IFMT 0xF000
5671 #define timezone _timezone
5672 #endif /* __IBMC__ */
5678 #endif /* __32BIT__ */
5679 #include <sys/timeb.h>
5685 #endif /* SIGUSR1 */
5686 #define SIGALRM SIGUSR1
5687 _PROTOTYP( unsigned alarm, (unsigned) );
5688 _PROTOTYP( unsigned sleep, (unsigned) );
5689 #endif /* __EMX__ */
5690 _PROTOTYP( unsigned long zdskspace, (int) );
5691 _PROTOTYP( int zchdsk, (int) );
5692 _PROTOTYP( int conincraw, (int) );
5693 _PROTOTYP( int ttiscom, (int f) );
5694 _PROTOTYP( int IsFileNameValid, (char *) );
5695 _PROTOTYP( void ChangeNameForFAT, (char *) );
5696 _PROTOTYP( char *GetLoadPath, (void) );
5699 /* Fullscreen file transfer display items... */
5702 #ifdef CK_NCURSES /* CK_NCURSES implies CK_CURSES */
5705 #endif /* CK_CURSES */
5706 #endif /* CK_NCURSES */
5708 #ifdef MYCURSES /* MYCURSES implies CK_CURSES */
5711 #endif /* CK_CURSES */
5712 #endif /* MYCURSES */
5713 #endif /* NOCURSES */
5718 #endif /* CK_CURSES */
5721 #endif /* NODISPLAY */
5722 #endif /* NOCURSES */
5726 The CK_WREFRESH symbol is defined if the curses library provides
5727 clearok() and wrefresh() functions, which are used in repainting
5730 #ifdef NOWREFRESH /* Override CK_WREFRESH */
5732 #ifdef CK_WREFRESH /* If this is defined, */
5733 #undef CK_WREFRESH /* undefine it. */
5734 #endif /* CK_WREFRESH */
5736 #else /* !NOWREFRESH */ /* No override... */
5738 #ifndef CK_WREFRESH /* If CK_WREFRESH not defined */
5740 Automatically define it for systems known to have it ...
5742 #ifdef VMS /* DEC (Open)VMS has it */
5745 #ifdef ultrix /* DEC ULTRIX has it */
5747 #ifdef SVR3 /* System V has it */
5750 #ifdef BSD44 /* 4.4 BSD has it */
5753 #ifdef NEXT /* Define it for NeXTSTEP */
5756 #ifdef SUNOS4 /* SunOS 4.x... */
5759 #ifdef SOLARIS25 /* Solaris 2.5 and later */
5762 #ifdef AIXRS /* RS/6000 AIX ... */
5765 #ifdef RTAIX /* RT PC AIX ... */
5768 #ifdef OSF /* DEC OSF/1 ... */
5771 /* Add more here, or just define CK_WREFRESH on the CC command line... */
5776 #endif /* SOLARIS25 */
5784 #else /* CK_WREFRESH is defined */
5786 /* This is within an ifdef CK_CURSES block. The following is not needed */
5788 #ifndef CK_CURSES /* CK_WREFRESH implies CK_CURSES */
5790 #endif /* CK_CURSES */
5792 #endif /* CK_WREFRESH */
5793 #endif /* NOWREFRESH */
5797 #define TRMBUFL 16384
5800 #define TRMBUFL 8192
5802 #define TRMBUFL 1024
5803 #endif /* BIGBUFOK */
5804 #endif /* DYNAMIC */
5805 #endif /* TRMBUFL */
5806 #endif /* CK_CURSES */
5809 Whether to use ckmatch() in all its glory for C-Shell-like patterns.
5810 If CKREGEX is NOT defined, all but * and ? matching are removed from
5811 ckmatch(). NOTE: Defining CKREGEX does not necessarily mean that ckmatch()
5812 regexes are used for filename matching. That depends on whether zxpand()
5813 in ck?fio.c calls ckmatch(). NOTE 2: REGEX is a misnomer -- these are not
5814 regular expressions in the computer-science sense (in which, e.g. "a*b"
5815 matches 0 or more 'a' characters followed by 'b') but patterns (in which
5816 "a*b" matches 'a' followed by 0 or more non-b characters, followed by b).
5821 #endif /* CKREGEX */
5822 #endif /* NOCKREGEX */
5824 /* Learned-script feature */
5832 #endif /* NOLOCAL */
5834 #endif /* NOLEARN */
5839 #endif /* CKLEARN */
5840 #else /* !NOLEARN */
5843 /* In UNIX this can work only with ckucns.c builds */
5849 #endif /* OS2ORUNIX */
5850 #endif /* CKLEARN */
5851 #endif /* NOLEARN */
5855 #define LEARNBUFSIZ 128
5856 #endif /* LEARNBUFSIZ */
5857 #endif /* CKLEARN */
5860 #ifndef CKTIDLE /* Pseudo-keepalive in CONNECT */
5861 #ifdef OS2 /* In K95 */
5864 #ifdef UNIX /* In UNIX but only ckucns versions */
5868 #endif /* NOSELECT */
5869 #endif /* NOLEARN */
5872 #endif /* CKTIDLE */
5873 #endif /* IKSDONLY */
5877 String library functions.
5878 For ANSI C, get prototypes from <string.h>.
5879 Otherwise, skip the prototypes.
5884 Prototypes for other commonly used library functions, such as
5885 malloc, free, getenv, atol, atoi, and exit. Otherwise, no prototypes.
5888 #ifdef DIAB /* DIAB DS90 */
5889 /* #include <commonC.h> */
5890 #include <sys/wait.h>
5893 extern void exit(int status);
5894 extern void _exit(int status);
5895 extern int uname(struct utsname *name);
5896 #endif /* COMMENT */
5897 extern int chmod(char *path, int mode);
5898 extern int ioctl(int fildes, int request, ...);
5899 extern int rdchk(int ttyfd);
5900 extern int nap(int m);
5902 extern int getppid(void);
5903 #endif /* COMMENT */
5904 extern int _filbuf(FILE *stream);
5905 extern int _flsbuf(char c,FILE *stream);
5909 Prototypes for UNIX functions like access, alarm, chdir, sleep, fork,
5910 and pause. Otherwise, no prototypes.
5913 #include <signal.h> /* SMS: sleep() for old (V4.0-000) DEC C. */
5915 #include <unixlib.h> /* SMS: getpid() for old (V4.0-000) DEC C. */
5922 #else /* NoT NeXT */
5926 #include <c_utilities.h>
5927 #else /* !STRATUS */
5933 #endif /* HAVE_CRYPT_H */
5934 #endif /* STRATUS */
5939 #else /* Not ANSI libs... */
5949 #endif /* HPUXPRE65 */
5958 It is essential that these are declared correctly!
5959 Which is not always easy. Take malloc() for instance ...
5964 #define SIZE_T_MALLOC
5965 #endif /* __STDC__ */
5967 #endif /* PYRAMID */
5969 Maybe some other environments need the same treatment for malloc.
5970 If so, define SIZE_T_MALLOC for them here or in compiler CFLAGS.
5972 #ifdef SIZE_T_MALLOC
5973 _PROTOTYP( void * malloc, (size_t) );
5975 _PROTOTYP( char * malloc, (unsigned int) );
5976 #endif /* SIZE_T_MALLOC */
5978 _PROTOTYP( char * getenv, (char *) );
5979 _PROTOTYP( long atol, (char *) );
5981 #endif /* SUNOS41 */
5982 #endif /* CK_ANSILIBS */
5985 <sys/param.h> generally picks up NULL, MAXPATHLEN, and MAXNAMLEN
5986 and seems to present on all Unixes going back at least to SCO Xenix
5987 with the exception(s) noted.
5989 #ifndef NO_PARAM_H /* 2001-11-03 */
5990 #ifndef UNIX /* Non-Unixes don't have it */
5993 #ifdef TRS16 /* Tandy Xenix doesn't have it */
5997 #endif /* NO_PARAM_H */
6000 #ifndef INCL_PARAM_H
6001 #define INCL_PARAM_H
6002 #endif /* INCL_PARAM_H */
6003 #include <sys/param.h>
6004 #endif /* NO_PARAM_H */
6006 #ifndef NULL /* In case NULL is still not defined */
6008 /* or #define NULL 0 */
6009 /* or #define NULL ((char *) 0) */
6010 /* or #define NULL ((void *) 0) */
6013 /* Macro to differentiate "" from NULL (to avoid comparisons with literals) */
6015 #ifndef isemptystring
6016 #define isemptystring(s) ((s?(*s?0:1):0))
6017 #endif /* isemptystring */
6019 /* Maximum length for a fully qualified filename, not counting \0 at end. */
6021 This is a rough cut, and errs on the side of being too big. We don't
6022 want to pull in hundreds of header files looking for many and varied
6023 symbols, for fear of introducing unnecessary conflicts.
6026 #ifdef VMS /* VMS may have bad (small, ODS2) */
6027 #define CKMAXPATH NAMX_C_MAXRSS /* PATH_MAX, so use NAMX_C_MAXRSS. */
6029 #ifdef MAXPATHLEN /* (it probably isn't) */
6030 #define CKMAXPATH MAXPATHLEN
6032 #ifdef PATH_MAX /* POSIX */
6033 #define CKMAXPATH PATH_MAX
6034 #else /* def PATH_MAX */
6036 #define CKMAXPATH 63
6039 #define CKMAXPATH 255
6040 #else /* def pdp11 */
6041 #ifdef UNIX /* Even though some are way less... */
6042 #define CKMAXPATH 1024
6043 #else /* def UNIX */
6045 #define CKMAXPATH 256 /* == $MXPL from PARU.H */
6046 #else /* def STRATUS */
6048 #define CKMAXPATH 256 /* == $MXPL from PARU.H */
6049 #else /* def datageneral */
6050 #define CKMAXPATH 255
6051 #endif /* def STRATUS [else] */
6052 #endif /* def datageneral [else] */
6053 #endif /* def UNIX [else] */
6054 #endif /* def pdp11 [else] */
6055 #endif /* def MAC [else] */
6056 #endif /* def PATH_MAX [else] */
6057 #endif /* def MAXPATHLEN [else] */
6058 #endif /* def VMS [else] */
6059 #endif /* ndef CKMAXPATH */
6061 /* Maximum length for the name of a tty device */
6064 #define DEVNAMLEN CKMAXPATH
6065 #endif /* DEVNAMLEN */
6067 /* Directory (path segment) separator */
6068 /* Not fully general - Tricky for VMS, Amiga, ... */
6073 #define ISDIRSEP(c) ((c)=='/')
6077 #define ISDIRSEP(c) ((c)=='/'||(c)=='\\')
6081 #define ISDIRSEP(c) (((c)==':')||((c)=='^')||((c)=='='))
6085 #define ISDIRSEP(c) ((c)=='>')
6088 #define DIRSEP ']' /* (not really) */
6089 #define ISDIRSEP(c) ((c)==']'||(c)==':')
6093 #define ISDIRSEP(c) ((c)==':')
6097 #define ISDIRSEP(c) ((c)=='/'||(c)==':')
6101 #define ISDIRSEP(c) ((c)=='\\'||(c)==':')
6104 #define ISDIRSEP(c) ((c)=='/')
6109 #endif /* STRATUS */
6110 #endif /* datageneral */
6115 /* FILE package parameters */
6123 #define CKMAXOPEN 390
6126 #define CKMAXOPEN 64
6129 #define CKMAXOPEN OPEN_MAX
6132 #define CKMAXOPEN FOPEN_MAX
6134 #define CKMAXOPEN 64
6135 #endif /* FOPEN_MAX */
6136 #endif /* OPEN_MAX */
6139 #endif /* CKMAXOPEN */
6141 /* Maximum channels for FOPEN = CKMAXOPEN minus logs, stdio, etc */
6144 #define Z_MINCHAN 16
6145 #endif /* Z_MINCHAN */
6148 #define Z_MAXCHAN (CKMAXOPEN-ZNFILS-5)
6149 #endif /* Z_MAXCHAN */
6152 /* New-format nzltor() and nzrtol() functions that handle pathnames */
6166 #endif /* STRATUS */
6173 _PROTOTYP( VOID nzltor, (char *, char *, int, int, int) );
6174 _PROTOTYP( VOID nzrtol, (char *, char *, int, int, int) );
6177 /* Implementations with a zrmdir() function */
6191 #endif /* STRATUS */
6198 _PROTOTYP( int zrmdir, (char *) );
6206 #endif /* UNIXOROSK */
6208 extern int filecase;
6210 #endif /* FILECASE */
6212 /* Funny names for library functions department... */
6215 #define setjmp setret
6216 #define longjmp longret
6217 #define jmp_buf ret_buf
6218 #define getcwd curdir
6222 /* The C-runtime conflicts with things we do in Stratus VOS ckltio.c ... */
6223 #define printf vosprtf
6224 _PROTOTYP( int vosprtf, (char *fmt, ...) );
6225 #define perror(txt) printf("%s\n", txt)
6226 /* char_varying is a string type from PL/I that VOS uses extensively */
6227 #define CV char_varying
6228 #endif /* STRATUS */
6232 #define isWin95() (OSVer==VER_PLATFORM_WIN32_WINDOWS)
6234 #define isWin95() (0)
6247 #endif /* SESLIMIT */
6258 #define query ckquery
6259 #endif /* BEOSORBEBOX */
6261 #ifndef PTYORPIPE /* NETCMD and/or NETPTY defined */
6269 #endif /* PTYORPIPE */
6271 /* mktemp() and mkstemp() */
6277 #endif /* OS2ORUNIX */
6288 #endif /* __linux__ */
6290 #endif /* MKSTEMP */
6291 #endif /* NOMKSTEMP */
6293 #endif /* NOMKTEMP */
6295 /* Platforms that have memcpy() -- only after all headers included */
6336 #endif /* STRATUS */
6337 #endif /* datageneral */
6344 #endif /* SOLARIS */
6345 #endif /* __linux__ */
6349 #endif /* USE_MEMCPY */
6352 #define memcpy(a,b,c) ckmemcpy((a),(b),(c))
6355 /* Because the prototype isn't picked up in the normal header files */
6356 _PROTOTYP( void *memcpy, (void *, const void *, size_t));
6357 #endif /* CK_SCO32V4 */
6358 #endif /* USE_MEMCPY */
6360 /* User authentication for IKS -- So far K95 and UNIX only */
6365 #endif /* NOLOGIN */
6375 #endif /* CK_SCOV5 */
6376 #endif /* NOSHADOW */
6377 #endif /* CK_LOGIN */
6379 #define NTCREATETOKEN
6381 #endif /* OS2ORUNIX */
6385 #endif /* CK_LOGIN */
6386 #endif /* NOLOGIN */
6392 #ifdef CK_LOGIN /* Telnet protocol required */
6393 #ifndef TNCODE /* for login to IKSD. */
6396 #endif /* CK_LOGIN */
6398 #ifdef CK_AUTHENTICATION
6401 #endif /* NOSENDUID */
6402 #endif /* CK_AUTHENTICATION */
6404 #ifdef TNCODE /* Should TELNET send user ID? */
6408 #endif /* CKSENDUID */
6409 #endif /* NOSENDUID */
6412 /* UNIX platforms that don't have getusershell() */
6415 #ifndef NOGETUSERSHELL
6417 #define NOGETUSERSHELL
6420 #define NOGETUSERSHELL
6423 #define NOGETUSERSHELL
6426 #define NOGETUSERSHELL
6429 #define NOGETUSERSHELL
6432 #define NOGETUSERSHELL
6433 #endif /* COHERENT */
6434 #endif /* UNIXWARE */
6439 #endif /* NOGETUSERSHELL */
6447 #endif /* CKSYSLOG */
6448 #endif /* NOSYSLOG */
6454 #endif /* CKSYSLOG */
6455 #endif /* NOSYSLOG */
6461 #ifndef NOGETUSERSHELL
6462 #ifndef GETUSERSHELL
6463 #define GETUSERSHELL
6464 #endif /* GETUSERSHELL */
6465 #endif /* NOGETUSERSHELL */
6467 _PROTOTYP( int ckxlogin, (CHAR *, CHAR *, CHAR *, int));
6468 _PROTOTYP( int ckxlogout, (VOID));
6469 #endif /* CK_LOGIN */
6471 #ifndef NOZLOCALTIME /* zlocaltime() available. */
6474 _PROTOTYP( char * zlocaltime, (char *) );
6475 #endif /* OS2ORUNIX */
6476 #endif /* NOZLOCALTIME */
6478 #ifdef CKSYSLOG /* Syslogging levels */
6479 #define SYSLG_NO 0 /* No logging */
6480 #define SYSLG_LI 1 /* Login/out */
6481 #define SYSLG_DI 2 /* Dialing out */
6482 #define SYSLG_AC 3 /* Making any kind of connection */
6483 #define SYSLG_PR 4 /* Protocol Operations */
6484 #define SYSLG_FC 5 /* File creation */
6485 #define SYSLG_FA 6 /* File reading */
6486 #define SYSLG_CM 7 /* Top-level commands */
6487 #define SYSLG_CX 8 /* All commands */
6488 #define SYSLG_DB 9 /* Debug */
6489 #define SYSLGMAX 9 /* Highest level */
6490 #define SYSLG_DF SYSLG_FA /* Default level */
6491 /* Logging function */
6492 _PROTOTYP(VOID cksyslog,(int, int, char *, char *, char *));
6493 #endif /* CKSYSLOG */
6495 extern int ckxlogging, ckxsyslog, ikdbopen;
6500 /* Keyword Table Template */
6502 /* Note: formerly defined in ckucmd.h but now more widely used */
6504 struct keytab { /* Keyword table */
6505 char *kwd; /* Pointer to keyword string */
6506 int kwval; /* Associated value */
6507 int flgs; /* Flags (as defined above) */
6509 #endif /* CK_KEYTAB */
6512 _PROTOTYP( int isalink, (char *));
6516 _PROTOTYP( int do_pty, (int *, char *, int));
6517 _PROTOTYP( VOID end_pty, (void));
6521 _PROTOTYP( int zsetroot, (char *) );
6522 _PROTOTYP( char * zgetroot, (void) );
6523 _PROTOTYP( int zinroot, (char *) );
6526 /* Local Echo Buffer prototypes */
6527 _PROTOTYP( VOID le_init, (void) );
6528 _PROTOTYP( VOID le_clean, (void));
6529 _PROTOTYP( int le_inbuf, (void));
6530 _PROTOTYP( int le_putstr, (CHAR *));
6531 _PROTOTYP( int le_puts, (CHAR *, int));
6532 _PROTOTYP( int le_putchar, (CHAR));
6533 _PROTOTYP( int le_getchar, (CHAR *));
6535 /* #ifndef NOHTTP */
6540 #endif /* OS2ORUNIX */
6544 #endif /* CMDATE2TM */
6545 #endif /* NOCMDATE2TM */
6548 _PROTOTYP( struct tm * cmdate2tm, (char *,int));
6549 #endif /* CMDATE2TM */
6550 /* #endif */ /* NOHTTP */
6552 #ifndef NOSETTIME /* This would be set in CFLAGS */
6553 #ifdef SVR4ORPOSIX /* Defined in IEEE 1003.1-1996 */
6554 #ifndef UTIMEH /* and in SVID for SVR4 */
6557 #else /* SVR4ORPOSIX */
6558 #ifdef OSF /* Verified by Lucas Hart */
6563 #ifdef SUNOS41 /* Verified by Lucas Hart */
6571 #endif /* SYSUTIMEH */
6579 #endif /* SUNOS41 */
6581 #endif /* SVR4ORPOSIX */
6582 #endif /* NOSETTIME */
6585 _PROTOTYP( int ftpisconnected, (void));
6586 _PROTOTYP( int ftpisloggedin, (void));
6587 _PROTOTYP( int ftpissecure, (void));
6590 _PROTOTYP( int readpass, (char *, char *, int));
6591 _PROTOTYP( int readtext, (char *, char *, int));
6594 _PROTOTYP(int ck_auth_loaddll, (VOID));
6595 _PROTOTYP(int ck_auth_unloaddll, (VOID));
6599 _PROTOTYP(DWORD ckGetLongPathname,(LPCSTR lpFileName,
6600 LPSTR lpBuffer, DWORD cchBuffer));
6606 /* End of ckcdeb.h */
6607 #endif /* CKCDEB_H */