Properly declare functions in headers; remove redundant declarations.
This commit is contained in:
parent
731fcaf98f
commit
d59bc20516
8 changed files with 24 additions and 19 deletions
|
@ -69,17 +69,16 @@ clean:
|
||||||
-(del /q $(OBJFILES))
|
-(del /q $(OBJFILES))
|
||||||
-(del /q empire.exe)
|
-(del /q empire.exe)
|
||||||
|
|
||||||
# created using mkmf
|
|
||||||
expect.o: misc.h fnlist.h
|
expect.o: misc.h fnlist.h
|
||||||
globals.o: misc.h fnlist.h proto.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
|
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
|
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
|
queue.o: misc.h queue.h
|
||||||
saveargv.o: misc.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
|
serverio.o: misc.h queue.h ioqueue.h
|
||||||
tags.o: misc.h tags.h
|
tags.o: misc.h tags.h
|
||||||
termio.o: misc.h tags.h
|
termio.o: misc.h tags.h
|
||||||
|
|
|
@ -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 void enqueuecc(struct ioqueue *ioq, s_char *buf, int cc);
|
||||||
static int dequeuecc(register struct ioqueue *ioq, register 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
|
void
|
||||||
ioq_init(struct ioqueue *ioq, int bsize)
|
ioq_init(struct ioqueue *ioq, int bsize)
|
||||||
|
|
|
@ -46,3 +46,12 @@ struct io {
|
||||||
int offset; /* offset into current entry */
|
int offset; /* offset into current entry */
|
||||||
s_char *data; /* pointer to start */
|
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);
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include "proto.h"
|
#include "proto.h"
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
#include "ioqueue.h"
|
#include "ioqueue.h"
|
||||||
|
#include "tags.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -78,13 +79,10 @@ int hostport(s_char *name, struct sockaddr_in *addr);
|
||||||
int hostaddr(s_char *name, struct sockaddr_in *addr);
|
int hostaddr(s_char *name, struct sockaddr_in *addr);
|
||||||
int hostconnect(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);
|
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 handleintr(int);
|
||||||
int termio(int fd, int sock, FILE *auxfi);
|
int termio(int fd, int sock, FILE *auxfi);
|
||||||
int serverio(int s, struct ioqueue *ioq);
|
int serverio(int s, struct ioqueue *ioq);
|
||||||
void servercmd(struct ioqueue *ioq, FILE *auxfi);
|
void servercmd(struct ioqueue *ioq, FILE *auxfi);
|
||||||
void ioq_drain(struct ioqueue *ioq);
|
|
||||||
|
|
||||||
static void intr(int sig);
|
static void intr(int sig);
|
||||||
|
|
||||||
|
|
|
@ -41,4 +41,9 @@ struct qelem {
|
||||||
struct qelem *q_back;
|
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 */
|
#endif /* _QUEUE */
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include "proto.h"
|
#include "proto.h"
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
#include "ioqueue.h"
|
#include "ioqueue.h"
|
||||||
|
#include "tags.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -48,8 +49,6 @@
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern s_char *gettag(s_char *p);
|
|
||||||
|
|
||||||
s_char num_teles[64];
|
s_char num_teles[64];
|
||||||
static s_char the_prompt[1024];
|
static s_char the_prompt[1024];
|
||||||
static int mode;
|
static int mode;
|
||||||
|
@ -75,7 +74,6 @@ extern s_char *SE;
|
||||||
void
|
void
|
||||||
servercmd(struct ioqueue *ioq, FILE *auxfi)
|
servercmd(struct ioqueue *ioq, FILE *auxfi)
|
||||||
{
|
{
|
||||||
s_char *ioq_gets(struct ioqueue *, s_char *, int);
|
|
||||||
s_char buf[1024];
|
s_char buf[1024];
|
||||||
s_char *p;
|
s_char *p;
|
||||||
int code;
|
int code;
|
||||||
|
|
|
@ -40,14 +40,11 @@
|
||||||
|
|
||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#else
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void ioq_write(struct ioqueue *ioq, s_char *buf, int cc);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
serverio(int s, struct ioqueue *ioq)
|
serverio(int s, struct ioqueue *ioq)
|
||||||
|
|
|
@ -39,4 +39,7 @@ struct tagstruct {
|
||||||
struct tagstruct *next;
|
struct tagstruct *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void io_init(void);
|
||||||
|
s_char *gettag(s_char *p);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue