Commit Graph

1229 Commits

Author SHA1 Message Date
rillig 45a38dbbe7 Fixed buffer overflow with long command line arguments. 2005-06-27 19:49:20 +00:00
wiz ac79bd4dc2 Drop trailing space. 2005-06-26 10:07:23 +00:00
hubertf e5a0b604a9 * Change program logic to not nest needlessly
* Search all acronyms databases, and don't force the user to
   know in which category to look (-t is gone)
 * If an acronym is not found in the database or by whatis(1),
   also check pkg_info(1). Per PR bin/30539 by Geert Hendrickx
   (geert.hendrickx@ua.ac.be)

OK'd by Julio M. Merino Vidal <jmmv>
2005-06-22 20:11:03 +00:00
tron bd52bf6180 Change marker from "pmppc" to "powerpc" because a NetBSD-macppc build
is also affected.
2005-06-09 12:20:12 +00:00
he 1ce7c753b3 Add an initialization to placate -Wuninitialized.
Marked with XXXGCC for pmppc (found while compiling for it).
2005-06-09 09:36:19 +00:00
rillig 5abe8eb023 Raised WARNS to 4. 2005-05-23 23:08:06 +00:00
rillig 8a7b93ff10 * fixed <ctype> bugs
* removed ASCII dependency
* added input data validation
* added bounds checking
* added error checking
* handle short reads (from pipes or sockets) correctly
  when trying to decode an encoded stream
* added lint(1) directives
2005-05-23 23:02:30 +00:00
kleink e039a7f675 Otto Von Bismarck -> Otto von Bismarck. 2005-05-10 18:41:53 +00:00
bad b09ec2a25b It is Bismarck not Bismark. 2005-05-10 17:47:33 +00:00
jwise 3b4f381581 Sort list, and add Nunavut, which has been a Canadian province since 1999. 2005-05-02 15:48:58 +00:00
jwise 245f508216 Cyprus is part of Europe, not Asia. Turkey is currently listed in both
Europe and Asia, I'm leaving it that way.
2005-05-02 15:39:27 +00:00
jwise 9ea9920e14 The current President of the United States is George Walker Bush, not George
Walker Bush, Jr. (his father was George Herbert Walker Bush).
2005-05-02 15:29:59 +00:00
rillig 4f6457e756 Fixed wrong use of the <ctype.h> functions by adding an explicit conversion
to unsigned char. Approved by christos.
2005-04-19 20:14:29 +00:00
rillig 117d073a60 Fixed wrong use of datatypes. In wait_for(), a char was used together
with getchar(), in readchar(), a char was used to read input, which in
getuchar() is used as an argument to islower() and toupper(). Also removed
a condition which terminated the process if the user typed in character
255. Approved by christos.
2005-04-19 20:12:07 +00:00
atatat 1d1f5d461b Don't assume /usr/games; use the same path as what rot13 was found at
to run caesar.
2005-04-09 02:02:15 +00:00
atatat 460d82b8cc A few minor spelling, grammar, and formatting fixes. 2005-04-09 02:00:27 +00:00
jwise 18de240b6b Fix a long-standing bug in wump(6) whereby hitting ^d to exit would first
print ``Care to play another game? (y-n)'' (but then exit anyway without
waiting for an answer).
2005-03-21 18:45:18 +00:00
christos ceb0805a9b Add -lcrypt where -lcrypto is specified. 2005-03-09 03:11:21 +00:00
simonb 1d351ebc53 Remove a incorrect semicolon at the end of an if().
Magic levels now appear after extensive play testing!
2005-02-25 15:04:43 +00:00
jsm 58b3287ba1 Don't presume phantasia's internal bool (char) is the same as that in
curses.h: define phbool and use it where necessary to avoid declaring
functions with one bool and defining them with the other.

Reviewed by <hubertf>.
2005-02-15 12:58:21 +00:00
jsm b91a81ab9f Cast last argument of execl to (char *).
Reviewed by <hubertf>.
2005-02-15 12:56:20 +00:00
jsm 2773e864bb Avoid arrays of incomplete types (required to build with GCC 4).
Reviewed by <hubertf>.
2005-02-15 12:54:50 +00:00
perry 1a3bb884dc A preprocessor macro named "srand" was defined which seeded the random
number generator.

Unfortunately, it conflicted with a function of the same defined in
stdlib.h. This was masked by the __P hack, which is now being purged.

I've renamed "srand" to "seedrand" to eliminate the conflict.
2005-02-03 02:23:02 +00:00
jsm a4dab13a3b Correct typos in German fortune. Reported by Charles Senger, csenger at UCSD.
Reviewed by <hubertf>.
2005-01-30 13:49:28 +00:00
nathanw df7bbbcb3c Convert from libc/threadlib-style mutex protection to pthread style.
(XXX this game totally does not need a thread-safe malloc)
2004-12-14 00:21:01 +00:00
jmc 279847975e Redo how void gets init'd.
setup now just creates an empty file. When main starts and loads it in,
it stats and if zero size init's a new location and saves it back out.
Now games.tgz can be shared among MACHINE_ARCH's
2004-12-09 05:15:59 +00:00
christos 42728e787e Slimy worms are clean enough for level 3. 2004-11-13 10:22:13 +00:00
dsl 49f7d8a9b1 Add (unsigned char) cast to ctype functions 2004-11-05 21:30:31 +00:00
christos 82345479d5 Don't try to catch SIGSTOP... 2004-09-12 04:51:32 +00:00
wiz f4d1c39625 Indent header description (from jmc@openbsd).
Sort sections and remove a trailing space.
2004-09-09 22:03:21 +00:00
wiz 8dab296315 Some improvements from jmc@openbsd:
sort option descriptions, add argument to -m, mention strfile
and add some xrefs.
2004-09-09 22:01:08 +00:00
jrf 190b2e4c51 Replaced strncpy with strlcpy. Thanks to Peter Postma who
pointed them our in PR #25762. Approved by christos@NetBSD.org.
2004-09-07 13:20:39 +00:00
christos 111956c585 - sleep a little in autobot mode so that we can see what is happening.
- use refresh() instead of wrefresh()
2004-08-27 09:07:08 +00:00
christos 04c4e386f5 describe the algorithm better. 2004-08-27 09:06:25 +00:00
mjl d2da97557b Fix typo 2004-08-20 11:23:47 +00:00
wiz 2eabcd5e18 Grammar fix, from ray at raylai org via jmc@openbsd. 2004-06-01 10:10:06 +00:00
mjl 3cb55d86f4 Had fun with a spell checker.
Also, try to canonize attributions.
2004-05-22 14:33:50 +00:00
christos fc21964e2e - don't catch STOP, TSTP, QUIT; the first you cannot catch and the other two
you should not.
- don't accept delay == 1000, because it turns to 0 and fix the number parsing
- misc KNF cleanups.
2004-05-02 21:31:23 +00:00
simonb 9bc855a931 s/the the/the/ (only in sources that aren't regularly imported from
elsewhere).
2004-04-23 02:58:27 +00:00
he 9b1375ac78 Undef bool before including <curses.h>, since it tries to typedef
bool.  Otherwise we get (at least on gcc 2.95.3) an empty declaration
warning from "typedef char char;" due to the #define of bool in
phantstruct.h.
2004-04-11 13:35:06 +00:00
ross 9209ce5ad8 Rework to use curses.h only on the target, not on the host. 2004-04-07 17:46:47 +00:00
jdc f015cad4b7 If the current player has no cards, skip to the other player.
While we're here, make this compile with -DDEBUG.
Fixes PR bin/12530 from Thomas Klausner.
2004-04-06 19:15:07 +00:00
hubertf 6162c9b1a1 Properly handle -d 1000, OK'd by jsm 2004-03-29 20:30:03 +00:00
snj e2462f3ddb It's "its". 2004-03-29 07:59:39 +00:00
snj a7b3f75db2 Spell "political" correctly and capitalize a last name. 2004-03-29 02:00:41 +00:00
snj 3eaff3a9c8 s/feal/feel/ 2004-03-28 22:43:03 +00:00
snj f1710feaa1 s/venomenous/venomous/ 2004-03-28 22:42:39 +00:00
wiz dc4cc98b15 becuase -> because. From Peter Postma. 2004-02-24 15:05:53 +00:00
jsm 1775f4fec6 Encode and decode more characters. Don't put commas after every
character.  Don't encode whitespace as "...".  Don't fail decoding
across a 1024-byte boundary.  Mark end of message appropriately.  From
OpenBSD but with punctuation taken from ITU-T Recommendation F.1
(03/98).
2004-02-13 23:16:11 +00:00
wiz d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
wiz 83a837b7df |fmt; add single quotes around a plus. 2004-02-09 23:25:47 +00:00
jsm 10b61a7cca Mark unused parameters, nonreturning functions and format functions in
the few cases not already marked.
2004-02-08 22:23:50 +00:00
jsm a12bf9a7e0 Hide the cursor if possible. From OpenBSD. 2004-02-08 22:21:57 +00:00
lukem 34fb5c1494 Fix race in parallel make when creating multiple targets in one operation. 2004-02-08 22:14:27 +00:00
jsm 4eccb08bd5 Separate primes manpage from that of factor. Correct DIAGNOSTICS
information.
2004-02-08 13:16:25 +00:00
jsm 4eec310a4f Check large factor for being prime before applying Pollard's
algorithm; fixes "factor 2147483647111311".  Correct comment;
algorithm is Pollard p-1, not Pollard rho.  Increase base if p-1
algorithm reaches 1; fixes "factor 99999999999991".  Testcases from
David A Bagley <bagleyd@tux.org>.
2004-02-08 11:47:36 +00:00
jsm 859993b44f Control -d by #ifdef DEBUG; adjust usage message accordingly. Bug
reported by Malcolm Parsons <malcolm@ivywell.screaming.net> in Debian
bug 84852.
2004-02-08 00:33:31 +00:00
jsm 5c6ba47786 Use standard C abs function rather than local macro. 2004-02-08 00:32:48 +00:00
jsm d035cfe33e Mark variables changed between setjmp and longjmp as volatile rather
than just taking their addresses.
2004-02-08 00:32:07 +00:00
jsm e7d3d51380 Fix grammar (bug reported by Thomas Bushnell BSG <tb@MIT.EDU> in
Debian bug 61846).
2004-02-08 00:31:16 +00:00
jsm cb5fd8342e Remove uses of __P. 2004-01-27 20:30:28 +00:00
jsm 716c7169f3 Include <sys/stat.h>. 2004-01-27 20:27:59 +00:00
jsm 8f5e2162b1 Include <sys/types.h>. 2004-01-27 20:27:29 +00:00
jsm d91509309a Include <sys/endian.h>. 2004-01-27 20:26:55 +00:00
jsm 0752e03df7 Include <limits.h> instead of <machine/limits.h>. 2004-01-27 20:26:20 +00:00
jsm 514bad17d7 Include <sys/endian.h>. 2004-01-27 20:25:48 +00:00
jsm b974cbaba0 Include <sys/endian.h> instead of <machine/endian.h>. Include
<stdlib.h>.
2004-01-27 20:25:07 +00:00
jsm a3b9fbcc3a Include <sys/endian.h>. 2004-01-27 20:24:32 +00:00
jsm a5f914a25a Use int for wait status. 2004-01-27 20:23:36 +00:00
jsm 1a8a5d7903 Rename yn to yncoms to avoid conflict with GCC 3.4 built-in XSI
function.
2004-01-26 09:59:36 +00:00
jsm d8c5384694 Rename rint to receive_intr to avoid conflict with GCC 3.4 built-in C99
function.
2004-01-26 09:58:35 +00:00
christos 852c1683c1 Use PROG_CXX so we don't need to include -lstdc++ explicitly. From Nick Hudson. 2004-01-05 15:35:59 +00:00
wiz 0e62b72ca3 Move AUTHORS section directly before BUGS section.
Suggested by jmc@openbsd.
2004-01-03 13:32:23 +00:00
mjl 70bd83f0c5 Typo fixes. 2004-01-01 20:00:38 +00:00
wiz c5920dd567 Bump date for previous. Remove superfluous .Pp. 2004-01-01 16:31:37 +00:00
jsm 39f0bfee73 Score is in upper right corner, not upper left corner. Patch from
Robert Hunter <roh@cryptocracy.hn.org> in Debian bug 209034.
2004-01-01 16:06:57 +00:00
jsm ddc1674612 Fix typo. Patch from Joey Hess <joeyh@debian.org>. 2004-01-01 16:06:21 +00:00
jsm 5a753461bf Don't use -fwritable-strings. Add one more const. 2004-01-01 16:05:12 +00:00
jsm 50134cf26f When cleaning up, only close files that have been opened successfully.
When reporting errors for failing to open files, give error text
rather than errno number.  Patch from Joey Hess <joey@kitenet.net> for
Debian bug 187251 from Mikael Hedin <micce@debian.org>.
2004-01-01 16:03:46 +00:00
jsm c35cdefd90 Refer to 'O' rather than 'o' as command to set options. Bug reported
by Christian Garbs <debian@cgarbs.de> in Debian bug 191452.
2004-01-01 16:02:51 +00:00
jsm 23e0e03d00 Return proper fortune length from fortlen for fortune files without
STR_RANDOM or STR_ORDERED rather than comparing it to SLEN.  Bug
reported by Simon Williams <simon@no-dns-yet.org.uk>.
2004-01-01 16:02:07 +00:00
jsm cdce4b2c55 Show residual probability rather than non-residual in "No place to put
residual probability" error message.  Distribute residual probability
correctly rather than all to one file.  Patch from Mike Castle
<dalgoda@ix.netcom.com>.
2004-01-01 16:01:25 +00:00
jsm 503605fee2 Make dot and winnerdot of type double. Patch from Jan Vornberger
<jan@uos.de> in Debian bug 197816.
2004-01-01 16:00:34 +00:00
jsm 540217796b Only score as a Gammon or a Backgammon if the opponent hasn't removed
any pieces, not if the opponent has removed pieces but has had a piece
knocked back to the bar afterwards.  Fixes Debian bug 185101 from
Konstantin Seiler <list@kseiler.de>.
2004-01-01 15:59:58 +00:00
jsm 0ea00847c5 Make tutorial text match actual moves. From FreeBSD via OpenBSD.
Fixes Debian bug 212478 from Jim W. Jaszewski <grok@sprint.ca>.
2004-01-01 15:59:09 +00:00
jsm e98705eff6 Fix capitalisation of compass directions. 2004-01-01 15:58:03 +00:00
jsm 618c8fad3d Document that pressing return allows you to "fast forward" the game
clock.  Patch from Peter Maydell <pmaydell@chiark.greenend.org.uk> in
Debian bug 216980.
2004-01-01 15:57:12 +00:00
thorpej 9b5d276f0e Const the player type variable. 2003-12-28 17:53:48 +00:00
thorpej 24231ec69d Fix RCS IDs. 2003-12-28 17:49:10 +00:00
martin 0a8d3c5308 Format size_t values using %zd instead of %d, for archs where size_t != int. 2003-12-27 18:24:51 +00:00
christos 6a53b72059 Rename .C files to .cc 2003-12-27 01:16:55 +00:00
christos 45e798bfc8 NetBSD rcsid. 2003-12-26 18:03:34 +00:00
christos 8222c44d1b Add dots+boxes 2003-12-26 17:59:13 +00:00
christos e30af34785 import dots+boxes games. 2003-12-26 17:57:02 +00:00
wiz 4bbfee09ca Various typo fixes from Jonathon Gray via jmc@openbsd. 2003-11-17 11:16:10 +00:00
lukem e606e2dcb2 Improve how various "simple" host tools are built and invoked. 2003-11-16 14:14:18 +00:00
jmc 4d9cb8213a Hobbes was misspelled. PR#23301 2003-10-29 04:53:39 +00:00
lukem 130ab7336b Rework how MAKEVERBOSE operates:
*	Don't bother prefixing commands with a line of  ${_MKCMD}\
	and instead rely upon "make -s".  This is less intrusive on
	all the Makefiles than the former.  Idea from David Laight.

    *	Rename the variables use to print messages.  The scheme now is:
	    _MKMSG_FOO		Run  _MKMSG 'foo'
	    _MKTARGET_FOO	Run  _MKMSG_FOO ${.TARGET}
	From discussion with Alistair Crooks.
2003-10-21 10:01:19 +00:00
agc c5275d9ccd Don't redefine NULL 2003-10-21 07:26:39 +00:00
lukem ddff99b7f4 rework to use the newer _MKMSGCREATE (et al) macros 2003-10-19 04:45:01 +00:00