forked from KermitProject/ckermit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ckcdeb.h
6924 lines (6279 loc) · 148 KB
/
ckcdeb.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* C K C D E B . H */
/*
For recent additions search below for "2021" and "2022".
NOTE TO CONTRIBUTORS: This file, and all the other C-Kermit files, must be
compatible with C preprocessors that support only #ifdef, #else, #endif,
#define, and #undef. Please do not use #if, logical operators, or other
later-model preprocessor features in any of the portable C-Kermit modules.
You can, of course, use these constructions in platform-specific modules
when you know they are supported.
*/
/*
This file is included by all C-Kermit modules, including the modules
that aren't specific to Kermit (like the command parser and the ck?tio and
ck?fio modules). It should be included BEFORE any other C-Kermit header
files. It specifies format codes for debug(), tlog(), and similar
functions, and includes any necessary definitions to be used by all C-Kermit
modules, and also includes some feature selection compile-time switches, and
also system- or compiler-dependent definitions, plus #includes and prototypes
required by all C-Kermit modules.
*/
/*
Author: Frank da Cruz <fdc@columbia.edu>,
Columbia University Academic Information Systems, NYC (1974-2011)
The Kermit Project, Bronx NY (2011-present)
Changes from David Goodwin for Windows and OS/2 (2022)
Copyright (C) 1985, 2022,
Trustees of Columbia University in the City of New York.
All rights reserved. See the C-Kermit COPYING.TXT file or the
copyright text in the ckcmai.c module for disclaimer and permissions.
Last update: Tue Sep 27 11:09:55 2022
*/
/*
Etymology: The name of this file means "C-Kermit Common-C-Language Debugging
Header", because originally it contained only the formats (F000-F111) for
the debug() and tlog() functions. Since then it has grown to include all
material required by all or most of the other C-Kermit modules, including
the non-Kermit specific ones. In other words, this is the one header file
that is guaranteed to be included by all C-Kermit source modules.
*/
#ifndef CKCDEB_H /* Don't include me more than once. */
#define CKCDEB_H
/* Moved here from ckcmai.c... REMOVE THIS AFTER BETA TEST! */
#ifndef BETATEST
#define BETATEST
#endif /* BETATEST */
/*
14 Sep 2022 - TYPE command new /INTERPRET switch enabled by default
except in Windows where it doesn't work because of character-set issues.
*/
#ifdef NT
#ifndef NOTYPEINTERPRET
#define NOTYPEINTERPRET
#endif /* NOTYPEINTERPRET */
#endif /* NT */
#ifndef NOSPL
#ifndef NOTYPEINTERPRET /* 23 August - TYPE /INTERPRET */
#define TYPEINTERPRET
#endif /* NOTYPEINTERPRET */
#ifndef NOCOPYINTERPRET /* 20 Sep 2022 - COPY /INTERPRET */
#ifndef COPYINTERPRET
#define COPYINTERPRET
#endif /* COPYINTERPRET */
#endif /* NOCOPYINTERPRET */
#endif /* NOSPL */
/*
Disinclude features that are "deprecated" in 2022;
on amd64 this saves about 185K out of 2.48MB, so this is really more
about political correctness that saving space. -fdc 12 May 2022
*/
#ifdef NODEPRECATED
#ifndef NOFTP /* No more FTP client */
#define NOFTP
#endif /* NOFTP */
#ifndef NOTELNET /* No more Telnet client */
#define NOTELNET
#endif /* NOTELNET */
#ifdef TNCODE
#undef TNCODE
#endif /* TNCODE */
#ifndef NORLOGIN /* No more RLOGIN client */
#define NORLOGIN
#endif /* NORLOGIN */
#ifndef NOWTMP /* No more WTMP logging */
#define NOWTMP
#endif /* NOWTMP */
#ifndef NOSYSLOG /* No more syslog */
#define NOSYSLOG
#endif /* NOSYSLOG */
#endif /* NODEPRECATED */
/*
As of 26 September 2022, the Arrow-key feature is included only if
explicitly requested because the API is disappearing not only in glibc
but also other libcs like musl and whatever Android uses.
*/
#ifndef DOARROWKEYS
#ifndef NOARROWKEYS /* Arrow keys use a deprecated API */
#define NOARROWKEYS /* (at least in glibc) */
#endif /* NOARROWKEYS */
#endif /* DOARROWKEYS */
#ifdef OS2
#include "ckoker.h"
#else /* OS2 */
/* Unsigned numbers */
#ifndef USHORT
#define USHORT unsigned short
#endif /* USHORT */
#ifndef UINT
#define UINT unsigned int
#endif /* UINT */
#ifndef ULONG
#define ULONG unsigned long
#endif /* ULONG */
#endif /* OS2 */
#ifdef MACOSX10 /* Mac OS X 1.0 */
#ifndef MACOSX /* implies Mac OS X */
#define MACOSX
#endif /* MACOSX */
#endif /* MACOSX10 */
#ifdef MACOSX /* Mac OS X */
#ifndef BSD44 /* implies 4.4 BSD */
#define BSD44
#endif /* BSD44 */
#endif /* MACOSX */
#ifdef SCO_OSR505 /* SCO 3.2v5.0.5 */
#ifndef SCO_OSR504 /* implies SCO 3.2v5.0.4 */
#define SCO_OSR504
#endif /* SCO_OSR504 */
#endif /* SCO_OSR505 */
#ifdef SCO_OSR504 /* SCO 3.2v5.0.4 */
#ifndef CK_SCOV5 /* implies SCO 3.2v5.0 */
#define CK_SCOV5
#endif /* CK_SCOV5 */
#include <sys/types.h> /* To sidestep header-file mess */
#endif /* SCO_OSR504 */
#ifdef CK_SCOV5
#ifndef ANYSCO
#define ANYSCO
#endif /* ANYSCO */
#endif /* CK_SCOV5 */
#ifdef UNIXWARE
#ifndef ANYSCO
#define ANYSCO
#endif /* ANYSCO */
#endif /* UNIXWARE */
#ifndef MINIX /* MINIX versions */
#ifdef MINIX340 /* TIH 1 Feb 2022 */
#define MINIX
#else
#ifdef MINIX315
#define MINIX
#else
#ifdef MINIX3
#define MINIX
#else
#ifdef MINIX2
#define MINIX
#endif /* MINIX2 */
#endif /* MINIX3 */
#endif /* MINIX315 */
#endif /* MINIX340 */
#endif /* MINIX */
#ifdef CK_SCO32V4 /* SCO 3.2v4 */
#ifndef ANYSCO
#define ANYSCO
#endif /* ANYSCO */
#ifndef XENIX
#define XENIX
#endif /* XENIX */
#ifndef SVR3
#define SVR3
#endif /* SVR3 */
#ifndef DIRENT
#define DIRENT
#endif /* DIRENT */
#ifndef RENAME
#define RENAME
#endif /* RENAME */
#ifndef SVR3JC
#define SVR3JC
#endif /* SVR3JC */
#ifndef CK_RTSCTS
#define CK_RTSCTS
#endif /* CK_RTSCTS */
#ifndef PID_T
#define PID_T pid_t
#endif /* PID_T */
#ifndef PWID_T
#define PWID_T int
#endif /* PWID_T */
#endif /* CK_SCO32V4 */
#ifdef NOICP /* If no command parser */
#ifndef NOSPL /* Then no script language either */
#define NOSPL
#endif /* NOSPL */
#ifndef NOCSETS /* Or characer sets */
#define NOCSETS
#endif /* NOCSETS */
#ifndef NOFTP /* Or FTP client */
#define NOFTP
#endif /* NOFTP */
#endif /* NOICP */
/* Built-in makefile entries */
#ifdef SOLARIS11 /* Solaris 11 implies 10 */
#ifndef SOLARIS10
#define SOLARIS10
#endif /* SOLARIS10 */
#endif /* SOLARIS11 */
#ifdef SOLARIS10 /* Solaris 10 implies 9 */
#ifndef SOLARIS9
#define SOLARIS9
#endif /* SOLARIS9 */
#endif /* SOLARIS10 */
#ifdef SOLARIS9 /* Solaris 9 implies 8 */
#ifndef SOLARIS8
#define SOLARIS8
#endif /* SOLARIS8 */
#endif /* SOLARIS9 */
#ifdef SOLARIS8 /* Solaris 8 implies 7 */
#ifndef SOLARIS7
#define SOLARIS7
#endif /* SOLARIS7 */
#endif /* SOLARIS8 */
#ifdef SOLARIS7 /* Solaris 7 implies 2.6 */
#ifndef SOLARIS26
#define SOLARIS26
#endif /* SOLARIS26 */
#endif /* SOLARIS7 */
#ifdef SOLARIS26 /* Solaris 2.6 implies 2.5 */
#ifndef SOLARIS25
#define SOLARIS25
#endif /* SOLARIS25 */
#endif /* SOLARIS26 */
#ifdef SOLARIS25 /* Solaris 2.5 implies Solaris */
#ifndef SOLARIS
#define SOLARIS
#endif /* SOLARIS */
#ifndef POSIX /* And POSIX */
#define POSIX
#endif /* POSIX */
#ifndef CK_WREFRESH /* And this (curses) */
#define CK_WREFRESH
#endif /* CK_WREFRESH */
#endif /* SOLARIS25 */
#ifdef SOLARIS24 /* Solaris 2.4 implies Solaris */
#ifndef SOLARIS
#define SOLARIS
#endif /* SOLARIS */
#endif /* SOLARIS24 */
#ifdef SOLARIS /* Solaris gets "POSIX" RTS/CTS API */
#ifdef POSIX
#ifndef POSIX_CRTSCTS
#define POSIX_CRTSCTS
#endif /* POSIX_CRTSCTS */
#endif /* POSIX */
#ifndef SVR4
#define SVR4
#endif /* SVR4 */
#ifndef STERMIOX
#define STERMIOX
#endif /* STERMIOX */
#ifndef SELECT
#define SELECT
#endif /* SELECT */
#ifndef FNFLOAT
#define FNFLOAT
#endif /* FNFLOAT */
#ifndef DIRENT
#define DIRENT
#endif /* DIRENT */
#ifndef BIGBUFOK
#define BIGBUFOK
#endif /* BIGBUFOK */
#ifndef CK_NEWTERM
#define CK_NEWTERM
#endif /* CK_NEWTERM */
#endif /* SOLARIS */
#ifdef SUN4S5 /* Sun-4 System V environment */
#ifndef SVR3 /* implies System V R3 or later */
#define SVR3
#endif /* SVR3 */
#endif /* SUN4S5 */
#ifdef SUNOS41 /* SUNOS41 implies SUNOS4 */
#ifndef SUNOS4
#define SUNOS4
#endif /* SUNOS4 */
#endif /* SUNOS41 */
#ifdef SUN4S5 /* Sun-4 System V environment */
#ifndef SVR3 /* implies System V R3 or later */
#define SVR3
#endif /* SVR3 */
#endif /* SUN4S5 */
#ifdef SUNOS41 /* SUNOS41 implies SUNOS4 */
#ifndef SUNOS4
#define SUNOS4
#endif /* SUNOS4 */
#endif /* SUNOS41 */
#ifdef SUNOS4 /* Built-in SUNOS4 makefile entry */
#ifndef UNIX
#define UNIX
#endif /* UNIX */
#ifndef BSD4
#define BSD4
#endif /* BSD4 */
#ifndef NOSETBUF
#define NOSETBUF
#endif /* NOSETBUF */
#ifndef DIRENT
#define DIRENT
#endif /* DIRENT */
#ifndef NONET
#ifndef TCPSOCKET
#define TCPSOCKET
#endif /* TCPSOCKET */
#endif /* NONET */
#ifndef SAVEDUID
#define SAVEDUID
#endif /* SAVEDUID */
#ifndef DYNAMIC
#define DYNAMIC
#endif /* DYNAMIC */
#endif /* SUNOS4 */
#ifdef SOLARIS /* Built in makefile entry */
#ifndef NOSETBUF /* for Solaris 2.x */
#define NOSETBUF
#endif /* NOSETBUF */
#ifndef NOCURSES
#ifndef CK_CURSES
#define CK_CURSES
#endif /* CK_CURSES */
#endif /* NOCURSES */
#ifndef CK_NEWTERM
#define CK_NEWTERM
#endif /* CK_NEWTERM */
#ifndef DIRENT
#define DIRENT
#endif /* DIRENT */
#ifndef NONET
#ifndef TCPSOCKET
#define TCPSOCKET
#endif /* TCPSOCKET */
#endif /* NONET */
#ifndef UNIX
#define UNIX
#endif /* UNIX */
#ifndef SVR4
#define SVR4
#endif /* SVR4 */
#ifndef HADDRLIST
#define HADDRLIST
#endif /* HADDRLIST */
#ifndef STERMIOX
#define STERMIOX
#endif /* STERMIOX */
#ifndef SELECT
#define SELECT
#endif /* SELECT */
#ifndef DYNAMIC
#define DYNAMIC
#endif /* DYNAMIC */
#ifndef NOUUCP
#ifndef HDBUUCP
#define HDBUUCP
#endif /* HDBUUCP */
#endif /* NOUUCP */
#endif /* SOLARIS */
/* Features that can be eliminated from a no-file-transfer version */
#ifdef NOXFER
#ifndef NOFTP
#define NOFTP
#endif /* NOFTP */
#ifndef OS2
#ifndef NOCURSES /* Fullscreen file-transfer display */
#define NOCURSES
#endif /* NOCURSES */
#endif /* OS2 */
#ifndef NOCKXYZ /* XYZMODEM support */
#define NOCKXYZ
#endif /* NOCKXYZ */
#ifndef NOCKSPEED /* Ctrl-char unprefixing */
#define NOCKSPEED
#endif /* NOCKSPEED */
#ifndef NOSERVER /* Server mode */
#define NOSERVER
#endif /* NOSERVER */
#ifndef NOCKTIMERS /* Dynamic packet timers */
#define NOCKTIMERS
#endif /* NOCKTIMERS */
#ifndef NOPATTERNS /* File-type patterns */
#define NOPATTERNS
#endif /* NOPATTERNS */
#ifndef NOSTREAMING /* Streaming */
#define NOSTREAMING
#endif /* NOSTREAMING */
#ifndef NOIKSD /* Internet Kermit Service */
#define NOIKSD
#endif /* NOIKSD */
#ifndef NOPIPESEND /* Sending from pipes */
#define NOPIPESEND
#endif /* NOPIPESEND */
#ifndef NOAUTODL /* Autodownload */
#define NOAUTODL
#endif /* NOAUTODL */
#ifndef NOMSEND /* MSEND */
#define NOMSEND
#endif /* NOMSEND */
#ifndef NOTLOG /* Transaction logging */
#define NOTLOG
#endif /* NOTLOG */
#ifndef NOCKXXCHAR /* Packet character doubling */
#define NOCKXXCHAR
#endif /* NOCKXXCHAR */
#endif /* NOXFER */
#ifdef NOICP /* No Interactive Command Parser */
#ifndef NODIAL /* Implies No DIAL command */
#define NODIAL
#endif /* NODIAL */
#ifndef NOCKXYZ /* and no external protocols */
#define NOCKXYZ
#endif /* NOCKXYZ */
#endif /* NOICP */
#ifndef NOIKSD
#ifdef IKSDONLY
#ifndef IKSD
#define IKSD
#endif /* IKSD */
#ifndef NOLOCAL
#define NOLOCAL
#endif /* NOLOCAL */
#ifndef NOPUSH
#define NOPUSH
#endif /* NOPUSH */
#ifndef TNCODE
#define TNCODE
#endif /* TNCODE */
#ifndef TCPSOCKET
#define TCPSOCKET
#endif /* TCPSOCKET */
#ifndef NETCONN
#define NETCONN
#endif /* NETCONN */
#ifdef SUNX25
#undef SUNX25
#endif /* SUNX25 */
#ifdef IBMX25
#undef IBMX25
#endif /* IBMX25 */
#ifdef STRATUSX25
#undef STRATUSX25
#endif /* STRATUSX25 */
#ifdef CK_NETBIOS
#undef CK_NETBIOS
#endif /* CK_NETBIOS */
#ifdef SUPERLAT
#undef SUPERLAT
#endif /* SUPERLAT */
#ifdef NPIPE
#undef NPIPE
#endif /* NPIPE */
#ifdef NETFILE
#undef NETFILE
#endif /* NETFILE */
#ifdef NETCMD
#undef NETCMD
#endif /* NETCMD */
#ifdef NETPTY
#undef NETPTY
#endif /* NETPTY */
#ifdef RLOGCODE
#undef RLOGCODE
#endif /* RLOGCODE */
#ifdef NETDLL
#undef NETDLL
#endif /* NETDLL */
#ifndef NOSSH
#undef NOSSH
#endif /* NOSSH */
#ifndef NOFORWARDX
#define NOFORWARDX
#endif /* NOFORWARDX */
#ifndef NOBROWSER
#define NOBROWSER
#endif /* NOBROWSER */
#ifndef NOHTTP
#define NOHTTP
#endif /* NOHTTP */
#ifndef NOFTP
#define NOFTP
#endif /* NOFTP */
#ifndef NO_COMPORT
#define NO_COMPORT
#endif /* NO_COMPORT */
#endif /* IKSDONLY */
#endif /* NOIKSD */
/* Features that can be eliminated from a remote-only version */
#ifdef NOLOCAL
#ifndef NOFTP
#define NOFTP
#endif /* NOFTP */
#ifndef NOHTTP
#define NOHTTP
#endif /* NOHTTP */
#ifndef NOSSH
#define NOSSH
#endif /* NOSSH */
#ifndef NOTERM
#define NOTERM
#endif /* NOTERM */
#ifndef NOCURSES /* Fullscreen file-transfer display */
#define NOCURSES
#endif /* NOCURSES */
#ifndef NODIAL
#define NODIAL
#endif /* NODIAL */
#ifndef NOSCRIPT
#define NOSCRIPT
#endif /* NOSCRIPT */
#ifndef NOSETKEY
#define NOSETKEY
#endif /* NOSETKEY */
#ifndef NOKVERBS
#define NOKVERBS
#endif /* NOKVERBS */
#ifndef NOXMIT
#define NOXMIT
#endif /* NOXMIT */
#ifdef CK_CURSES
#undef CK_CURSES
#endif /* CK_CURSES */
#ifndef IKSDONLY
#ifndef NOAPC
#define NOAPC
#endif /* NOAPC */
#ifndef NONET
#define NONET
#endif /* NONET */
#endif /* IKSDONLY */
#endif /* NOLOCAL */
#ifdef NONET
#ifndef NOTCPIP
#define NOTCPIP
#endif /* NOTCPIP */
#ifndef NONETDIR
#define NONETDIR
#endif /* NONETDIR */
#ifndef NOIKSD
#define NOIKSD
#endif /* NOIKSD */
#ifdef TNCODE
#undef TNCODE
#endif /* TNCODE */
#ifdef NETCONN
#undef NETCONN
#endif /* NETCONN */
#ifdef TCPSOCKET
#undef TCPSOCKET
#endif /* TCPSOCKET */
#ifndef NOTCPOPTS
#define NOTCPOPTS
#endif /* NOTCPOPTS */
#ifdef SUNX25
#undef SUNX25
#endif /* SUNX25 */
#ifdef IBMX25
#undef IBMX25
#endif /* IBMX25 */
#ifdef STRATUSX25
#undef STRATUSX25
#endif /* STRATUSX25 */
#ifdef CK_NETBIOS
#undef CK_NETBIOS
#endif /* CK_NETBIOS */
#ifdef SUPERLAT
#undef SUPERLAT
#endif /* SUPERLAT */
#ifdef NPIPE
#undef NPIPE
#endif /* NPIPE */
#ifdef NETFILE
#undef NETFILE
#endif /* NETFILE */
#ifdef NETCMD
#undef NETCMD
#endif /* NETCMD */
/* Commented out fdc May 2020 to allow external SSH command */
/* #ifdef NETPTY */
/* #undef NETPTY */
/* #endif /* NETPTY */
#ifdef RLOGCODE
#undef RLOGCODE
#endif /* RLOGCODE */
#ifdef NETDLL
#undef NETDLL
#endif /* NETDLL */
#ifndef NO_SSL /* added May 2020 fdc */
#define NO_SSL
#endif /* NO_SSL */
/* Commented out fdc May 2020 */
/* so we can use external ssh client in NONET builds */
/* #ifndef NOSSH */
/* #define NOSSH */
/* #endif */ /* NOSSH */
#ifndef NOFTP
#define NOFTP
#endif /* NOFTP */
#ifndef NOHTTP
#define NOHTTP
#endif /* NOHTTP */
#ifndef NOBROWSER
#define NOBROWSER
#endif /* NOBROWSER */
#ifndef NOFORWARDX
#define NOFORWARDX
#endif /* NOFORWARDX */
#endif /* NONET */
#ifdef IKSDONLY
#ifdef SUNX25
#undef SUNX25
#endif /* SUNX25 */
#ifdef IBMX25
#undef IBMX25
#endif /* IBMX25 */
#ifdef STRATUSX25
#undef STRATUSX25
#endif /* STRATUSX25 */
#ifdef CK_NETBIOS
#undef CK_NETBIOS
#endif /* CK_NETBIOS */
#ifdef SUPERLAT
#undef SUPERLAT
#endif /* SUPERLAT */
#ifdef NPIPE
#undef NPIPE
#endif /* NPIPE */
#ifdef NETFILE
#undef NETFILE
#endif /* NETFILE */
#ifdef NETCMD
#undef NETCMD
#endif /* NETCMD */
#ifdef NETPTY
#undef NETPTY
#endif /* NETPTY */
#ifdef RLOGCODE
#undef RLOGCODE
#endif /* RLOGCODE */
#ifdef NETDLL
#undef NETDLL
#endif /* NETDLL */
#ifndef NOSSH
#define NOSSH
#endif /* NOSSH */
#ifndef NOHTTP
#define NOHTTP
#endif /* NOHTTP */
#ifndef NOBROWSER
#define NOBROWSER
#endif /* NOBROWSER */
#endif /* IKSDONLY */
/*
Note that none of the above precludes TNCODE, which can be defined in
the absence of TCPSOCKET, etc, to enable server-side Telnet negotation.
*/
#ifndef TNCODE /* This is for the benefit of */
#ifdef TCPSOCKET /* modules that might need TNCODE */
#define TNCODE /* not all of ckcnet.h... */
#endif /* TCPSOCKET */
#endif /* TNCODE */
#ifndef NETCONN
#ifdef TCPSOCKET
#define NETCONN
#endif /* TCPSOCKET */
#endif /* NETCONN */
#ifndef DEFPAR /* Default parity */
#define DEFPAR 0 /* Must be here because it is used */
#endif /* DEFPAR */ /* by all classes of modules */
#ifdef NT
#ifndef OS2ORWIN32
#define OS2ORWIN32
#endif /* OS2ORWIN32 */
#ifndef OS2
#define WIN32ONLY
#endif /* OS2 */
#endif /* NT */
#ifdef OS2 /* For OS/2 debugging */
#ifndef OS2ORWIN32
#define OS2ORWIN32
#endif /* OS2ORWIN32 */
#ifdef NT
#define NOCRYPT
#include <windows.h>
#define NTSIG
#else /* NT */
#define OS2ONLY
#include <os2def.h>
#endif /* NT */
#ifndef OS2ORUNIX
#define OS2ORUNIX
#endif /* OS2ORUNIX */
#ifndef OS2ORVMS
#define OS2ORVMS
#endif /* OS2ORVMS */
#endif /* OS2 */
#include <stdio.h> /* Begin by including this. */
#include <ctype.h> /* and this. */
#ifdef VMS
#include <types.h> /* Ensure off_t. */
#include "ckvrms.h" /* Get NAMDEF NAMX_C_MAXRSS. */
#endif /* def VMS */
/* System-type compilation switches */
#ifdef FT21 /* Fortune For:Pro 2.1 implies 1.8 */
#ifndef FT18
#define FT18
#endif /* FT18 */
#endif /* FT21 */
#ifdef __bsdi__
#ifndef BSDI
#define BSDI
#endif /* BSDI */
#endif /* __bsdi__ */
#ifdef AIXPS2 /* AIXPS2 implies AIX370 */
#ifndef AIX370
#define AIX370
#endif /* AIX370 */
#endif /* AIXPS2 */
#ifdef AIX370 /* AIX PS/2 or 370 implies BSD4 */
#ifndef BSD4
#define BSD4
#endif /* BSD4 */
#endif /* AIX370 */
#ifdef AIXESA /* AIX/ESA implies BSD4.4 */
#ifndef BSD44
#define BSD44
#endif /* BSD44 */
#endif /* AIXESA */
#ifdef AIX53 /* AIX53 implies AIX52 */
#ifndef AIX52
#define AIX52
#endif /* AIX52 */
#endif /* AIX53 */
#ifdef AIX52 /* AIX52 implies AIX51 */
#ifndef AIX51
#define AIX51
#endif /* AIX51 */
#endif /* AIX52 */
#ifdef AIX51 /* AIX51 implies AIX50 */
#ifndef AIX50
#define AIX50
#endif /* AIX50 */
#endif /* AIX51 */
#ifdef AIX50 /* AIX50 implies AIX45 */
#ifndef AIX45
#define AIX45
#endif /* AIX45 */
#endif /* AIX50 */
#ifdef AIX45 /* AIX45 implies AIX44 */
#ifndef AIX44
#define AIX44
#endif /* AIX44 */
#endif /* AIX45 */
#ifdef AIX44 /* AIX44 implies AIX43 */
#ifndef AIX43
#define AIX43
#endif /* AIX43 */
#endif /* AIX44 */
#ifdef AIX43 /* AIX43 implies AIX42 */
#ifndef AIX42
#define AIX42
#endif /* AIX42 */
#endif /* AIX43 */
#ifdef AIX42 /* AIX42 implies AIX41 */
#ifndef AIX41
#define AIX41
#endif /* AIX41 */
#endif /* AIX42 */
#ifdef SV68R3V6 /* System V/68 R32V6 implies SVR3 */
#ifndef SVR3
#define SVR3
#endif /* SVR3 */
#endif /* SV68R3V6 */
#ifdef SV88R32 /* System V/88 R32 implies SVR3 */
#ifndef SVR3
#define SVR3
#endif /* SVR3 */
#endif /* SV88R32 */
#ifdef DGUX540 /* DG UX 5.40 implies Sys V R 4 */
#ifndef SVR4
#define SVR4
#endif /* SVR4 */
#endif /* DGUX540 */
#ifndef DGUX
#ifdef DGUX540 /* DG/UX 5.40 implies DGUX */
#define DGUX
#else
#ifdef DGUX430 /* So does DG/UX 4.30 */
#define DGUX
#endif /* DGUX430 */
#endif /* DGUX540 */
#endif /* DGUX */
#ifdef IRIX65 /* IRIX 6.5 implies IRIX 6.4 */
#ifndef IRIX64
#define IRIX64
#endif /* IRIX64 */
#endif /* IRIX65 */
#ifdef IRIX64 /* IRIX 6.4 implies IRIX 6.2 */
#ifndef BSD44ORPOSIX
#define BSD44ORPOSIX /* for ckutio's benefit */
#endif /* BSD44ORPOSIX */
#ifndef IRIX62
#define IRIX62
#endif /* IRIX62 */
#endif /* IRIX64 */
#ifdef IRIX62 /* IRIX 6.2 implies IRIX 6.0 */
#ifndef IRIX60
#define IRIX60
#endif /* IRIX60 */
#endif /* IRIX62 */
#ifdef IRIX60 /* IRIX 6.0 implies IRIX 5.1 */
#ifndef IRIX51
#define IRIX51
#endif /* IRIX51 */
#ifndef IRIX52 /* And IRIX 5.2 (for hwfc) */
#define IRIX52
#endif /* IRIX52 */
#endif /* IRIX60 */
#ifndef IRIX /* IRIX 4.0 or greater implies IRIX */
#ifdef IRIX64
#define IRIX
#else
#ifdef IRIX62
#define IRIX
#else
#ifdef IRIX60
#define IRIX
#else
#ifdef IRIX51
#define IRIX
#else
#ifdef IRIX40
#define IRIX
#endif /* IRIX40 */
#endif /* IRIX51 */
#endif /* IRIX60 */
#endif /* IRIX62 */
#endif /* IRIX64 */
#endif /* IRIX */
#ifdef MIPS /* MIPS System V environment */
#ifndef SVR3 /* implies System V R3 or later */
#define SVR3
#endif /* SVR3 */
#endif /* MIPS */
#ifdef HPUX9 /* HP-UX 9.x */
#ifndef SVR3
#define SVR3
#endif /* SVR3 */
#ifndef HPUX
#define HPUX
#endif /* HPUX */
#ifndef HPUX9PLUS
#define HPUX9PLUS
#endif /* HPUX9PLUS */
#endif /* HPUX9 */
#ifdef HPUX10 /* HP-UX 10.x */
#ifndef HPUX1010 /* If anything higher is defined */
#ifdef HPUX1020 /* define HPUX1010 too. */
#define HPUX1010
#endif /* HPUX1020 */
#ifdef HPUX1030
#define HPUX1010
#endif /* HPUX1030 */
#endif /* HPUX1010 */
#ifdef HPUX1100 /* HP-UX 11.00 implies 10.10 */
#ifndef HPUX1010
#define HPUX1010
#endif /* HPUX1010 */
#endif /* HPUX1100 */
#ifndef SVR4
#define SVR4
#endif /* SVR4 */
#ifndef HPUX
#define HPUX
#endif /* HPUX */
#ifndef HPUX9PLUS
#define HPUX9PLUS
#endif /* HPUX9PLUS */
#endif /* HPUX10 */
#ifdef QNX /* QNX Software Systems Inc */
#ifndef POSIX /* QNX 4.0 or later is POSIX */
#define POSIX
#endif /* POSIX */
#ifndef __386__ /* Comes in 16-bit and 32-bit */
#define __16BIT__
#define CK_QNX16
#else
#define __32BIT__
#define CK_QNX32
#endif /* __386__ */
#endif /* QNX */
/*
4.4BSD is a mixture of System V R4, POSIX, and 4.3BSD.
*/
#ifdef BSD44 /* 4.4 BSD */
#ifndef SVR4 /* BSD44 implies SVR4 */
#define SVR4
#endif /* SVR4 */
#ifndef NOSETBUF /* NOSETBUF is safe */
#define NOSETBUF
#endif /* NOSETBUF */
#ifndef DIRENT /* Uses <dirent.h> */
#define DIRENT
#endif /* DIRENT */
#endif /* BSD44 */
#ifdef OPENBSD /* OpenBSD might or might not */
#ifndef __OpenBSD__ /* have this defined... */
#define __OpenBSD__
#endif /* __OpenBSD__ */
#endif /* OPENBSD */
#ifdef SVR3 /* SVR3 implies ATTSV */