diff --git a/src/client/Makefile.standalone b/src/client/Makefile.standalone index 0c594964..149defc2 100644 --- a/src/client/Makefile.standalone +++ b/src/client/Makefile.standalone @@ -69,17 +69,16 @@ clean: -(del /q $(OBJFILES)) -(del /q empire.exe) -# created using mkmf expect.o: misc.h fnlist.h globals.o: misc.h fnlist.h proto.h -host.o: misc.h +host.o: misc.h ioqueue.o: misc.h queue.h ioqueue.h -ipglob.o: misc.h fnlist.h proto.h +ipglob.o: misc.h login.o: misc.h proto.h -main.o: misc.h proto.h queue.h ioqueue.h +main.o: misc.h proto.h queue.h ioqueue.h tags.h queue.o: misc.h queue.h saveargv.o: misc.h -servcmd.o: misc.h proto.h queue.h ioqueue.h +servcmd.o: misc.h proto.h queue.h ioqueue.h tags.h serverio.o: misc.h queue.h ioqueue.h tags.o: misc.h tags.h termio.o: misc.h tags.h diff --git a/src/client/ioqueue.c b/src/client/ioqueue.c index 68044126..e1caac94 100644 --- a/src/client/ioqueue.c +++ b/src/client/ioqueue.c @@ -43,10 +43,6 @@ static int ioqtobuf(register struct ioqueue *ioq, s_char *buf, int cc); static void enqueuecc(struct ioqueue *ioq, s_char *buf, int cc); static int dequeuecc(register struct ioqueue *ioq, register int cc); -void insque(struct qelem *, struct qelem *); -void remque(struct qelem *); -void initque(struct qelem *p); -struct qelem *makeqt(int nelem); void ioq_init(struct ioqueue *ioq, int bsize) diff --git a/src/client/ioqueue.h b/src/client/ioqueue.h index c5aeac9d..c933599a 100644 --- a/src/client/ioqueue.h +++ b/src/client/ioqueue.h @@ -46,3 +46,12 @@ struct io { int offset; /* offset into current entry */ s_char *data; /* pointer to start */ }; + +void ioq_init(struct ioqueue *ioq, int bsize); +int ioq_peek(struct ioqueue *ioq, s_char *buf, int cc); +int ioq_dequeue(struct ioqueue *ioq, int cc); +int ioq_read(struct ioqueue *ioq, s_char *buf, int cc); +void ioq_write(struct ioqueue *ioq, s_char *buf, int cc); +int ioq_qsize(struct ioqueue *ioq); +void ioq_drain(struct ioqueue *ioq); +s_char *ioq_gets(struct ioqueue *ioq, s_char *buf, int cc); diff --git a/src/client/main.c b/src/client/main.c index e3571a15..827bba72 100644 --- a/src/client/main.c +++ b/src/client/main.c @@ -40,6 +40,7 @@ #include "proto.h" #include "queue.h" #include "ioqueue.h" +#include "tags.h" #include #include @@ -78,13 +79,10 @@ int hostport(s_char *name, struct sockaddr_in *addr); int hostaddr(s_char *name, struct sockaddr_in *addr); int hostconnect(struct sockaddr_in *addr); int login(int s, s_char *uname, s_char *cname, s_char *cpass, int kill_proc); -void ioq_init(struct ioqueue *ioq, int bsize); -void io_init(void); int handleintr(int); int termio(int fd, int sock, FILE *auxfi); int serverio(int s, struct ioqueue *ioq); void servercmd(struct ioqueue *ioq, FILE *auxfi); -void ioq_drain(struct ioqueue *ioq); static void intr(int sig); diff --git a/src/client/queue.h b/src/client/queue.h index bb01ae35..7e1cc431 100644 --- a/src/client/queue.h +++ b/src/client/queue.h @@ -41,4 +41,9 @@ struct qelem { struct qelem *q_back; }; +void insque(struct qelem *p, struct qelem *q); +void remque(struct qelem *p); +void initque(struct qelem *p); +struct qelem *makeqt(int nelem); + #endif /* _QUEUE */ diff --git a/src/client/servcmd.c b/src/client/servcmd.c index bde8fa96..f2ae219d 100644 --- a/src/client/servcmd.c +++ b/src/client/servcmd.c @@ -36,6 +36,7 @@ #include "proto.h" #include "queue.h" #include "ioqueue.h" +#include "tags.h" #include #include @@ -48,8 +49,6 @@ #include #endif -extern s_char *gettag(s_char *p); - s_char num_teles[64]; static s_char the_prompt[1024]; static int mode; @@ -75,7 +74,6 @@ extern s_char *SE; void servercmd(struct ioqueue *ioq, FILE *auxfi) { - s_char *ioq_gets(struct ioqueue *, s_char *, int); s_char buf[1024]; s_char *p; int code; diff --git a/src/client/serverio.c b/src/client/serverio.c index 3420fc0e..b2ccb0c1 100644 --- a/src/client/serverio.c +++ b/src/client/serverio.c @@ -40,14 +40,11 @@ #if !defined(_WIN32) #include -#endif - -#ifdef _WIN32 +#else #include #include #endif -void ioq_write(struct ioqueue *ioq, s_char *buf, int cc); int serverio(int s, struct ioqueue *ioq) diff --git a/src/client/tags.h b/src/client/tags.h index 806fd606..69a69f5d 100644 --- a/src/client/tags.h +++ b/src/client/tags.h @@ -39,4 +39,7 @@ struct tagstruct { struct tagstruct *next; }; +void io_init(void); +s_char *gettag(s_char *p); + #endif