diff options
author | Alex Dupre <ale@FreeBSD.org> | 2004-06-18 07:30:07 +0000 |
---|---|---|
committer | Alex Dupre <ale@FreeBSD.org> | 2004-06-18 07:30:07 +0000 |
commit | 4da31eb8bea4007c1e46748e2faae7ca58df307f (patch) | |
tree | 1bb6861b44d18a7f99b10a0cecafed9e92cc8e01 /games/tetrinet-x/files | |
parent | d5b6a64e68f32a7a29bdb173b81f4528e30e7b28 (diff) | |
download | ports-4da31eb8bea4007c1e46748e2faae7ca58df307f.tar.gz ports-4da31eb8bea4007c1e46748e2faae7ca58df307f.zip |
- Convert varargs to stdarg
- Remove BROKEN
- Respect CC and CFLAGS
- Make portlint happier
Approved by: maintainer
Notes
Notes:
svn path=/head/; revision=111702
Diffstat (limited to 'games/tetrinet-x/files')
-rw-r--r-- | games/tetrinet-x/files/patch-src::main.c | 53 | ||||
-rw-r--r-- | games/tetrinet-x/files/patch-src::main.h | 20 | ||||
-rw-r--r-- | games/tetrinet-x/files/patch-src::net.c | 18 |
3 files changed, 91 insertions, 0 deletions
diff --git a/games/tetrinet-x/files/patch-src::main.c b/games/tetrinet-x/files/patch-src::main.c new file mode 100644 index 000000000000..a9939a7d746d --- /dev/null +++ b/games/tetrinet-x/files/patch-src::main.c @@ -0,0 +1,53 @@ +--- src/main.c.orig Thu Dec 24 06:24:50 1998 ++++ src/main.c Thu Jun 17 10:06:39 2004 +@@ -319,12 +319,10 @@ + + /* lvprintf( priority, same as printf ) - Logs to the log IF priority is smaller */ + /* or equal to game.verbose */ +-void lvprintf(va_alist) +-va_dcl ++void lvprintf(int priority, char *format, ...) + { /* No bounds checking. Be very careful what you log */ +- char *format; va_list va; static char SBUF2[768];int priority; +- va_start(va); +- priority=va_arg(va,int);format=va_arg(va,char *); ++ va_list va; static char SBUF2[768]; ++ va_start(va, format); + vsprintf(SBUF2,format,va); + if (strlen(SBUF2)>512) + { +@@ -338,15 +336,14 @@ + } + + /* lprintf( same as printf ) - Logs to the log. */ +-void lprintf(va_alist) +-va_dcl ++void lprintf(char *format, ...) + { /* No bounds checking. Be very careful what you log */ +- char *format; va_list va; static char SBUF2[768]; ++ va_list va; static char SBUF2[768]; + FILE *file_out; + char *mytime; + char *P; + time_t cur_time; +- va_start(va); ++ va_start(va, format); + format=va_arg(va,char *); + vsprintf(SBUF2,format,va); + if (strlen(SBUF2)>512) +@@ -2462,7 +2459,7 @@ + /* Winlist - Returns Winlist */ + if (!strcasecmp(buf,"getwinlist")) + { +- lvprintf("%s: GetWinlist request\n",n->host); ++ lprintf("%s: GetWinlist request\n",n->host); + for(i=0;i<MAXWINLIST;i++) + { + if(winlist[i].inuse) +@@ -3071,4 +3068,4 @@ + + + } +- } +\ No newline at end of file ++ } diff --git a/games/tetrinet-x/files/patch-src::main.h b/games/tetrinet-x/files/patch-src::main.h new file mode 100644 index 000000000000..5f3038369b1a --- /dev/null +++ b/games/tetrinet-x/files/patch-src::main.h @@ -0,0 +1,20 @@ +--- src/main.h.orig Thu Dec 24 06:24:50 1998 ++++ src/main.h Thu Jun 17 09:55:28 2004 +@@ -24,7 +24,7 @@ + #endif + #endif /* but virtually every other OS NEEDS both */ + #include <arpa/inet.h> /* is this really necessary? */ +-#include <varargs.h> ++#include <stdarg.h> + #include <errno.h> + #if HAVE_UNISTD_H + #include <unistd.h> +@@ -296,5 +296,5 @@ + void net_connected(struct net_t *n, char *buf); + void net_waitingforteam(struct net_t *n, char *buf); + void init_main(void); +-void lprintf(); +-void lvprintf(); +\ No newline at end of file ++void lprintf(char *format, ...); ++void lvprintf(int priority, char *format, ...); diff --git a/games/tetrinet-x/files/patch-src::net.c b/games/tetrinet-x/files/patch-src::net.c new file mode 100644 index 000000000000..4b347233cdc0 --- /dev/null +++ b/games/tetrinet-x/files/patch-src::net.c @@ -0,0 +1,18 @@ +--- src/net.c.orig Thu Dec 24 06:24:50 1998 ++++ src/net.c Thu Jun 17 09:52:06 2004 +@@ -537,12 +537,10 @@ + pointer, precede with a socket number */ + /* please stop using this one except for server output. dcc output + should now use dprintf(idx,"format",[params]); */ +-void tprintf(va_alist) +-va_dcl ++void tprintf(int sock, char *format, ...) + { +- char *format; int sock; va_list va; static char SBUF2[1050]; +- va_start(va); +- sock=va_arg(va,int); format=va_arg(va,char *); ++ va_list va; static char SBUF2[1050]; ++ va_start(va, format); + vsprintf(SBUF2,format,va); + if (strlen(SBUF2)>1022) + { |