diff options
author | Chuck Miller <shadowmil@gmail.com> | 2009-12-25 05:00:31 -0500 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-12-26 00:40:11 -0700 |
commit | 634aeeb9d58b01f9de6632a014a063ef0c4cf31e (patch) | |
tree | 70023dd2bcc12a3f96ec6f118d80e27411920531 /src/common/socket.h | |
parent | 113fcc4f0a7a0921e94bc415515dd4b393a29d60 (diff) | |
download | tmwa-634aeeb9d58b01f9de6632a014a063ef0c4cf31e.tar.gz tmwa-634aeeb9d58b01f9de6632a014a063ef0c4cf31e.tar.bz2 tmwa-634aeeb9d58b01f9de6632a014a063ef0c4cf31e.tar.xz tmwa-634aeeb9d58b01f9de6632a014a063ef0c4cf31e.zip |
Used the "indent" C formatting program from GNU to do some clean ups
The command options used was:
-nbad -bap -sc -bl -blf -bli0 -cli4 -cbi0
-di5 -nbc -bls -ip2 -nut -ts4 -bap -i4 -sob -npsl
Diffstat (limited to 'src/common/socket.h')
-rw-r--r-- | src/common/socket.h | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/common/socket.h b/src/common/socket.h index b67e660..aa4f91f 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -43,33 +43,34 @@ #ifdef __INTERIX #define FD_SETSIZE 4096 -#endif // __INTERIX +#endif // __INTERIX /* Removed Cygwin FD_SETSIZE declarations, now are directly passed on to the compiler through Makefile [Valaris] */ // Struct declaration -struct socket_data{ - int eof; - time_t created; - int connected; - unsigned char *rdata,*wdata; - int max_rdata,max_wdata; - int rdata_size,wdata_size; - int rdata_pos; - struct sockaddr_in client_addr; - int (*func_recv)(int); - int (*func_send)(int); - int (*func_parse)(int); - void* session_data; +struct socket_data +{ + int eof; + time_t created; + int connected; + unsigned char *rdata, *wdata; + int max_rdata, max_wdata; + int rdata_size, wdata_size; + int rdata_pos; + struct sockaddr_in client_addr; + int (*func_recv) (int); + int (*func_send) (int); + int (*func_parse) (int); + void *session_data; }; // Data prototype declaration #ifdef LCCWIN32 - #undef FD_SETSIZE - #define FD_SETSIZE 4096 +#undef FD_SETSIZE +#define FD_SETSIZE 4096 #endif @@ -79,32 +80,31 @@ struct socket_data{ // socket timeout to establish a full connection in seconds #define CONNECT_TIMEOUT 15 - extern struct socket_data *session[FD_SETSIZE]; -extern int rfifo_size,wfifo_size; +extern int rfifo_size, wfifo_size; extern int fd_max; // Function prototype declaration -int make_listen_port(int); -int make_connection(long,int); -int delete_session(int); -int realloc_fifo(int fd,int rfifo_size,int wfifo_size); -int WFIFOSET(int fd,int len); -int RFIFOSKIP(int fd,int len); +int make_listen_port (int); +int make_connection (long, int); +int delete_session (int); +int realloc_fifo (int fd, int rfifo_size, int wfifo_size); +int WFIFOSET (int fd, int len); +int RFIFOSKIP (int fd, int len); -int do_sendrecv(int next); -int do_parsepacket(void); -void do_socket(void); +int do_sendrecv (int next); +int do_parsepacket (void); +void do_socket (void); -void set_defaultparse(int (*defaultparse)(int)); +void set_defaultparse (int (*defaultparse) (int)); -int Net_Init(void); +int Net_Init (void); -int fclose_(FILE *fp); -FILE *fopen_(const char *path, const char *mode); +int fclose_ (FILE * fp); +FILE *fopen_ (const char *path, const char *mode); -int free_fds(); +int free_fds (); -#endif // _SOCKET_H_ +#endif // _SOCKET_H_ |