home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD1.img
/
d1xx
/
d109
/
uupc
/
source
/
dcp.h
< prev
next >
Wrap
C/C++ Source or Header
|
1987-10-28
|
2KB
|
106 lines
/* DCP a uucp clone. Copyright Richard H. Lamb 1985,1986,1987 */
#include <stdio.h> /* Standard UNIX definitions */
#include "host.h" /* Host specific definitions */
FILE * FOPEN();
int CREAT();
#define SYSTEMS "systems"
#define LOGFILE "LOGFILE"
#define SYSLOG "SYSLOG"
#define MSGTIME 20
#define MAXPACK 256
#define ACK 4 /* general definitions */
#define NAK 2
#define DATA 0
#define CLOSE 1
#define ERROR 10
#define EMPTY 11
#define SLAVE 0
#define MASTER 1
#ifndef TRUE
#define TRUE (-1)
#define FALSE 0
#endif
#define SAME 0
#define FAILED -1
#define OK 0
/* L.sys field defines */
#define FLD_REMOTE 0
#define FLD_CCTIME 1
#define FLD_DEVICE 2
#define FLD_TYPE 3
#define FLD_SPEED 4
#define FLD_PROTO 5
#define FLD_EXPECT 6
#define FLD_SEND 7
/**/
typedef int (*procref)();
typedef struct {
char type;
procref a;
procref b;
procref c;
procref d;
} Proto;
/* the various protocols available. Add here for others */
extern procref getpkt, sendpkt, openpk, closepk;
extern int ggetpkt(), gsendpkt(), gopenpk(), gclosepk();
/*
extern int kgetpkt(), ksendpkt(), kopenpk(), kclosepk();
extern int rgetpkt(), rsendpkt(), ropenpk(), rclosepk();
extern int tgetpkt(), tsendpkt(), topenpk(), tclosepk();
*/
/**/
extern int pktsize; /* packet size for this pro*/
extern FILE *logfile; /* system log file */
extern FILE *syslog; /* system log file */
extern FILE *fw; /* cfile pointer */
extern char cfile[80]; /* work file pointer */
extern int remote; /* -1 means we're remote*/
extern int findwork;
extern int msgtime; /* timout setting */
extern char fromfile[132];
extern char hostfile[132]; /* host version of fromfile */
extern char tofile[132];
extern char state; /* present state */
extern int fp; /* current disk file ptr */
extern int size; /* nbytes in buff */
extern FILE *fsys;
extern char Rmtname[20];
extern char rmtname[20];
extern char *cctime;
extern char proto[5];
extern char sysline[BUFSIZ];
extern char s_systems[64];
extern char s_logfile[64];
extern char s_syslog[64];
extern char *flds[60];
extern int kflds;
extern int debuglevel; /* debugging flag */
extern unsigned int checksum();
extern char *index();
extern char *rindex();
extern char *curdir;