home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
sinclairqla
/
qlker.h
< prev
next >
Wrap
C/C++ Source or Header
|
1987-05-07
|
5KB
|
133 lines
/*
KER_H - QL-Kermit header file
Based on ckuker.h, (C) Columbia University
*/
/* Include files */
#include "flp1_stdio_h" /* Standard I/O definitions */
#include "flp1_qdos_h" /* QDOS system calls */
/* Switcher states */
#define ABORT 0 /* Abort */
#define COMP 1 /* Complete */
#define IDLE 2 /* Idle */
#define R_INIT 3 /* Receive Initiate */
#define R_FILE 4 /* Receive File */
#define R_DATA 5 /* Receive Data */
#define S_INIT 6 /* Send Initiate */
#define S_FILE 7 /* Send File */
#define S_DATA 8 /* Send Data */
#define S_EOF 9 /* Send EOF */
#define S_BRK 10 /* Send EOT */
#define S_COMD 11 /* Send Generic Command */
#define G_INIT 12 /* Get Initiate */
#define T_INIT 13 /* Not used */
#define K_ERR 14 /* Send Error */
/* Pseudo-packet types */
#define INTE -2 /* CTRL-E interrupt */
#define BAD -1 /* Timeout or checksum error */
/* QL ASCII characters */
#define NUL 0 /* Null */
#define SOH 1 /* Start of packet */
#define BEL 7 /* Bell (Beep) */
#define BS 8 /* Backspace */
#define HT 9 /* Tab */
#define LF 10 /* Linefeed */
#define CR 13 /* Carriage Return */
#define SP ' ' /* Space */
#define DEL 127 /* ASCII delete (pad) */
#define DELC 194 /* CTRL-left, delete character */
#define FF 12 /* Formfeed (^L) */
#define RDIS 18 /* Redisplay (^R) */
#define LDEL 21 /* Delete line (^U) */
#define WDEL 23 /* Delete word (^W) */
#define ESC 27 /* Escape */
#define F1 232 /* Function key 1 */
#define F2 236 /* 2 */
#define F3 240 /* 3 */
#define F4 244 /* 4 */
#define F5 248 /* 5 */
/* Kermit parameters and defaults */
#define MAXPACK 94 /* Maximum packet size */
#define RBUFL 200 /* Receive buffer length */
#define MAXTRY 5 /* Times to retry a packet */
#define DMYTIM 20 /* Default timeout I use */
#define URTIME 20 /* Default timeout remote uses */
#define MYEOL CR /* EOL character I need */
#define DRPSIZ 94 /* Default incoming packet size */
#define DSPSIZ 94 /* Default outbound packet size */
#define DFSPEED "9600" /* Default line speed */
#define DDELAY 5 /* Default delay before SEND */
#define MAXTAKE 10 /* Maximum TAKE file depth */
#define MAXFILNO 10 /* Max files handled per execution */
#define BLKSIZ 512 /* Buffer size for file I/O */
#define DFTAKE "flp1_qlk_take" /* Starting TAKE file */
/* Parity types */
#define PYNONE 1
#define PYEVEN 2
#define PYODD 3
#define PYMARK 4
#define PYSPC 5
/* File transfer types */
#define FTASC 0
#define FTBIN 1
/* Debugging levels */
#define DBOFF 0
#define DBON 1
#define DBFULL 2
/* File name translation */
#define FNNORM 1
#define FNUNTR 2
/* Programming conveniences */
#define TRUE (-1) /* Boolean constants */
#define FALSE 0
#define forever while(1) /* Infinite loop */
#define endcase break /* Make switch end obvious */
typedef int bool; /* Flag data type */
#define register /* MCC C not very good on these */
/* Macro definitions */
#define tochar(ch) ((ch)+SP) /* Number to character */
#define unchar(ch) ((ch)-SP) /* Character to number */
#define ctl(ch) ((ch)^64) /* Controllify/uncontrollify */
#define unpar(ch) ((ch)&127) /* Clear parity bit */
#define debon (debug>=DBON) /* Debugging on */
#define debfull (debug==DBFULL) /* Full debugging on */