r15886 - in packages/trunk/netrek-client-cow/debian: . patches
Markus Koschany
apo at moszumanska.debian.org
Thu Sep 15 22:44:21 UTC 2016
Author: apo
Date: 2016-09-15 22:44:21 +0000 (Thu, 15 Sep 2016)
New Revision: 15886
Removed:
packages/trunk/netrek-client-cow/debian/menu
packages/trunk/netrek-client-cow/debian/patches/001-configure-gmp-version.patch
packages/trunk/netrek-client-cow/debian/patches/002-make-reallyclean.patch
packages/trunk/netrek-client-cow/debian/patches/003-typos.patch
packages/trunk/netrek-client-cow/debian/patches/004-honor-flags.patch
packages/trunk/netrek-client-cow/debian/patches/005-hardening.patch
Log:
Remove patches that were fixed upstream and the menu file
Deleted: packages/trunk/netrek-client-cow/debian/menu
===================================================================
--- packages/trunk/netrek-client-cow/debian/menu 2016-09-15 22:43:06 UTC (rev 15885)
+++ packages/trunk/netrek-client-cow/debian/menu 2016-09-15 22:44:21 UTC (rev 15886)
@@ -1,2 +0,0 @@
-?package(netrek-client-cow):needs="X11" section="Games/Strategy"\
- title="netrek-client-cow" command="/usr/games/netrek-client-cow"
Deleted: packages/trunk/netrek-client-cow/debian/patches/001-configure-gmp-version.patch
===================================================================
--- packages/trunk/netrek-client-cow/debian/patches/001-configure-gmp-version.patch 2016-09-15 22:43:06 UTC (rev 15885)
+++ packages/trunk/netrek-client-cow/debian/patches/001-configure-gmp-version.patch 2016-09-15 22:44:21 UTC (rev 15886)
@@ -1,19 +0,0 @@
-Description: Recognize GMP versions other than 1.
-Bug-Debian: http://bugs.debian.org/620528
-Forwarded: no
-Author: Peter Pentchev <roam at ringlet.net>
-Last-Update: 2011-04-08
-
-Index: b/configure
-===================================================================
---- a/configure
-+++ b/configure
-@@ -7194,7 +7194,7 @@
-
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-- $EGREP ""gmp=.*2"" >/dev/null 2>&1; then
-+ $EGREP ""gmp=.*[02-9]"" >/dev/null 2>&1; then
- cat >>confdefs.h <<\_ACEOF
- #define HAVE_GMP2_H 1
- _ACEOF
Deleted: packages/trunk/netrek-client-cow/debian/patches/002-make-reallyclean.patch
===================================================================
--- packages/trunk/netrek-client-cow/debian/patches/002-make-reallyclean.patch 2016-09-15 22:43:06 UTC (rev 15885)
+++ packages/trunk/netrek-client-cow/debian/patches/002-make-reallyclean.patch 2016-09-15 22:44:21 UTC (rev 15886)
@@ -1,28 +0,0 @@
-Description: Really clean up after the build.
-Forwarded: no
-Author: Peter Pentchev <roam at ringlet.net>
-Last-Update: 2011-04-08
-
-Index: b/Makefile
-===================================================================
---- a/Makefile
-+++ b/Makefile
-@@ -2,7 +2,7 @@
- # No editables below this point. #
- ########################################################################
-
--include key.mk
-+-include key.mk
-
- KEYGOD = clientkeys at clientkeys.netrek.org
- MAIL = mail
-@@ -47,7 +47,8 @@
- reallyclean: clean
- rm -f netrek-client-cow randomize mkkey rsa_box*.c name mkcflags \
- config.h system.mk config.status config.log config.cache key.mail \
-- null netrek.shared lib*
-+ null netrek.shared lib* cflags.c key.cow.linux* key.mk \
-+ po/Makefile po/Makefile.in
-
- distclean: clean reallyclean
-
Deleted: packages/trunk/netrek-client-cow/debian/patches/003-typos.patch
===================================================================
--- packages/trunk/netrek-client-cow/debian/patches/003-typos.patch 2016-09-15 22:43:06 UTC (rev 15885)
+++ packages/trunk/netrek-client-cow/debian/patches/003-typos.patch 2016-09-15 22:44:21 UTC (rev 15886)
@@ -1,227 +0,0 @@
-Description: Fix some typographical and grammatical errors.
-Forwarded: no
-Author: Peter Pentchev <roam at ringlet.net>
-Last-Update: 2011-04-08
-
-Index: b/short.c
-===================================================================
---- a/short.c
-+++ b/short.c
-@@ -1458,7 +1458,7 @@
- arg4 = (unsigned char) packet->argument2;
- break;
- case BEAM_U_TEXT:
-- sprintf(buf, "Transfering ground units. (%d/%d) Starbase %s has %d armies left",
-+ sprintf(buf, "Transferring ground units. (%d/%d) Starbase %s has %d armies left",
- (unsigned char) arg3, (unsigned char) arg4,
- players[(unsigned char) packet->argument].p_name,
- (unsigned char) packet->argument2);
-Index: b/COW.DOC
-===================================================================
---- a/COW.DOC
-+++ b/COW.DOC
-@@ -47,7 +47,7 @@
- This document describes the COW client, its capabilities, and the client's
- features. COW started as the successor of the BRM client after release 3.
- BRM started as a merger of the Berkeley client with Rick's Moo
--client. Since then, all three clients have developed fairly independant of one
-+client. Since then, all three clients have developed fairly independent of one
- other. Familiarity with netrek is presumed throughout this document. Please
- consult the newbie manual for information on the game itself.
-
-@@ -98,7 +98,7 @@
-
- This section will describe COW features that are selected from the command
- line when the client is invoked. Selecting "-u" for usage or any invalid
--option will provide a brief summary of this section ( -help will work too ).
-+option will provide a brief summary of this section (-help will work too).
-
-
- 3.1.1 SERVER SELECTION
-@@ -117,7 +117,7 @@
-
- The "-r defaultsfile" option will allow the user to select a defaults file
- other than .xtrekrc. The defaults file contains all of the user selectable
--defaults ( please see Section 4.0 for more information on .xtrekrc ). Using
-+defaults (please see Section 4.0 for more information on .xtrekrc). Using
- this option, two users can run netrek from the same userid / account and still
- have unique defaults files.
-
-@@ -149,7 +149,7 @@
-
- 3.1.7 AUTOLOGIN OPTION
-
-- The "-A passowrd" allows the client to automatically enter the specified
-+ The "-A password" allows the client to automatically enter the specified
- character password without having to prompt the user. This option is normally
- used with the "-C character_name" option, which automatically enters the
- character name. The "-C" option must be followed by a character name string.
-@@ -226,7 +226,7 @@
-
- -P log packets: generally don't want to use this
-
-- -t (sting of chars) title- the name of the window the client makes
-+ -t (string of chars) title - the name of the window the client makes
-
- -D debug mode
-
-@@ -397,7 +397,7 @@
- Since this is a first pass, I'm looking for more input on what
- would make them better. Here are some of my comments:
-
--1) Lines are hard coded into the software. They should be
-+1) Lines are hardcoded into the software. They should be
- based upon planet location, so the hockey gods can move the
- planets around.
-
-@@ -412,20 +412,20 @@
- *** Shell escape tool
- You may execute any Unix shell comand within the client. Read your mail
- now within the client. To do so, just send a message to the destination
--"!" and you get a shell prompt. Enter the comand and it's output will
-+"!" and you get a shell prompt. Enter the comand and its output will
- be displayed in the tools window. Works also with macros to "!".
- You may disable it in the .xtrekrc for security reasons with shellTools: off
- CAUTION: The client will be blocked for the time the comand is executed.
- Also some programs suspend the client if it is started in the background.
-
- *** Fast quit
--Hitting 'q' will quit the client out without ever going back to the
-+Hitting 'q' will quit the client without ever going back to the
- team selection window, the normal 'Q' still goes back to the team
- selection window.
-
- *** Reread defaults file
- You can reread your netrek default file by hitting '&', it is also
--possible to enter a new default file name at anytime by sending
-+possible to enter a new default file name at any time by sending
- a message to 'M' which contains the file name.
-
- *** Galactic rotation
-@@ -461,7 +461,7 @@
- borg, AFAIK.) For instance:
- COW 3.00pl0, linux, 03/03/98, RMCSE365AmTsr
- The letters in the fourth field indicate which #ifdefs were specified
--at compile time. Possiblities are:
-+at compile time. Possibilities are:
- R: RSA supported
- M: Macros
- D: Debugging information
-@@ -478,11 +478,11 @@
- *** Improved help window:
- Basically, this was done to show what keys were
- actually mapped to what functions. Every key function has a line in
-- the help window. Her'es a sample line:
-+ the help window. Here's a sample line:
-
- s gb Toggle shields
- ||\\_ The 'b' key has been mapped to toggle shields
-- || \_ The 'g' key has also been mapped toggle to the shields
-+ || \_ The 'g' key has also been mapped to toggle shields
- |\____This space is always there, as a separator.
- \_____This is the default key for this function, and the hook that you
- use when defining things to this function. I.e. to set the 'g'
-@@ -502,7 +502,7 @@
- The documentation window is used to view documentation while actually
- playing. In order to do this you must either have the COW.DOC file in
- the directory you are running the client from or you must set the
--documentation resource value with the full path to the file with the
-+documentation resource value to the full path to the file with the
- documentation. Control-y brings this window up. Also available via
- shift-O option menu under "info."
-
-@@ -517,7 +517,7 @@
- The xtrekrc file window is used to view your current xtrekrc file online.
- It is currently very stupid in that if you used the command line
- option '-r' to specify your xtrekrc file, this viewer will not find
--it (it currently hard wired for $HOME/.xtrekrc:( Control-X (that
-+it (it's currently hardwired for $HOME/.xtrekrc:( Control-X (that
- is control-shift-x) will bring up this window, or shift-O under "info."
-
- The 'f', 'b' keys scroll forward and back by 28 lines, like the motd
-@@ -536,7 +536,7 @@
- the client is executed from.
-
- A file called "SAMPLE.xtrekrc" should have been included with this
--client. Below is an attempt to explain the many,many options you
-+client. Below is an attempt to explain the many, many options you
- can include in a .xtrekrc file. Some of this was borrowed from
- various other documentation such as MOO documentation.
-
-@@ -641,10 +641,10 @@
-
- enemyPhasers: (integer 0-10) enemy phasers thickness at starting point.
-
--phaserShrink: (integer 0-16) Don't draw the first "phaserShrink"/16 th of
-+phaserShrink: (integer 0-16) Don't draw the first "phaserShrink"/16th of
- your phaser. This makes it easier to see incomming torps.
-
--theirPhaserShrink: (integer 0-16) "phaserShrink" for other player's ships.
-+theirPhaserShrink: (integer 0-16) "phaserShrink" for other players' ships.
-
- shrinkPhaserOnMiss: (on/off) Use "phaserShrink" and "theirPhaserShrink" even
- if a phaser misses.
-@@ -652,7 +652,7 @@
- highlightFriendlyPhasers: (on/off) phaser hits by your team are solid white
- (instead of the default "rainbow" a la COW-lite.
-
--showtractorpressor: (on/off) toggle showing tractor/pressor beams
-+showtractorpressor: (on/off) toggle showing tractor/pressor beams
-
- continueTractors: (on/off) off = turns off the visible t/p after 2 updates.
-
-@@ -661,8 +661,8 @@
-
- 4.4 Messaging options
-
--newDistress: (on/off) right justified distress call or not, default value
-- is to right justify (on)
-+newDistress: (on/off) right-justified distress call or not, default value
-+ is to right-justify (on)
-
- reportkills: (on/off) display kill messages or ignore these
-
-@@ -745,7 +745,7 @@
- screen before automatically removing them
-
- extraAlertBorder: Draws border in internal netrek windows, as well
-- as external ones (which get ignored in X11 with window-managers )
-+ as external ones (which get ignored in X11 with window-managers)
-
- forcemono: if on, the client windows are set to be monochrome
-
-@@ -814,7 +814,7 @@
- shiftedMouse: (on/off)
- The shift and control keys can be used to modify the default function
- assigned to a button. The shift key acts as a switch which brings an
-- alternate mapping to the mouse buttons. In a simliar way control and
-+ alternate mapping to the mouse buttons. In a similar way control and
- shift + control act to switch mappings again.
- Breakdown of values:
- Normal buttons 1, 2, 3,
-Index: b/defwin.c
-===================================================================
---- a/defwin.c
-+++ b/defwin.c
-@@ -716,7 +716,7 @@
- }
- ,
- {
-- "showIND", BOOL_DEF, "Show independant planets w/X",
-+ "showIND", BOOL_DEF, "Show independent planets w/X",
- &showIND,
- {
- {
-Index: b/newbie.html
-===================================================================
---- a/newbie.html
-+++ b/newbie.html
-@@ -147,7 +147,7 @@
- or to put it less academically, everyone plays in the same galaxy to try
- to take it over.
-
--<P>This manual is a guide for netrek beginners; it is independant of any
-+<P>This manual is a guide for netrek beginners; it is independent of any
- particular client. Clients are highly configurable and vary from one another
- in terms of features. Please consult your client manual for details. There
- are a lot of very cool things that a client can be configured for, including
Deleted: packages/trunk/netrek-client-cow/debian/patches/004-honor-flags.patch
===================================================================
--- packages/trunk/netrek-client-cow/debian/patches/004-honor-flags.patch 2016-09-15 22:43:06 UTC (rev 15885)
+++ packages/trunk/netrek-client-cow/debian/patches/004-honor-flags.patch 2016-09-15 22:44:21 UTC (rev 15886)
@@ -1,66 +0,0 @@
-Description: Honor CPPFLAGS, CFLAGS and LDFLAGS.
-Forwarded: no
-Author: Peter Pentchev <roam at ringlet.net>
-Last-Update: 2011-04-11
-
-Index: b/system.mk.in
-===================================================================
---- a/system.mk.in
-+++ b/system.mk.in
-@@ -112,16 +112,18 @@
-
- SHARED = $(SL_CFLAGS)
- INCDIRS = $(MPINC) $(INCS)
--CFLAGS = $(OPT) $(EXTRACFLAGS) $(RSA_FLAGS) $(INCDIRS)
--LFLAGS = -g $(EXTRALINKFLAGS)
-+CFLAGS ?= $(OPT)
-+CFLAGS += $(EXTRACFLAGS) $(RSA_FLAGS) $(INCDIRS)
-+LDFLAGS ?= -g
-+LDFLAGS += $(EXTRALINKFLAGS)
- LIBRARIES = $(LMP) $(LIBS) $(EXTRALIBS) $(SDL_LIBS) $(SDL_MIXER_LIBS) $(XXF86VM_LIBS) $(IMLIB2_LIBS)
-
- netrek-client-cow: $(RSAOBJ) $(PMAKE) null $(ROBJ) $(MAINOBJ) $(INPUTOBJ) $(X11OBJ) $(WIN32OBJ) $(RANDOMOBJ) cflags.c
-- $(CC) $(LFLAGS) -o netrek-client-cow $(ROBJ) $(RSAOBJ) $(INPUTOBJ) \
-+ $(CC) $(LDFLAGS) -o netrek-client-cow $(ROBJ) $(RSAOBJ) $(INPUTOBJ) \
- $(MAINOBJ) $(X11OBJ) $(WIN32OBJ) $(RANDOMOBJ) $(LIBRARIES)
-
- netrek.shared: done.libcow $(MAINOBJ) $(COWAPI)
-- $(CC) $(LFLAGS) $(MAINOBJ) -L. -lcow $(LIBS) -o netrek.shared
-+ $(CC) $(LDFLAGS) $(MAINOBJ) -L. -lcow $(LIBS) -o netrek.shared
-
- done.libcow: $(PMAKE) $(ROBJ) $(RSAOBJ) $(INPUTOBJ) $(X11OBJ) $(WIN32OBJ) $(RANDOMOBJ)
- $(CC) $(ROBJ) $(RSAOBJ) $(INPUTOBJ) \
-@@ -142,26 +144,26 @@
- $(MAKE) newkey
-
- mkkey: mkkey.c $(RANDOMOBJ) defs.h
-- $(CC) $(CFLAGS) $(MPINC) $(MPLIB) -o mkkey mkkey.c $(RANDOMOBJ) $(LIBRARIES)
-+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(MPINC) $(MPLIB) -o mkkey mkkey.c $(RANDOMOBJ) $(LIBRARIES)
-
- randomize: randomize.c $(RANDOMOBJ) defs.h
-- $(CC) $(OPT) -o randomize randomize.c $(RANDOMOBJ) $(LIBRARIES)
-+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o randomize randomize.c $(RANDOMOBJ) $(LIBRARIES)
-
- sound.o: sound.c
-- $(CC) $(SDL_CFLAGS) -c sound.c
-+ $(CC) $(CPPFLAGS) $(CFLAGS) $(SDL_CFLAGS) -c sound.c
-
- random.o: random.c
-- $(CC) -c -O random.c
-+ $(CC) $(CPPFLAGS) $(CFLAGS) -c random.c
-
- strdup.o: strdup.c
-- $(CC) -c -O strdup.c
-+ $(CC) $(CPPFLAGS) $(CFLAGS) -c strdup.c
-
- cflags.c: mkcflags
-- ./mkcflags "$(CC) $(CFLAGS)" "$(ARCH)" > cflags.c
-+ ./mkcflags "$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)" "$(ARCH)" > cflags.c
- echo char cwho[]=$(CWHO)\; >> cflags.c
-
- mkcflags: mkcflags.c system.mk null patchlevel.h version.h
-- $(CC) $(CFLAGS) -o mkcflags mkcflags.c $(LIBRARIES)
-+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o mkcflags mkcflags.c $(LIBRARIES)
-
- tags: $(RSRC) $(RSASRC)
- ctags $(RSRC) $(RSASRC) $(INCLUDES)
Deleted: packages/trunk/netrek-client-cow/debian/patches/005-hardening.patch
===================================================================
--- packages/trunk/netrek-client-cow/debian/patches/005-hardening.patch 2016-09-15 22:43:06 UTC (rev 15885)
+++ packages/trunk/netrek-client-cow/debian/patches/005-hardening.patch 2016-09-15 22:44:21 UTC (rev 15886)
@@ -1,284 +0,0 @@
-Description: Fix some build hardening warnings.
- - turn some printf() format strings into preprocessor constants
- - add some "%s" printf() format strings
- - check the return values of fread(), fwrite() and system()
- - convert some uses of sprintf() into snprintf()
-Forwarded: no
-Author: Peter Pentchev <roam at ringlet.net>
-Last-Update: 2011-05-11
-
---- a/mkkey.c
-+++ b/mkkey.c
-@@ -552,7 +552,7 @@
- fprintf(fp, " }\n");
- }
-
--static char* rsa_box_defs = "\
-+#define rsa_box_defs "\
- #define X(m, r, g) \\\n\
- mpz_mul(r, m, r);\\\n\
- mpz_mod(r, r, g)\n\
-@@ -565,9 +565,9 @@
- tmp = m[i]; m[i] = m[j]; m[j] = tmp; \\\n\
- tmp = r[i]; r[i] = r[j]; r[j] = tmp; \\\n\
- } while(0)\n\
--";
-+"
-
--static char* sequence_header = "\
-+#define sequence_header "\
- {\n\
- MP_INT r[%d], m[%d], m_swap_tmp;\n\
- for (i = 0; i < %d; i++) {\n\
-@@ -575,29 +575,29 @@
- }\n\
- mpz_set(&m[%d], &m_msg);\n\
- #define g &m_global\n\
--";
-+"
-
--static char* sequence_trailer = "\
-+#define sequence_trailer "\
- \n\
- mpz_set(&m_result, &r[%d]);\n\
- for (i = 0; i < %d; i++) {\n\
- mpz_clear(&r[i]); mpz_clear(&m[i]);\n\
- }\n\
- }\n\
--";
-+"
-
--static char* per_box_header = "\
-+#define per_box_header "\
- #include \"config.h\"\n\
- #include <gmp.h>\n\
- void rsa_partial_box_%d(m, r, g)\n\
- MP_INT* m, * r;\n\
- MP_INT* g;\n\
- {\n\
--";
-+"
-
--static char* per_box_trailer = "\
-+#define per_box_trailer "\
- }\n\
--";
-+"
-
- /*
- * Write out an obfuscated rsa computation. This code is a little
-@@ -1050,7 +1050,10 @@
- }
- buffer = (char*) malloc(statbuf.st_size);
- assert(buffer != NULL);
-- fread(buffer, 1, statbuf.st_size, fp);
-+ if (fread(buffer, 1, statbuf.st_size, fp) != statbuf.st_size) {
-+ perror("fread");
-+ exit(1);
-+ }
- fclose(fp);
- get_array(buffer, "key_global", raw_global, SIZE);
- get_array(buffer, "key_public", raw_public, SIZE);
-@@ -1072,7 +1075,10 @@
- }
- buffer = (char*) malloc(statbuf.st_size);
- assert(buffer != NULL);
-- fread(buffer, 1, statbuf.st_size, fp);
-+ if (fread(buffer, 1, statbuf.st_size, fp) != statbuf.st_size) {
-+ perror("fread");
-+ exit(1);
-+ }
- fclose(fp);
- key_name = allocbuf();
- client_type = allocbuf();
---- a/check.c
-+++ b/check.c
-@@ -87,7 +87,11 @@
-
- while ((cc = read(sock, buf, BUF_SIZE)) > 0)
- {
-- fwrite(buf, cc, 1, stdout);
-+ if (fwrite(buf, cc, 1, stdout) != 1) {
-+ perror("fwrite");
-+ close(sock);
-+ terminate(0);
-+ }
- }
- if (cc < 0)
- {
---- a/smessage.c
-+++ b/smessage.c
-@@ -458,7 +458,7 @@
- (void) sprintf(&addrmesg[5], "ALL");
- break;
- case MTEAM:
-- (void) sprintf(&addrmesg[5], teamshort[recip]);
-+ (void) sprintf(&addrmesg[5], "%s", teamshort[recip]);
- break;
- case MINDIV:
- if (maskrecip)
---- a/parsemeta.c
-+++ b/parsemeta.c
-@@ -680,9 +680,19 @@
- if (cache != NULL)
- {
-
-- fwrite(&statusLevel, sizeof(statusLevel), 1, cache);
-- fwrite(&num_servers, sizeof(num_servers), 1, cache);
-- fwrite(serverlist, sizeof(struct servers), num_servers, cache);
-+ if (fwrite(&statusLevel, sizeof(statusLevel), 1, cache) != 1 ||
-+ fwrite(&num_servers, sizeof(num_servers), 1, cache) != 1 ||
-+ fwrite(serverlist, sizeof(struct servers), num_servers, cache) != num_servers) {
-+ int xerrno = errno;
-+ fclose(cache);
-+#ifdef _MSC_VER
-+ _unlink(tmpFileName);
-+#else
-+ unlink(tmpFileName);
-+#endif
-+ errno = xerrno;
-+ perror("Could not write to the new cache file");
-+ }
-
- fclose(cache);
-
-@@ -725,8 +735,8 @@
- }
-
- /* ignore the cache if user changed statusLevel */
-- fread(&i, sizeof(i), 1, cache);
-- if (i != statusLevel)
-+ if (fread(&i, sizeof(i), 1, cache) != 1 ||
-+ i != statusLevel)
- {
- num_servers = 0;
- fclose(cache);
-@@ -734,9 +744,19 @@
- }
-
- /* read the server list into memory from the file */
-- fread(&num_servers, sizeof(num_servers), 1, cache);
-+ if (fread(&num_servers, sizeof(num_servers), 1, cache) != 1) {
-+ num_servers = 0;
-+ fclose(cache);
-+ return;
-+ }
- serverlist = (struct servers *) malloc(sizeof(struct servers)*num_servers);
-- fread(serverlist, sizeof(struct servers), num_servers, cache);
-+ if (fread(serverlist, sizeof(struct servers), num_servers, cache) != num_servers) {
-+ free(serverlist);
-+ serverlist = NULL;
-+ num_servers = 0;
-+ fclose(cache);
-+ return;
-+ }
- fclose(cache);
-
- /* hunt and kill old server lines from cache */
---- a/short.c
-+++ b/short.c
-@@ -934,7 +934,7 @@
- sprintf(addrbuf + 5, "ALL");
- break;
- case MTEAM:
-- sprintf(addrbuf + 5, teamshort[me->p_team]);
-+ sprintf(addrbuf + 5, "%s", teamshort[me->p_team]);
- break;
- case MINDIV:
- /* I know that it's me -> xxx but i copied it straight ... */
---- a/sound.c
-+++ b/sound.c
-@@ -982,7 +982,7 @@
- if (!isDirectory(sounddir)) {
- sounddir = "sounds";
- if (!isDirectory(sounddir)) {
-- (void) fprintf(stderr, "sound directory missing\n", sounddir);
-+ (void) fprintf(stderr, "sound directory %s missing\n", sounddir);
- return;
- }
- }
---- a/docwin.c
-+++ b/docwin.c
-@@ -48,7 +48,7 @@
- if (!W_IsMapped(docwin))
- W_MapWindow(docwin);
-
-- sprintf(buf, "--- %s ---", (char *) query_cowid());
-+ snprintf(buf, sizeof(buf), "--- %s ---", (char *) query_cowid());
- length = strlen(buf);
-
- /* using GWINSIDE instead of TWINSIDE because with SMALL_SCREEN defined it
-@@ -57,7 +57,7 @@
- center = GWINSIDE / 2 - (length * W_Textwidth) / 2;
- W_WriteText(docwin, center, W_Textheight, textColor,
- buf, length, W_BoldFont);
-- sprintf(buf, cbugs);
-+ snprintf(buf, sizeof(buf), "%s", cbugs);
- length = strlen(buf);
- center = GWINSIDE / 2 - (length * W_Textwidth) / 2;
- W_WriteText(docwin, center, 3 * W_Textheight, textColor,
-@@ -140,7 +140,7 @@
-
- if (temp == NULL)
- { /* malloc error checking -- 10/30/92 EM */
-- printf(malloc_fail);
-+ printf("%s", malloc_fail);
- return;
- }
-
-@@ -183,7 +183,7 @@
-
- if (temp->next == NULL)
- { /* malloc error checking -- 10/30/92 EM */
-- printf(malloc_fail);
-+ printf("%s", malloc_fail);
- return;
- }
-
-@@ -215,12 +215,12 @@
- if (!W_IsMapped(xtrekrcwin))
- W_MapWindow(xtrekrcwin);
-
-- sprintf(buf, "--- %s ---", (char *) query_cowid());
-+ snprintf(buf, sizeof(buf), "--- %s ---", (char *) query_cowid());
- length = strlen(buf);
- center = GWINSIDE / 2 - (length * W_Textwidth) / 2;
- W_WriteText(xtrekrcwin, center, W_Textheight, textColor,
- buf, length, W_BoldFont);
-- sprintf(buf, cbugs);
-+ snprintf(buf, sizeof(buf), "%s", cbugs);
- length = strlen(buf);
- center = GWINSIDE / 2 - (length * W_Textwidth) / 2;
- W_WriteText(xtrekrcwin, center, 3 * W_Textheight, textColor,
-@@ -306,7 +306,7 @@
-
- if (temp == NULL)
- { /* malloc error checking -- 10/30/92 EM */
-- printf(malloc_fail);
-+ printf("%s", malloc_fail);
- return;
- }
-
-@@ -337,7 +337,7 @@
-
- if (temp->next == NULL)
- { /* malloc error checking -- 10/30/92 EM */
-- printf(malloc_fail);
-+ printf("%s", malloc_fail);
- return;
- }
-
---- a/main.c
-+++ b/main.c
-@@ -396,8 +396,9 @@
- if (getdefault("wwwlink") != NULL)
- wwwlink = getdefault("wwwlink");
-
-- sprintf(webcall, wwwlink, url);
-- system(webcall);
-+ snprintf(webcall, sizeof(webcall), wwwlink, url);
-+ if (system(webcall) == -1)
-+ printf("Running %s for URL %s failed\n", wwwlink, url);
- url[0] = '\0';
- exit(0);
- }
More information about the Pkg-games-commits
mailing list