Commit Graph

1205 Commits

Author SHA1 Message Date
rpaulo dc2f26bcaa Enable WARNS=3 and pass lint(1).
ok christos@
2005-08-09 09:15:23 +00:00
christos 56c9d385d3 Pass WARNS=3 2005-08-09 02:38:32 +00:00
cjs 24b202fa43 Comment from Al. 2005-07-23 08:01:38 +00:00
rillig 80af4a9fa0 Aligned the usage message from the program with the one mentioned in the
man page.
2005-07-22 11:56:50 +00:00
rillig d590f7d069 - caesar(6) is not a SETGIDGAME, so we don't need to revoke any privileges.
- replaced direct POSIX read/write with stdio, which made the code simpler.
- added even more error checking.
- restructured the code to make each function fit on one screen
  (well, except one).
- now the code reflects the intended purpose of the program.
- return 0 instead of EXIT_FAILURE on success.
2005-07-22 11:52:23 +00:00
wiz a2b9f45e1c Quote macro. 2005-07-05 08:48:47 +00:00
jdc 5ffaff9f39 Tidy up curses state when we quit, instead of just doing exit(). 2005-07-02 15:48:03 +00:00
wiz 0dab3b253e Sort sections. Use mdoc macros. Reformat. 2005-07-02 10:46:21 +00:00
wiz 2f511b7404 Removing trailing spaces. 2005-07-02 10:40:50 +00:00
jmc 4f50e1e42e KNF conversion 2005-07-02 08:35:29 +00:00
jmc 1f90022eca KNF and WARNS=3 2005-07-02 08:32:32 +00:00
jmc 52d1fdd324 KNF and WARNS=3 2005-07-01 16:50:55 +00:00
jmc ed65ee1672 KNF and WARNS=3 2005-07-01 16:38:24 +00:00
peter 900682383e Remove the -t flag from the usage. 2005-07-01 14:21:49 +00:00
jmc bd6068f403 KNF and WARNS=3 2005-07-01 06:04:46 +00:00
jmc 86a7383a37 Whitespace fix 2005-07-01 01:13:05 +00:00
jmc fcb317ee49 KNF and WARNS=3 fixes 2005-07-01 01:12:39 +00:00
jmc 4931378a78 KNF and WARNS=3 fixes 2005-07-01 00:48:34 +00:00
jmc 243d04ef01 KNF and WARNS=3 2005-07-01 00:03:36 +00:00
perry 4acb374aa2 add ching, and also break up the SUBDIR line a bit more to make future
additions easier.

now if we could only get "dungeon"...
2005-06-30 15:35:17 +00:00
martin 844e014ade Initialize lnum and unum to avoid a "might be used uninitialized"
warning.
2005-06-30 13:44:48 +00:00
perry 2442385313 missing paragraph break from the original 2005-06-30 13:34:29 +00:00
perry 5175ead765 ching(6) -- The Book of Changes, not seen in BSD since 4.4BSD.
The C code is a complete rewrite done by Guy Harris for 4.4BSD and is
not the original from v7 at all. Unfortunately, the data file itself,
without which the rest isn't useful, was not freed until Caldera
released all of 32v a few years ago, so it was not in 4.4lite.

The data file, the ching nroff macros, and the driver script are under
Caldera or Caldera+Berkeley copyright.

I've partially redone the driver script from 4.4 (there was no point
in using a temporary file for the hexagram), which was already
partially redone from 32v. (As an aside, it is nutty that the script
needs a copyright so many times longer than the code.)

I've renamed "cno" to "castching", "phx" to "printching", (the
traditional names were opaque), and put them in /usr/libexec/ching
instead of the v7 /usr/games/ching.d. The data file and nroff macros
are in /usr/share/games/ching
2005-06-30 13:30:33 +00:00
symka 944ff7f105 Fixed error on a nonexistent mail spool file, when countmail can't find it\n\nCloses PR misc/29526\n\n\(Code submitted in PR misc/29526 by Andreas Eder) 2005-06-30 06:08:56 +00:00
rillig 1a815e1f74 Fixed a comment that said the factors in the output would be strictly
ascending.
2005-06-27 20:49:31 +00:00
rillig 556489aa53 Changed the type of data_table to be unsigned char[] instead of char[],
because it is initialized with values >= SCHAR_MAX. Also removed two
unnecessary bit mask operations. These changes do not affect the actual
behavior. Also replaced an "#ifdef notdef" with "#if 0". All these
changes are mainly for reducing lint(1) warnings.
2005-06-27 20:32:07 +00:00
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