home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / old / ckermit5a190 / ckcker.h < prev    next >
C/C++ Source or Header  |  2020-01-01  |  22KB  |  658 lines

  1. /* ckcker.h -- Symbol and macro definitions for C-Kermit */
  2.  
  3. /*
  4.   Author: Frank da Cruz (fdc@columbia.edu, FDCCU@CUVMA.BITNET),
  5.   Columbia University Academic Information Systems, New York City.
  6.  
  7.   Copyright (C) 1985, 1994, Trustees of Columbia University in the City of New
  8.   York.  The C-Kermit software may not be, in whole or in part, licensed or
  9.   sold for profit as a software product itself, nor may it be included in or
  10.   distributed with commercial products or otherwise distributed by commercial
  11.   concerns to their clients or customers without written permission of the
  12.   Office of Kermit Development and Distribution, Columbia University.  This
  13.   copyright notice must not be removed, altered, or obscured.
  14. */
  15.  
  16. #ifndef CKCKER_H
  17. #define CKCKER_H
  18.  
  19. #ifdef NOICP                /* No Interactive Command Parser */
  20. #ifndef NOSPL                /* implies... */
  21. #define NOSPL                /* No Script Programming Language */
  22. #endif /* NOSPL */
  23. #endif /* NOICP */
  24.  
  25. #ifdef pdp11                /* There is a maximum number of */
  26. #ifndef NOCKSPEED            /* of -D's allowed on the CC */
  27. #define NOCKSPEED            /* command line, so some of them */
  28. #endif /* NOCKSPEED */            /* have to go here... */
  29. #ifndef NOREDIRECT
  30. #define NOREDIRECT
  31. #endif /* NOREDIRECT */
  32. #ifdef WHATAMI
  33. #undef WHATAMI
  34. #endif /* WHATAMI */
  35. #endif /* pdp11 */
  36.  
  37. #ifndef NOSPL
  38. /*
  39.   The IF REMOTE-ONLY command is available only in versions
  40.   that actually can be used in remote mode, and only if we have
  41.   an interactive command parser.
  42. */
  43. #define CK_IFRO
  44. #ifdef MAC
  45. #undef CK_IFRO
  46. #else
  47. #ifdef GEMDOS
  48. #undef CK_IFRO
  49. #endif /* GEMDOS */
  50. #endif /* MAC */
  51. #endif /* NOSPL */
  52.  
  53. /* Systems whose CONNECT modules can execute Application Program Commands */
  54.  
  55. #ifndef NOAPC                /* Unless they said NO APC */
  56. #ifndef CK_APC                /* And they didn't already define it */
  57. #ifdef OS2                /* OS/2 gets it */
  58. #define CK_APC
  59. #endif /* OS2 */
  60. #ifdef UNIX                /* UNIX gets it */
  61. #define CK_APC
  62. #endif /* UNIX */
  63. #ifdef VMS                /* VMS too */
  64. #define CK_APC
  65. #endif /* VMS */
  66. #endif /* CK_APC */
  67. #endif /* NOAPC */
  68.  
  69. #ifdef NOSPL                /* Script programming language */
  70. #ifdef CK_APC                /* is required for APC. */
  71. #undef CK_APC
  72. #endif /* CK_APC */
  73. #endif /* NOSPL */
  74.  
  75. #ifdef CK_APC                /* APC buffer length */
  76. #define APCBUFLEN (CMDBL + 10)
  77. #define APC_OFF 0    /* APC OFF (disabled) */
  78. #define APC_ON 1    /* APC ON (enabled for non-dangerous commands) */
  79. #define APC_UNCH 2    /* APC UNCHECKED (enabled for ALL commands) */
  80. #endif /* CK_APC */
  81.  
  82. /* Codes for what we are doing now */
  83.  
  84. #define W_NOTHING  0            /* Nothing */
  85. #define W_SEND     2            /* SENDing or MAILing */
  86. #define W_RECV     4            /* RECEIVEing or GETting */
  87. #define W_REMO     8            /* Doing a REMOTE command */
  88. #define W_CONNECT 16            /* CONNECT mode */
  89. #define W_COMMAND 32            /* Command mode */
  90.  
  91. #ifndef NOWHATAMI
  92. #ifndef WHATAMI
  93. #define WHATAMI
  94. #endif /* WHATAMI */
  95. #endif /* NOWHATAMI */
  96.  
  97. #ifdef WHATAMI                /* Bit mask positions for WHATAMI */
  98. #define WM_SERVE  1            /* Server mode */
  99. #define WM_FMODE  2            /* File transfer mode */
  100. #define WM_FNAME  4            /* File name conversion */
  101. #define WM_FLAG3  8            /* Flag for Bit3 */
  102. #define WM_FLAG  32            /* Flag that says we got this info */
  103. #endif /* WHATAMI */
  104.  
  105. /* Terminal types */
  106. #define VT100     0            /* Also for VT52 mode */
  107. #define TEKTRONIX 1
  108.  
  109. /* Normal packet and window size */
  110.  
  111. #define MAXPACK 94            /* Maximum unextended packet size */
  112.                     /* Can't be more than 94. */
  113. #define MAXWS 32            /* Maximum window size */
  114.                     /* Can't be more than 32. */
  115.  
  116. /* Maximum long packet size for sending packets */
  117. /* Override these from cc command line via -DMAXSP=nnn */
  118.  
  119. #ifdef DYNAMIC
  120. #ifndef MAXSP
  121. #define MAXSP 9024
  122. #endif /* MAXSP */
  123. #else  /* not DYNAMIC */
  124. #ifndef MAXSP
  125. #ifdef pdp11
  126. #define MAXSP 1280
  127. #else
  128. #define MAXSP 2048
  129. #endif /* pdp11 */
  130. #endif /* MAXSP */
  131. #endif /* DYNAMIC */
  132.  
  133. /* Maximum long packet size for receiving packets */
  134. /* Override these from cc command line via -DMAXRP=nnn */
  135.  
  136. #ifdef DYNAMIC
  137. #ifndef MAXRP 
  138. #define MAXRP 9024
  139. #endif /* MAXRP */
  140. #else  /* not DYNAMIC */
  141. #ifndef MAXRP 
  142. #ifdef pdp11
  143. #define MAXRP 1280
  144. #else
  145. #define MAXRP 2048
  146. #endif /* pdp11 */
  147. #endif /* MAXRP */
  148. #endif /* DYNAMIC */
  149. /*
  150.   Default sizes for windowed packet buffers.
  151.   Override these from cc command line via -DSBSIZ=nnn, -DRBSIZ=nnn.
  152.   Or just -DBIGBUFOK.
  153.  
  154.   First, implementations where we know we can have big buffers...
  155. */
  156. #ifndef BIGBUFOK            /* If not already defined... */
  157.  
  158. #ifdef sparc                /* SPARC processors */
  159. #define BIGBUFOK
  160. #endif /* sparc */
  161.  
  162. #ifdef HPUX10                /* HP-UX 10.0 PA-RISC */
  163. #define BIGBUFOK
  164. #endif /* HPUX10 */
  165.  
  166. #ifdef NEXT                /* NeXTSTEP */
  167. #ifdef mc68000                /* on NEXT platforms... */
  168. #define BIGBUFOK
  169. #endif /* mc68000 */
  170. #endif /* NEXT */
  171.  
  172. #ifdef OS2                /* 32-bit OS/2 2.x */
  173. #ifdef __32BIT__
  174. #define BIGBUFOK
  175. #endif /* __32BIT__ */
  176. #endif /* OS2 */
  177.  
  178. #ifdef VMS                /* Any VMS is OK */
  179. #define BIGBUFOK
  180. #endif /* VMS */
  181.  
  182. #ifdef __alpha                /* DEC 64-bit Alpha AXP, e.g. OSF/1 */
  183. #ifndef BIGBUFOK            /* Might already be defined for VMS */
  184. #define BIGBUFOK
  185. #endif /* BIGBUFOK */
  186. #endif /* __alpha */
  187.  
  188. #ifdef IRIX40                /* SGI with IRIX 4.0 or later */
  189. #define BIGBUFOK
  190. #endif /* IRIX40 */
  191.  
  192. #ifdef __bsdi__                /* BSDI is OK */
  193. #define BIGBUFOK
  194. #endif /* __bsdi__ */
  195.  
  196. #endif /* BIGBUFOK */
  197.  
  198. #ifndef NOSPL                /* Query buffer length */
  199. #ifdef OS2
  200. #define QBUFL 4096
  201. #else
  202. #define QBUFL 1024
  203. #endif /* OS2 */
  204. #endif /* NOSPL */
  205.  
  206. #ifdef DYNAMIC
  207. #ifndef SBSIZ 
  208. #ifdef BIGBUFOK                /* If big buffers are safe... */
  209. #define SBSIZ 90500            /* Allow for 10 x 9024 */
  210. #else                    /* Otherwise... */
  211. #ifdef pdp11
  212. #define SBSIZ 4000
  213. #else
  214. #define SBSIZ 9050            /* Allow for 3 x 3000, etc. */
  215. #endif /* pdp11 */
  216. #endif /* BIGBUFOK */
  217. #endif /* SBSIZ */
  218.  
  219. #ifndef RBSIZ 
  220. #ifdef BIGBUFOK
  221. #define RBSIZ 90500
  222. #else
  223. #ifdef pdp11
  224. #define RBSIZ 4000
  225. #else
  226. #define RBSIZ 9050
  227. #endif /* pdp11 */
  228. #endif /* BIGBUFOK */
  229. #endif /* RBSIZ */
  230. #else  /* not DYNAMIC */
  231. #ifndef SBSIZ
  232. #define SBSIZ (MAXPACK * (MAXWS + 1))
  233. #endif /* SBSIZ */
  234. #ifndef RBSIZ
  235. #define RBSIZ (MAXPACK * (MAXWS + 1))
  236. #endif /* RBSIZ */
  237. #endif /* DYNAMIC */
  238.  
  239. /* Kermit parameters and defaults */
  240.  
  241. #define CTLQ       '#'            /* Control char prefix I will use */
  242. #define MYEBQ       '&'            /* 8th-Bit prefix char I will use */
  243. #define MYRPTQ       '~'            /* Repeat count prefix I will use */
  244.  
  245. #define MAXTRY        10            /* Times to retry a packet */
  246. #define MYPADN        0            /* How many padding chars I need */
  247. #define MYPADC        '\0'        /* Which padding character I need */
  248.  
  249. #define DMYTIM        7            /* Default timeout interval to use. */
  250. #define URTIME        10            /* Timeout interval to use on me. */
  251. #define DSRVTIM     0            /* Default server cmd wait timeout. */
  252.  
  253. #define DEFTRN        0            /* Default line turnaround handshake */
  254.  
  255. #define MYEOL        CR            /* Incoming packet terminator. */
  256.  
  257. #define DRPSIZ        90            /* Default incoming packet size. */
  258. #define DSPSIZ        90            /* Default outbound packet size. */
  259.  
  260. #define DDELAY      5            /* Default delay. */
  261. #define DSPEED        9600        /* Default line speed. */
  262.  
  263. #ifdef OS2                /* Default CONNECT-mode */
  264. #define DFESC 29            /* escape character */
  265. #else
  266. #ifdef NEXT                /* Ctrl-] for PC and NeXT */
  267. #define DFESC 29
  268. #else
  269. #ifdef GEMDOS                /* And Atari ST */
  270. #define DFESC 29
  271. #else
  272. #define DFESC 28            /* Ctrl-backslash for others */
  273. #endif /* GEMDOS */
  274. #endif /* NEXT */
  275. #endif /* OS2 */
  276.  
  277. #ifdef NOPUSH                /* NOPUSH implies NOJC */
  278. #ifndef NOJC                /* (no job control) */
  279. #define NOJC
  280. #endif /* NOJC */
  281. #endif /* NOPUSH */
  282.  
  283. #ifdef UNIX                /* Default for SET SUSPEND */
  284. #ifdef NOJC                /* UNIX but job control disabled */
  285. #define DFSUSP      0
  286. #else                    /* UNIX, job control enabled. */
  287. #define DFSUSP      1
  288. #endif /* NOJC */
  289. #else
  290. #define DFSUSP      0
  291. #endif /* UNIX */
  292.  
  293. /* Files */
  294.  
  295. #define ZCTERM      0            /* Console terminal */
  296. #define ZSTDIO      1        /* Standard input/output */
  297. #define ZIFILE        2        /* Current input file (SEND, etc) (in) */
  298. #define ZOFILE      3            /* Current output file (RECEIVE, GET) (out) */
  299. #define ZDFILE      4            /* Current debugging log file (out) */
  300. #define ZTFILE      5            /* Current transaction log file (out) */
  301. #define ZPFILE      6            /* Current packet log file (out) */
  302. #define ZSFILE      7        /* Current session log file (out) */
  303. #define ZSYSFN        8        /* Input/Output from a system function */
  304. #define ZRFILE      9           /* Local file for READ (in) */
  305. #define ZWFILE     10           /* Local file for WRITE (out) */
  306. #define ZMFILE     11        /* Miscellaneous output file, e.g. for XLATE */
  307. #define ZNFILS     12            /* How many defined file numbers */
  308.  
  309. /*
  310.  Buffered file i/o is used to avoid gratuitous function calls while encoding a
  311.  packet.  The previous way involved 2 nested function calls for EACH character
  312.  of the file.  This way, we only do 2 calls per K of data.  This reduces
  313.  packet encoding time to 1% of its former cost.  Originally added by Paul
  314.  Placeway.
  315. */
  316. #ifdef VMS        /* In VMS, allow for longest possible RMS record */
  317. #ifdef DYNAMIC
  318. #define INBUFSIZE 32768    /* File input buffer size */
  319. #define OBUFSIZE 32768     /* File output buffer size */
  320. #else /* VMS, not dynamic */
  321. #define INBUFSIZE 4096    /* File input buffer size */
  322. #define OBUFSIZE 4096     /* File output buffer size */
  323. #endif /* DYNAMIC */
  324. #else  /* Not VMS */    /* For all others, just use a 1K buffer */
  325. #ifdef STRATUS
  326. #ifdef DYNAMIC
  327. #define INBUFSIZE 32767    /* File input buffer size */
  328. #define OBUFSIZE 32767     /* File output buffer size */
  329. #else /* STRATUS, not DYNAMIC */
  330. #define INBUFSIZE 4096    /* File input buffer size */
  331. #define OBUFSIZE 4096     /* File output buffer size */
  332. #endif /* DYNAMIC */
  333. #else /* not STRATUS */
  334. #ifdef OS2   /* take advantage of HPFS block allocation */
  335. #define INBUFSIZE 4096
  336. #define OBUFSIZE 4096
  337. #else /* not OS2 */
  338. #define INBUFSIZE 1024
  339. #define OBUFSIZE 1024
  340. #endif /* OS2 */
  341. #endif /* STRATUS */
  342. #endif /* VMS */
  343.  
  344. /* get the next char; sorta like a getc() macro */
  345. #define zminchar() (((--zincnt)>=0) ? ((int)(*zinptr++) & 0377) : zinfill())
  346.  
  347. /* stuff a character into the input buffer */
  348. #define zmstuff(c) zinptr--, *zinptr = c, zincnt++
  349.  
  350. /* put a character to a file, like putchar() macro */
  351. #define zmchout(c) \
  352. ((*zoutptr++=(char)(c)),(((++zoutcnt)>=OBUFSIZE)?zoutdump():0))
  353.  
  354. /* Screen functions */
  355.  
  356. #define SCR_FN 1        /* filename */
  357. #define SCR_AN 2        /* as-name */
  358. #define SCR_FS 3     /* file-size */
  359. #define SCR_XD 4        /* x-packet data */
  360. #define SCR_ST 5          /* File status: */
  361. #define   ST_OK   0       /*  Transferred OK */
  362. #define   ST_DISC 1     /*  Discarded */
  363. #define   ST_INT  2     /*  Interrupted */
  364. #define   ST_SKIP 3     /*  Skipped */
  365. #define   ST_ERR  4     /*  Fatal Error */
  366. #define   ST_REFU 5     /*  Refused (use Attribute codes for reason) */
  367. #define   ST_INC  6    /* Incompletely received */
  368. #define SCR_PN 6        /* packet number */
  369. #define SCR_PT 7        /* packet type or pseudotype */
  370. #define SCR_TC 8        /* transaction complete */
  371. #define SCR_EM 9        /* error message */
  372. #define SCR_WM 10       /* warning message */
  373. #define SCR_TU 11    /* arbitrary undelimited text */
  374. #define SCR_TN 12       /* arbitrary new text, delimited at beginning */
  375. #define SCR_TZ 13       /* arbitrary text, delimited at end */
  376. #define SCR_QE 14    /* quantity equals (e.g. "foo: 7") */
  377. #define SCR_CW 15    /* close screen window */
  378. #define SCR_CD 16       /* display current directory */
  379.  
  380. /* Macros */
  381.  
  382. #define tochar(ch)  (((ch) + SP ) & 0xFF )    /* Number to character */
  383. #define xunchar(ch) (((ch) - SP ) & 0xFF )    /* Character to number */
  384. #define ctl(ch)     (((ch) ^ 64 ) & 0xFF )    /* Controllify/Uncontrollify */
  385. #define unpar(ch)   (((ch) & 127) & 0xFF )    /* Clear parity bit */
  386.  
  387. /* Modem dialing result codes */
  388.  
  389. #ifndef NODIAL                /* DIAL command result codes */
  390. #define DIA_UNK  -1            /* No DIAL command given yet */
  391. #define DIA_OK    0            /* DIAL succeeded */
  392. #define DIA_NOMO  1            /* Modem type not specified */
  393. #define DIA_NOLI  2            /* Communication line not spec'd */
  394. #define DIA_OPEN  3            /* Line can't be opened */
  395. #define DIA_NOSP  4            /* Speed not specified */
  396. #define DIA_HANG  5            /* Hangup failure */
  397. #define DIA_IE    6            /* Internal error (malloc, etc) */
  398. #define DIA_IO    7            /* I/O error */
  399. #define DIA_TIMO  8            /* Dial timeout expired */
  400. #define DIA_INTR  9            /* Dialing interrupted by user */
  401. #define DIA_NRDY  10            /* Modem not ready */
  402. #define DIA_ERR   20            /* Modem command error */
  403. #define DIA_NOIN  21            /* Failure to initialize modem */
  404. #define DIA_BUSY  22            /* Phone busy */
  405. #define DIA_NOCA  23            /* No carrier */
  406. #define DIA_NODT  24            /* No dialtone */
  407. #define DIA_RING  25            /* Ring, incoming call */
  408. #define DIA_NOAN  26            /* No answer */
  409. #define DIA_DISC  27            /* Disconnected */
  410. #define DIA_VOIC  28            /* Answered by voice */
  411. #define DIA_NOAC  29            /* Access denied, forbidden call */
  412. #define DIA_UERR  98            /* Unknown error */
  413. #define DIA_UNSP  99        /* Unspecified failure detected by modem */
  414. #endif /* NODIAL */
  415.  
  416. /* Symbols for File Attributes */
  417.  
  418. #define AT_XALL  0            /* All of them */
  419. #define AT_ALLY  1            /* All of them on (Yes) */
  420. #define AT_ALLN  2            /* All of them off (no) */
  421. #define AT_LENK  3            /* Length in K */
  422. #define AT_FTYP  4            /* File Type */
  423. #define AT_DATE  5            /* Creation date */
  424. #define AT_CREA  6            /* Creator */
  425. #define AT_ACCT  7            /* Account */
  426. #define AT_AREA  8            /* Area */
  427. #define AT_PSWD  9            /* Password for area */
  428. #define AT_BLKS 10            /* Blocksize */
  429. #define AT_ACCE 11            /* Access */
  430. #define AT_ENCO 12            /* Encoding */
  431. #define AT_DISP 13            /* Disposition */
  432. #define AT_LPRO 14            /* Local Protection */
  433. #define AT_GPRO 15            /* Generic Protection */
  434. #define AT_SYSI 16            /* System ID */
  435. #define AT_RECF 17            /* Record Format */
  436. #define AT_SYSP 18            /* System-Dependent Parameters */
  437. #define AT_LENB 19            /* Length in Bytes */
  438. #define AT_EOA  20            /* End of Attributes */
  439.  
  440. /* Kermit packet information structure */
  441.  
  442. struct pktinfo {            /* Packet information structure */
  443.     CHAR *bf_adr;            /*  buffer address */
  444.     int   bf_len;            /*  buffer length */
  445.     CHAR *pk_adr;            /* Packet address within buffer */
  446.     int   pk_len;            /*  length of data within buffer */
  447.     int   pk_typ;            /*  packet type */
  448.     int   pk_seq;            /*  packet sequence number */
  449.     int   pk_flg;            /*  ack'd bit */
  450.     int   pk_rtr;            /*  retransmission count */
  451. };
  452.  
  453. /* Send Modes (indicating which type of SEND command was used) */
  454.  
  455. #define SM_SEND     0
  456. #define SM_MSEND    1
  457. #define SM_RESEND   2
  458. #define SM_PSEND    3
  459. #define SM_MAIL     4
  460. #define SM_PRINT    5
  461.  
  462. /* File-related symbols and structures */
  463.  
  464. #define   XYFILN 0      /*  Naming  */
  465. #define   XYFILT 1      /*  Type    */
  466. #define     XYFT_T 0    /*    Text  */
  467. #define     XYFT_B 1    /*    Binary */
  468. #define     XYFT_I 2    /*    Image or Block (VMS) */
  469. #define     XYFT_L 3    /*    Labeled (tagged binary) (VMS or OS/2) */
  470. #define     XYFT_U 4    /*    Binary Undefined (VMS) */
  471. #define     XYFT_M 5    /*    MacBinary (Macintosh) */
  472. #define   XYFILW 2      /*  Warning */
  473. #define   XYFILD 3      /*  Display */
  474. #define     XYFD_N 0    /*    None, Off */
  475. #define     XYFD_R 1    /*    Regular, Dots */
  476. #define     XYFD_C 2    /*    Cursor-positioning (e.g. with curses) */
  477. #define     XYFD_S 3    /*    Simple counter */
  478. #define   XYFILC 4      /*  Character set */
  479. #define   XYFILF 5      /*  Record Format */
  480. #define     XYFF_S  0   /*    Stream */
  481. #define     XYFF_V  1   /*    Variable */
  482. #define     XYFF_VB 2   /*    Variable with RCW's */
  483. #define     XYFF_F  3   /*    Fixed length */
  484. #define     XYFF_U  4   /*    Undefined */
  485. #define   XYFILR 6      /*  Record length */
  486. #define   XYFILO 7      /*  Organization */
  487. #define     XYFO_S 0    /*    Sequential */
  488. #define     XYFO_I 1    /*    Indexed */
  489. #define     XYFO_R 2    /*    Relative */
  490. #define   XYFILP 8      /*  Printer carriage control */
  491. #define     XYFP_N 0    /*    Newline (imbedded control characters) */
  492. #define     XYFP_F 1    /*    FORTRAN (space, 1, +, etc, in column 1 */
  493. #define     XYFP_P 2    /*    Special printer carriage controls */
  494. #define     XYFP_X 4    /*    None */
  495. #define   XYFILX 9      /*  Collision Action */
  496. #define     XYFX_A 3    /*    Append */
  497. #define     XYFX_Q 5    /*    Ask */
  498. #define     XYFX_B 2    /*    Backup */
  499. #define     XYFX_D 4    /*    Discard */
  500. #define     XYFX_R 0    /*    Rename */
  501. #define     XYFX_X 1    /*    Replace */
  502. #define     XYFX_U 6    /*    Update */
  503. #define   XYFILB 10     /*  Blocksize */
  504. #define   XYFILZ 11     /*  Disposition */
  505. #define     XYFZ_N 0    /*    New, Create */
  506. #define     XYFZ_A 1    /*    New, append if file exists, else create */
  507. #define     XYFZ_O 2    /*    Old, file must exist */
  508. #define     XYFZ_X 3    /*    Output to pipe/process */
  509. #define     XYFZ_Y 4    /*    Input from pipe/process */
  510. #define   XYFILS 12     /*  File Byte Size */
  511. #define   XYFILL 13     /*  File Label (VMS) */
  512. #define   XYFILI 14     /*  File Incomplete */
  513. #define   XYFILQ 15     /*  File path action (strip or not) */
  514.  
  515. struct tt_info_rec {            /* Terminal emulation info */
  516.     char *x_name;
  517.     char *x_id;
  518. };
  519.  
  520. /* ANSI-style forward declarations for protocol-related functions. */
  521.  
  522. _PROTOTYP( int input, (void) );
  523. _PROTOTYP( int inibufs, (int, int) );
  524. _PROTOTYP( int makebuf, (int, int, CHAR [], struct pktinfo *) );
  525. _PROTOTYP( int mksbuf, (int) );
  526. _PROTOTYP( int mkrbuf, (int) );
  527. _PROTOTYP( int spack, (char, int, int, CHAR *) );
  528. _PROTOTYP( VOID proto, (void) );
  529. _PROTOTYP( int rpack, (void) );
  530. _PROTOTYP( int ack1, (CHAR *) );
  531. _PROTOTYP( int ackn, (int) );
  532. _PROTOTYP( int ackns, (int, CHAR *) );
  533. _PROTOTYP( int nack, (int) );
  534. _PROTOTYP( int resend, (int) );
  535. _PROTOTYP( int errpkt, (CHAR *) );
  536. _PROTOTYP( VOID logpkt, (char, int, CHAR *) );
  537. _PROTOTYP( CHAR dopar, (CHAR) );
  538. _PROTOTYP( int chk1, (CHAR *) );
  539. _PROTOTYP( unsigned int chk2, (CHAR *) );
  540. _PROTOTYP( unsigned int chk3, (CHAR *) );
  541. _PROTOTYP( int sipkt, (char) );
  542. _PROTOTYP( int sinit, (void) );
  543. _PROTOTYP( VOID rinit, (CHAR *) );
  544. _PROTOTYP( int spar, (CHAR *) );
  545. _PROTOTYP( int rcvfil, (char *) );
  546. _PROTOTYP( CHAR * rpar, (void) );
  547. _PROTOTYP( CHAR * rpar, (void) );
  548. _PROTOTYP( int gnfile, (void) );
  549. _PROTOTYP( int getsbuf, (int) );
  550. _PROTOTYP( int getrbuf, (void) );
  551. _PROTOTYP( int freesbuf, (int) );
  552. _PROTOTYP( int freerbuf, (int) );
  553. _PROTOTYP( int dumpsbuf, (void) );
  554. _PROTOTYP( int dumprbuf, (void) );
  555. _PROTOTYP( VOID freerpkt, (int) );
  556. _PROTOTYP( int chkwin, (int, int, int) );
  557. _PROTOTYP( int rsattr, (CHAR *) );
  558. _PROTOTYP( char *getreason, (char *) );
  559. _PROTOTYP( int scmd, (char, CHAR *) );
  560. _PROTOTYP( int encstr, (CHAR *) );
  561. _PROTOTYP( int decode, (CHAR *, int (*)(char), int) );
  562. _PROTOTYP( int fnparse, (char *) );
  563. _PROTOTYP( int syscmd, (char *, char *) );
  564. _PROTOTYP( int cwd, (char *) );
  565. _PROTOTYP( VOID screen, (int, char, long, char *) );
  566. _PROTOTYP( int remset, (char *) );
  567. _PROTOTYP( int initattr, (struct zattr *) );
  568. _PROTOTYP( int gattr, (CHAR *, struct zattr *) );
  569. _PROTOTYP( int adebu, (char *, struct zattr *) );
  570. _PROTOTYP( int canned, (CHAR *) );
  571. _PROTOTYP( int opent, (struct zattr *) );
  572. _PROTOTYP( int opena, (char *, struct zattr *) );
  573. _PROTOTYP( int openi, (char *) );
  574. _PROTOTYP( int openo, (char *, struct zattr *, struct filinfo *) );
  575. _PROTOTYP( int reof, (char *, struct zattr *) );
  576. _PROTOTYP( VOID reot, (void) );
  577. _PROTOTYP( int sfile, (int) );
  578. _PROTOTYP( int sattr, (int) );
  579. _PROTOTYP( int sdata, (void) );
  580. _PROTOTYP( int seof, (CHAR *) );
  581. _PROTOTYP( int sxeof, (CHAR *) );
  582. _PROTOTYP( int seot, (void) );
  583. _PROTOTYP( int window, (int) );
  584. _PROTOTYP( int errmsg, (char *) );
  585. _PROTOTYP( int clsif, (void) );
  586. _PROTOTYP( int clsof, (int) );
  587. _PROTOTYP( CHAR setgen, (char, char *, char *, char *) );
  588. _PROTOTYP( int getpkt, (int, int) );
  589. _PROTOTYP( int putsrv, (char) );
  590. _PROTOTYP( int puttrm, (char) );
  591. _PROTOTYP( int putque, (char) );
  592. _PROTOTYP( int putfil, (char) );
  593. _PROTOTYP( VOID zdstuff, (CHAR) );
  594. _PROTOTYP( int tinit, (void) );
  595. _PROTOTYP( VOID pktinit, (void) );
  596. _PROTOTYP( VOID rinit, (CHAR *) );
  597. _PROTOTYP( VOID resetc, (void) );
  598. _PROTOTYP( VOID xsinit, (void) );
  599. _PROTOTYP( int adjpkl, (int,int,int) );
  600. _PROTOTYP( int chktimo, (int,int) );
  601. _PROTOTYP( int nxtpkt, (void) );
  602. _PROTOTYP( int ack, (void) );
  603. _PROTOTYP( int ackns, (int, CHAR *) );
  604. _PROTOTYP( int ackn, (int) );
  605. _PROTOTYP( int ack1, (CHAR *) );
  606. _PROTOTYP( int nack, (int) );
  607. _PROTOTYP( VOID rcalcpsz, (void) );
  608. _PROTOTYP( int resend, (int) );
  609. _PROTOTYP( int errpkt, (CHAR *) );
  610. _PROTOTYP( int srinit, (void) );
  611. _PROTOTYP( VOID tstats, (void) );
  612. _PROTOTYP( VOID fstats, (void) );
  613. _PROTOTYP( VOID intmsg, (long) );
  614. _PROTOTYP( VOID ermsg, (char *) );
  615. _PROTOTYP( int chkint, (void) );
  616. _PROTOTYP( VOID sdebu, (int) );
  617. _PROTOTYP( VOID rdebu, (CHAR *, int) );
  618. _PROTOTYP( char * dbchr, ( int ) );
  619. #ifdef COMMENT
  620. _PROTOTYP( SIGTYP stptrap, (int, int) );
  621. _PROTOTYP( SIGTYP trap, (int, int) );
  622. #else
  623. _PROTOTYP( SIGTYP stptrap, (int) );
  624. _PROTOTYP( SIGTYP trap, (int) );
  625. #endif /* COMMENT */
  626.  
  627. /* User interface functions needed by main program, etc. */
  628.  
  629. _PROTOTYP( VOID prescan, (int) );
  630. _PROTOTYP( VOID setint, (void) );
  631. _PROTOTYP( VOID cmdini, (void) );
  632. _PROTOTYP( int dotake, (char *) );
  633. _PROTOTYP( int cmdlin, (void) );
  634. _PROTOTYP( int conect, (void) );
  635. _PROTOTYP( int ckcgetc, (int) );
  636. _PROTOTYP( int ckcputc, (int) );
  637. _PROTOTYP (int mdmhup, (void) );
  638. _PROTOTYP( VOID herald, (void) );
  639. _PROTOTYP( VOID fixcmd, (void) );
  640. _PROTOTYP( int doarg, (char) );
  641. _PROTOTYP( VOID usage, (void) );
  642. _PROTOTYP( VOID doclean, (void) );
  643. _PROTOTYP( int sndhlp, (char *) );
  644. _PROTOTYP( VOID ckhost, (char *, int) );
  645. _PROTOTYP( int gettcs, (int, int) );
  646.  
  647. #ifdef KANJI
  648. _PROTOTYP( int zkanji, (int (*)(void)) ); /* Kanji function prototypes */
  649. _PROTOTYP( int zkanjf, (void) );
  650. _PROTOTYP( int zkanjz, (void) );
  651. _PROTOTYP( int xkanjz, (int (*)(char) ) );
  652. _PROTOTYP( int xkanji, (int, int (*)(char) ) );
  653. #endif /* KANJI */
  654.  
  655. #endif /* CKCKER_H */
  656.  
  657. /* End of ckcker.h */
  658.