Category : Communication (modem) tools and utilities
Archive   : VTRANS.ZIP
Filename : C8UNIX.H

 
Output of file : C8UNIX.H contained in archive : VTRANS.ZIP
/* boolean values */
#define FALSE 0
#define TRUE 1

/* macros to determine if we're runnin a command file */
#define interact(fp) ((fp) == stdin)
#define cmdfile(fp) ((fp) != stdin)

/* check character for sequence number - one's complement */
#define seqchk(c) (255 - (c))

/* for text files, strip characters to 7 bits for comparisons */
#define strip(c) ((c) & 0x7f)

/* macros to access the individual bytes of a 16 bit word */
#define lowbyte(i) ((i) & 0xff)
#define highbyte(i) lowbyte( (i) >> 8 )

/* macro to maintain 16 bit quantities on > 16 bit machines */
#define low16(i) ((i) & 0xffff)


#define BLANK ' '
#define TAB '\t'
#define LF '\n'
#define CR '\r'

/* packet terminator character */
#define TERMINATOR LF

/* maximum number of characters read at once */
#define MAXINPUT 256

/* the number of seconds to wait for good data */
#define DATAWAIT 20

/* the number of seconds to wait for an ACK or NAK */
#define ACKWAIT 10

/* maximum length of a file name */
#define MAXFNAME 128


/* possible mode values returned by getmode() */
#define PCSEND 's'
#define PCRECV 'r'
#define EXIT 'e'

/* returned by userio.c routines upon encountering
* irrecoverable errors in command files.
*/
#define CMDERR '\0'

/* possible values returned by checktype() */
#define CRC '0'
#define CHKSUM '1'

/* values returned by cziseof() */
#define CZNOTEOF '0'
#define CZEOF '1'

/*values returned by collision() */

#define PROMPT '0'
#define OVERWRITE '1'
#define RENAME '2'

/* initial and maximum sequence counter values */
#define SEQINIT 1
#define SEQMAX 16

/* packet types - actual values used in packet headers */
#define PKT_DATA 'A'
#define PKT_ACK 'B'
#define PKT_NAK 'C'
#define PKT_ABORT 'D'
#define PKT_EOF 'F'

/* The following values are returned by read routines - these
* values and the above packet types must be mutually exclusive,
* since they all as a group constitute the possible return values
* from the packet reading routines.
*
* PKT_VALID A valid packet was received from VTERM
* PKT_TIMEOUT Timeout occurred - some data was received
* PKT_ERROR A error occurred while reading - send NAK
* PKT_REPEAT A repeat sequence number was received - send ACK
*/
#define PKT_REPEAT 'w'
#define PKT_VALID 'x'
#define PKT_TIMEOUT 'y'
#define PKT_ERROR 'z'

#define HEADERSIZE 5
#define MAXCHECK 2

/* the lengths of the CRC and CHKSUM fields */
#define LEN_CRC 2
#define LEN_CHK 1

/* maximum packet size - including SOH, header and TERMINATOR */
#define MAXPKT ( MAXINPUT + HEADERSIZE + MAXCHECK + 2 )

#define MAXRETRY 10

#define SOH 0x01
char *input(), getmode(), checktype(), *getfile() ;
extern int Debug ;


  3 Responses to “Category : Communication (modem) tools and utilities
Archive   : VTRANS.ZIP
Filename : C8UNIX.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/