1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00
Commit Graph

1379 Commits

Author SHA1 Message Date
tb
54a07f1471 Replace 'arc4random() % range' by 'arc4random_uniform(range)'.
Do this by introducing atcrandom_uniform(range) which returns
deterministic randomness or good randomness depending on whether
a seed was specified with the -r option.

Diff by Matthew Martin, reviewed by deraadt@ and me.

ok deraadt@
2015-12-15 18:39:50 +00:00
jsg
6b024eb539 include err.h for err() 2015-12-09 02:00:40 +00:00
tobias
dab586c435 Use __progname instead of manually handling argv[0].
ok deraadt, mmcc, tedu
2015-12-06 12:00:16 +00:00
tb
43b9874dbc pledge "getpw" is not needed here.
ok semarie@
2015-12-06 11:22:37 +00:00
tb
da74d77a50 Treat quiz the same way as the other games and try to preserve the look
and feel.  Revert previous and allow the pager with pledge "proc exec".
Play the game with pledge "stdio rpath".

Discussed with tedu@
2015-12-06 09:55:58 +00:00
tb
23d7e0c886 add missing #include "hack.h" 2015-12-05 13:37:43 +00:00
tb
98e40f6899 Tweak alignment of ENVIRONMENT and FILES.
Use sentence format for the highscore file, too.

Discussed with jmc@
2015-12-04 19:46:04 +00:00
jmc
05ea1278d2 put FILES into a similar format as ENVIRONMENT; 2015-12-04 19:21:26 +00:00
tb
d3431a599d cleanup: remove pwd.h, delete a stray comment and a const qualifier 2015-12-04 17:34:40 +00:00
tb
87b7d5d4a1 Drop pledge("getpw") and pwd.h and use the now usual
LOGNAME -> USER -> getlogin() -> ??? fallback
in the score file, as requested by tedu@

Man page bits adapted from jmc@'s tweaks to snake.6
2015-12-04 16:40:09 +00:00
tedu
c11bd13a73 assume modern curses and unifdef ancient feature tests 2015-12-04 10:41:35 +00:00
tb
091d139da5 Drop the argument passing between backgammon and teachgammon.
It's broken.  Instead, make -d imply -n.  You're supposed to
know the rules before you start tweaking them.

Issue reported by and ok pjanzen@
Patient help with the manual jmc@
2015-12-02 20:05:01 +00:00
tb
fd639ccef0 KNF: I forgot to join two lines. 2015-12-02 18:52:23 +00:00
tb
4a0e2eed87 treat getenv("HOME") safely also when LOGGING is defined. from mestre.
plus fix some ghastly whitespace.
2015-12-02 18:46:13 +00:00
tb
c5e67ec545 add const and remove unused variable.
from mestre.
2015-12-02 18:34:10 +00:00
tb
1152c6e6e1 Make sure "exec" rights are dropped asap in all code paths.
The game also needs "wpath cpath" for supporting the score file,
so add those.
2015-12-01 07:43:30 +00:00
tb
1f22a2a091 Answering "yes" to the question "Do you want to see the rules of the game?"
execs teachgammon.  Allow this and drop this pledge afterward.

Spotted by Paul Janzen, thanks!
2015-12-01 00:31:46 +00:00
schwarze
d6d428c736 delete useless BUGS section; patch from Jan Stary <hans at stare dot cz> 2015-11-30 16:53:39 +00:00
tb
56e43436ce last but not least: add pledge for wump(6)
one more of those games which fork a pager with instructions, so first
pledge "stdio rpath proc exec", then drop to pledge "stdio" afterwards.
2015-11-30 09:00:02 +00:00
tb
f01d2bc3df pledge "stdio rpath wpath cpath" for this one. 2015-11-30 08:55:26 +00:00
tb
0a5000655c primes only needs pledge "stdio". 2015-11-30 08:53:53 +00:00
tb
2751bcea94 The usual deal for a curses game with the possibility of saving a game:
pledge "stdio rpath wpath cpath tty"
2015-11-30 08:49:06 +00:00
tb
81b3eda1fe unspectacular pledge "stdio rpath tty" for grdc 2015-11-30 08:46:07 +00:00
tb
24c4b92ed4 straightforward pledge "stdio rpath wpath cpath tty" for gomoku 2015-11-30 08:44:51 +00:00
tb
95ae2554fc slightly interesting pledge for fish:
start with "stdio rpath proc exec" since it pipes instructions to a pager
afterwards "stdio" is enough
2015-11-30 08:42:03 +00:00
tb
9ba11e5c36 pledge "stdio rpath wpath cpath tty" for canfield
pledge "stdio rpath" for cfscores

made possible by Ricardo Mestre's earlier work
2015-11-30 08:38:13 +00:00
tb
efef3032b3 pledge "stdio rpath tty" for bs 2015-11-30 08:33:29 +00:00
tb
02cc2a4e8b pledge "stdio rpath tty" for boggle.
skip mkdict and mkindex for now, they aren't installed anyway.
2015-11-30 08:27:46 +00:00
tb
87f25a4abf Pledge for backgammon and teachgammon.
Both are straightforward "stdio rpath tty" programs; teachgammon
exec's backgammon at the end, so give it "exec" in addition.

While there, ANSIfy
2015-11-30 08:19:25 +00:00
tb
a75265e181 Straightforward pledge "stdio rpath wpath cpath" for adventure.
It is possible to make it finer grained, but try to keep it
simple for now.
2015-11-30 08:14:48 +00:00
jmc
e8dcef998f tidy here too; 2015-11-29 16:05:38 +00:00
jmc
1e9e54e85f adjust width list: Ds is unfortunate here; 2015-11-29 16:04:14 +00:00
jmc
121e37575f tidy up ENVIRONMENT and FILES; 2015-11-29 15:58:38 +00:00
tb
c425f3ea0e Move score file to $HOME and add pledge "stdio rpath wpath cpath".
For high score entries, try LOGNAME, then USER, then getlogin() then
fall back to ???.
2015-11-29 15:31:06 +00:00
tb
bf2d39770d Add pledge support and move score file to $HOME.
For high score entries use the same logic as in snake(6) and tetris(6):
Try LOGNAME then USER then getlogin(2) and fall back to ???.
For variety, atc(6) uses flock(2), so add a "flock" promise to the usual
"stdio rpath rpath cpath tty" for games.
2015-11-29 15:23:38 +00:00
tb
e224588fb3 Move scorefile to $HOME. The nice implementation of the score file
depends on getpwuid(), so add "getpw" to the rest of the required
pledges: "stdio rpath wpath cpath tty".
2015-11-29 15:13:19 +00:00
tb
6c53a56d23 pledge "stdio rpath tty proc exec" since instructions() might fork a pager.
actual game place takes place with "stdio tty".

OK deraadt@ on an earlier version
2015-11-29 14:42:36 +00:00
tb
fa83b6130f Prefer $LOGNAME over $USER, since the latter is deprecated,
see environ(7).  Pointed out by millert@.  Fall back to getlogin(2)
before defaulting to ???.

looks good to deraadt@
2015-11-29 14:31:01 +00:00
tb
f527bb5663 Fix after removal of the setgid bit:
Add pledge "stdio rpath wpath cpath tty".
Move score file to $HOME, add $USER as high score entry.
Maintain hall of fame of 10 high scores, make snake wink if
it ate you while you were eligible for eternal fame.

Based on an initial diff by Ricardo Mestre and with helpful input from tedu@.

ok beck@
2015-11-27 09:37:56 +00:00
tb
a846715f27 Fix copy-paste error in scorefile name
From Ricardo Mestre
2015-11-26 14:43:18 +00:00
tb
1cf6a71907 Add checks for getenv(), snprintf() and getlogin().
From Ricardo Mestre (up to a small tweak).  Thanks!
2015-11-26 13:28:22 +00:00
tb
0f70ac25c7 Add missing checks for getenv() and snprintf()
From Ricardo Mestre, thanks!
2015-11-26 13:24:30 +00:00
deraadt
691147a9d6 Remove operations that "touch" scorefiles at install time. 2015-11-25 23:18:11 +00:00
tb
4c4ddf9345 Remove now unused gid_t variable.
From Ricardo Mestre.  Thanks!

go for it!  deraadt@
2015-11-25 16:19:05 +00:00
tb
ca7aa068af The scorefile is hidden.
From Ricardo Mestre, thanks!
2015-11-25 16:15:06 +00:00
tedu
e10665cf08 repair lseeks, from Ricardo 2015-11-24 16:54:22 +00:00
deraadt
ebb0af75bc In 1995, all of the games were setuid games. At end of 1996, I took them all
to setgid games, and we started wittling them down.  Nearly 10 years later I
am removing all setgid from the games.  If any of these have score files they
are now broken, and I hope various folk repair them.  I have argued for years
(and received pushback...) that the score file features must be removed, or
rewritten to use private files, because setgid is the wrong tool.
ok tedu
2015-11-24 03:10:09 +00:00
tedu
e1edfc7be0 change score file name to .cfscores so it's not taking up valuable space
in my home directory of serious business files
2015-11-24 02:53:39 +00:00
tedu
7e0a668373 move score files to home directory and drop setgid. from Ricardo Mestre 2015-11-24 02:51:50 +00:00
deraadt
db911c4702 pledge the wyrms 2015-11-21 05:29:42 +00:00
deraadt
e25b81396d pledge "stdio rpath wpath cpath"
from Ricardo Mestre
2015-11-21 03:20:30 +00:00
tb
72a685fd06 Convert hand-rolled option parsing to getopt(3).
ok deraadt@
2015-11-20 16:58:37 +00:00
tb
8f55f2bb60 pledge "stdio rpath wpath cpath tty"
"stdio rpath tty" for game play
"rpath wpath cpath" for maintaining highscores in $USER

ok deraadt@ sthen@
2015-11-20 07:40:23 +00:00
tedu
df1ad1934e remove setgid flag.
in turn, move score files into user's home directory.
will let theo buehler continue with a smaller pledge set.
2015-11-17 15:27:24 +00:00
jmc
a7a0269383 fix a double space issue in the following, rather wonderful, fortune:
On two occasions I have been asked [by members of Parliament!], `Pray,
Mr. Babbage, if you put into the machine wrong figures, will the right
answers come out?'  I am not able rightly to apprehend the kind of
confusion of ideas that could provoke such a question.
		-- Charles Babbage
2015-11-15 21:25:50 +00:00
deraadt
f24baa2d48 creat() -> open equiv; from Frederic Nowak 2015-11-11 01:12:09 +00:00
deraadt
37753c2d3b another open(path, 0)... 2015-11-10 15:29:11 +00:00
deraadt
574fb2a2db pledge "stdio rpath" at the top. (Ricardo's 2nd chunk which reduces
further is not placed right, so I ignored it for now)
from Ricardo Mestre
2015-11-10 14:56:50 +00:00
deraadt
7f87976609 replace open(path, 0) with open(path, O_RDONLY). amazing to still find
sloppiness like this.
2015-11-10 14:50:04 +00:00
tedu
677829b8e4 delete unused code that won't let you play if the load is too high 2015-11-05 23:16:44 +00:00
guenther
ec99312f72 ctype functions take unsigned char values.
Fix redrawing of the challenge cube (-c option) when <esc>word is used.

ok mmcc@
2015-11-05 08:40:34 +00:00
tedu
33206277fe replace setbuf with setvbuf, from Frederic Nowak 2015-11-04 21:22:10 +00:00
tedu
5e0221f546 just dump the help on stdout with messing about with a pager.
makes pledge much simpler.
from jan stary
2015-10-25 09:34:49 +00:00
mmcc
75766ddb8a Cast toupper()'s argument to unsigned char.
ok guenther@
2015-10-24 18:51:40 +00:00
mmcc
cb40a3d352 Cast ctype functions' argument to unsigned char.
ok guenther@
2015-10-24 18:49:39 +00:00
mmcc
9c23307a93 Cast ctype functions' argument to unsigned char.
ok guenther@
2015-10-24 18:39:05 +00:00
mmcc
c5ce2e852f Cast ctype functions' argument to unsigned char.
ok guenther@
2015-10-24 18:37:23 +00:00
mmcc
e782249f09 Cast ctype functions' argument to unsigned char.
ok guenther@
2015-10-24 18:35:08 +00:00
mmcc
07f8b41afc Cast ctype functions' argument to unsigned char.
ok guenther@
2015-10-24 18:33:22 +00:00
mmcc
8b4d100e4c Cast ctype functions' argument to unsigned char.
ok guenther@
2015-10-24 18:29:15 +00:00
mmcc
5eb74ca34f Cast ctype functions' arguments to unsigned char.
ok guenther@
2015-10-24 18:26:13 +00:00
mmcc
4f56e6a4e1 Cast ctype functions' argument to unsigned char.
ok guenther@
2015-10-24 18:16:40 +00:00
mmcc
037a1c83c4 Cast ctype functions' arguments to unsigned char.
ok guenther@
2015-10-24 18:14:09 +00:00
mmcc
1c1551e9c1 Cast ctype functions' arguments to unsigned char.
ok guenther@
2015-10-24 18:10:47 +00:00
mmcc
3618010ad0 Cast ctype functions' arguments to unsigned char.
ok guenther@
2015-10-24 18:04:06 +00:00
mmcc
4d3914505f Cast isdigit()'s argument to unsigned char.
ok guenther@
2015-10-24 18:02:28 +00:00
mmcc
e6743bfe73 Cast isdigit()'s argument to unsigned char.
ok guenther@
2015-10-24 17:56:42 +00:00
mmcc
672e4212ce Cast islower()'s argument to unsigned char.
ok guenther@
2015-10-24 17:55:02 +00:00
mmcc
d02bbd4a61 Cast ctype functions' arguments to unsigned char.
ok guenther@
2015-10-24 17:51:59 +00:00
mmcc
0d35e948a8 Cast isprint()'s argument to unsigned char.
ok guenther@
2015-10-24 17:48:36 +00:00
mmcc
3d31ecf887 Cast toupper()'s argument to unsigned char.
ok guenther@
2015-10-24 17:46:19 +00:00
mmcc
85255e44cb Cast ctype functions' arguments to unsigned char.
ok guenther@
2015-10-24 17:44:49 +00:00
mmcc
8a7637b1dd Cast ctype functions' arguments to unsigned char.
ok guenther@
2015-10-24 17:43:28 +00:00
mmcc
8a97e63eab Cast ctype functions' arguments to unsigned char.
ok guenther@
2015-10-24 17:40:38 +00:00
mmcc
a0a49686e0 Cast isdigit()'s argument to unsigned char.
ok guenther@
2015-10-24 17:37:56 +00:00
mmcc
02fcf05ac9 Cast isalpha()'s argument to unsigned char.
ok guenther@
2015-10-24 17:36:06 +00:00
mmcc
3c57379406 Cast isblank()'s argument to unsigned char.
ok guenther@
2015-10-24 17:34:16 +00:00
mmcc
0cc1293efb Cast isdigit()'s argument to unsigned char.
ok guenther@
2015-10-24 17:33:05 +00:00
mmcc
8059d61abf Cast isblank()'s argument to unsigned char.
ok guenther@
2015-10-24 17:31:00 +00:00
mmcc
866f718f2d Cast toupper()'s argument to unsigned char.
ok guenther@
2015-10-24 17:29:03 +00:00
mmcc
2c2460a1ae Cast islower()'s argument to unsigned char.
ok guenther@
2015-10-24 17:27:06 +00:00
mmcc
9981a40bd6 Cast islower()'s argument to unsigned char.
ok guenther@
2015-10-24 17:23:14 +00:00
mmcc
01869f2877 Cast ctype functions' arguments to unsigned char.
ok guenther@
2015-10-24 17:20:17 +00:00
mmcc
057b7905c4 Cast ctype functions' arguments to unsigned char.
ok guenther@
2015-10-24 17:13:27 +00:00
jsg
b2fea133cf include err.h for err() calls added with recent pledge commits. 2015-10-23 02:01:15 +00:00
doug
4001b1c3f4 Pledge "stdio rpath tty" for hangman(6).
Patch submitted by Ricardo Mestre <serial@helheim.mooo.com>

ok semarie@
2015-10-22 05:28:42 +00:00
tobias
2f95621a47 Disable !-command to escape to a shell. You are supposed to play, press
^Z, or open up another terminal if there is something else to do.

ok deraadt
2015-10-16 07:37:46 +00:00
doug
673e924c36 Pledge "stdio" for simple games.
ok semarie@
2015-10-14 08:12:12 +00:00
semarie
20b80e920a enable pledge(2) in rain(6)
it is libcurses program: at init it needs "stdio rpath getpw tty", and after
drop to just "stdio tty". "tty" is needed at end for restoring the tty.

initial patch from doug@
ok doug@ deraadt@
2015-10-14 07:19:23 +00:00
doug
3ef98285c6 Pledge that arithmetic only takes "stdio". 2015-10-10 22:32:55 +00:00
guenther
f06752bb14 Delete pointless NOSTRICT comments 2015-09-27 07:06:41 +00:00
guenther
3e07b96b19 Make prompt() properly printf-like, eliminating empty dummy args 2015-09-27 05:27:42 +00:00
guenther
911134d294 Annotate funcs with __attribute__((printf(...))) and clean up the fallout:
* lots of foo(str) --> foo("%s", str) transformations
 * one totally insane foo(fmt, ap) --> vfoo(fmt, ap) conversion: how did
   this ever work?
 * prefer const char[] over char* for static format strings, as it lets
   gcc check the format and eliminates an unnecessary pointer

ok beck@
2015-09-27 05:13:11 +00:00
guenther
c651476829 Delete obsolete lint comments
ok beck@
2015-09-27 05:09:01 +00:00
guenther
aea4406c4f Make -Wformat=2 happier with a few foo(str) -> foo("%s", str) fixes
ok beck@
2015-09-27 05:07:06 +00:00
schwarze
cc710aa960 Fix -D in the synopsis line:
* Whitespace is allowed between -D and the variable name.
* Each -D option only takes one single assignment.
* Drop excessive .Sm macro.
2015-09-25 17:50:53 +00:00
schwarze
0df4e6e283 use | rather than / for alternatives and some macro fixes 2015-09-25 17:37:23 +00:00
tedu
8476ff3c17 big blocks need braces for support 2015-09-16 16:32:11 +00:00
schwarze
eef6683313 use .Cm rather than .Ar for fixed string arguments 2015-09-12 16:10:25 +00:00
schwarze
e34c05504d reduce .Nd to one line and kill .Tn while here 2015-09-10 15:16:43 +00:00
tedu
335a27f856 cosmetic fixes 2015-09-07 00:49:20 +00:00
semarie
6bf0ea6596 remove #ifdef OK_TO_WRITE_DISK which isn't used by default.
and few disambiguisations suggested by cc(1)
  - parentheses around && within ||
  - explicit braces to avoid ambiguous 'else'

ok doug@
2015-08-26 14:49:20 +00:00
rzalamena
d4bd758816 Replace clock_gettime UPTIME with MONOTONIC to improve worm portability.
ok deraadt@, guenther@.
2015-08-26 01:25:57 +00:00
rzalamena
e5f400f567 Improve robots(6) by using timespec*() functions, replacing gettimeofday()
with clock_gettime(MONOTONIC) to avoid clock changes and replacing poll()
with ppoll() to deal better with timespec.

ok guenther@.
2015-08-26 00:29:24 +00:00
rzalamena
df5f0d5ca1 Fix cheating bug by using unused time variables and replace poll() with
ppoll() to better use the timespec struct.

ok deraadt@.
2015-08-24 21:52:12 +00:00
deraadt
ca161728cb remove malloc/calloc/realloc* casts, due to stdlib.h being present; ok millert krw 2015-08-22 14:47:40 +00:00
deraadt
40ad53c423 KNF 2015-08-21 02:42:26 +00:00
sobrado
0037dff8df use file system path (.Pa) semantic markup macros where appropriate. 2015-07-27 18:48:04 +00:00
schwarze
485fcb80c1 Sometimes, the computer's move was printed, but the computer's men didn't
actually move.  This happened when "swap" was called earlier, and then
later in the final call to makmove(), swapping back would have been
required, but was erroneously denied.  Patch sent in pjanzen@.

It looks like the bug was already present in the original version
in 4.1a BSD in 1982.
2015-07-20 23:04:17 +00:00
deraadt
a0d5b14ebf flower & bird adjustments for Nunavut, from pjanzen 2015-07-16 15:13:25 +00:00
otto
0731e9084c /home/otto/ok 2015-06-26 19:18:03 +00:00
millert
637ecc7985 Fix sign compare bug introduced when rnum() was redefined to use
arc4random_uniform().  From pjanzen@, OK deraadt@
2015-05-20 20:26:00 +00:00
jmc
a29ad290e5 from snj, netbsd -r1.56: "properly pluralize" 2015-04-04 07:12:25 +00:00
jca
3965ecca3d Fix double word in quote from Ken Olsen.
"There is no reason for any individual to have a computer in their home."
2015-03-25 12:54:13 +00:00
millert
78badebcb0 Eliminate use of TM_YEAR_BASE. OK guenther@ deraadt@ miod@ 2015-03-17 19:31:30 +00:00
millert
f7055df57d tzfile.h is an internal header that should never have been installed.
What's worse, the tzfile.h that gets installed is over 20 years old
and doesn't match the real tzfile.h in libc/time.  This makes the
tree safe for /usr/include/tzfile.h removal.  The TM_YEAR_BASE
define has been moved to time.h temporarily until its usage is
replaced by 1900 in the tree.  Actual removal of tzfile.h is pending
a ports build.  Based on a diff from deraadt@
2015-03-15 00:41:27 +00:00
jmc
0870f47d28 remove the first comma from constructs like ", and," and ", or,": you can use
"and" and "or" to join sentence clauses, and you can use commas, but both hinders
reading;
2015-03-13 19:58:40 +00:00
bentley
fb604f4523 Delete cribbage logging. Was never enabled and no point in enabling it.
ok tedu@
2015-03-12 02:19:10 +00:00
tedu
943007379d make the worm grow faster on larger terminals. this is more fun than
starting with an enormous pile of worm at the start.
2015-03-09 19:52:02 +00:00
tedu
6e5a188a92 improve ship placement interface. per the instructions, 2468 should work,
but the first loop didn't allow them. also allow arrow keys to work, since
they work in other modes.
2015-02-18 23:41:31 +00:00
tedu
eb8dbf3e2d no reason for magic numbers to be octal. just drop the leading 0.
still equally magic.
2015-02-18 23:20:45 +00:00
tedu
dff8a80e7e don't cast function arguments; use reallocarray in one place 2015-02-18 23:16:08 +00:00
tedu
c38a25ace4 convert calloc/realloc pairs to reallocarray 2015-02-18 22:33:51 +00:00
bentley
947f4dd9ff Don't abuse Aq for arguments, and use a prettier escape for dashes.
ok schwarze@
2015-02-18 02:16:59 +00:00
bentley
01a6998a3e Mark up email addresses semantically with Mt.
ok schwarze@
2015-02-17 16:29:16 +00:00
tedu
87a184187f the stem of the b was not descending all the way to the baseline.
now `/usr/games/banner libressl` is extra purty.
i should credit miod for reminding me of this program's existence
by requesting that i not paste its output into chat.
2015-02-10 13:50:58 +00:00
tedu
576f378f21 allow ctrl-d to quit after a game as well 2015-02-07 03:32:05 +00:00
tedu
24a46d3d9b use unsigned char type to avoid many casts 2015-02-07 03:30:08 +00:00
tedu
f005acd6ef by popular request, stop giving away numeric letters. no more will the
appearance of 509 in a symbol name tell you what letter to guess first.
2015-02-07 03:26:20 +00:00
tedu
b4acf7eded unsigned char for ctype functions 2015-02-07 03:07:02 +00:00
miod
5af213f8f7 Ignore ELF symbols containing dots or dollar signs. Suggested by millert@ 2015-02-07 02:56:00 +00:00
tedu
65b0e16c1a clear to end of line when printing error messages so that previous
messages don't remain and pollute the line
2015-02-07 01:43:51 +00:00
miod
2ddfbac012 By popular demand, allow any ELF file to be passed to -d as a word list, in
which case its symbols will be used.
Which means that `hangman -k' is equivalent to `hangman -d /bsd' now.

ok beck@ tedu@
2015-02-07 01:37:30 +00:00
kspillner
31d0817b6d Fix small typo found when testing tedu@'s fortune -o -m change.
ok jmc@
2015-02-06 20:00:55 +00:00
tedu
ff900ac7d5 unsigned char is the correct type for ctype functions 2015-02-06 10:50:48 +00:00
tedu
7a2625a8a8 no space after # 2015-02-06 10:49:32 +00:00
tedu
63bf18cd94 remove TRUE/FALSE in favor of the true boolean values 1/0 2015-02-06 10:46:52 +00:00
tedu
9c2c8654fd Debug, whatever it's worth, is clearly not a boolean 2015-02-06 10:26:06 +00:00
tedu
a756941cbf cleanup a few bits 2015-02-06 10:25:32 +00:00
tedu
14a0f98a66 remove no regex ifdef. everybody loves regex. 2015-02-06 10:18:51 +00:00
tedu
71165f8a54 use regcomp native case insensitive matching facility instead of
faking it poorly
2015-02-06 10:17:56 +00:00
tedu
d5d4835011 don't set a flag with ++; it's a bool, not a counter. 2015-02-06 10:12:57 +00:00
tedu
f48f70a6c8 change int to size_t to avoid integer overflow 2015-02-06 10:04:18 +00:00
tedu
3619beb36f fix searching and display of offensive fortunes.
now, if you want to find an offensive fortune about (e.g.) meat,
you can simply run:
$ fortune -o -m meat
This is much easier than the previous requirement to run a command like:
$ fortune -o -m `echo meat | rot13` | rot13
requested by guenther phessler
2015-02-06 09:55:01 +00:00
tedu
d921930c11 regex are documented in re_format.7, not the C API in regex.3 2015-02-06 09:30:04 +00:00
krw
5f1af72573 Make some $OpenBSD$ lines prettier/standardier by eliminating
superflous '*' after '/*' and adding blank after terminating '$'.
Also eases parsing of the lines by simple awk scripts.

Aesthetic approval from tedu@.
2015-01-19 15:30:52 +00:00
deraadt
7accc80bcd normalize formatting 2015-01-19 00:47:01 +00:00
schwarze
12bc606974 remove .Tn; from Jan Stary <hans at stare dot cz> 2015-01-15 19:06:31 +00:00
deraadt
0afc0f96b3 all modern systems can do this SUSPEND thing 2015-01-15 17:14:04 +00:00
deraadt
e432a80783 NR_OF_EOFS is a festering boil, lance & drain.
ok millert
2015-01-15 17:13:37 +00:00
tedu
1cc65eec88 adventure requires deterministic random for its internal data
"obfuscation" scheme to work (words fail me), but we can use arc4random
for the in game fun. from theo buehler
2014-12-31 15:45:57 +00:00
tedu
d71bc48f60 simplify poll() conversion. from patrick keshishian 2014-12-31 15:42:08 +00:00
jmc
a666d03438 spelling fix; from daria suchecka via krzystof warzecha 2014-12-28 21:07:41 +00:00
deraadt
cceea54a0e Do not memorialize cheaters in the high score file.
from pjanzen
2014-12-09 05:01:14 +00:00
deraadt
f84032eda8 For now, these games still contain deterministic randomization (for
save / replay modes of operation that have not yet been cleaned up).
OK, I've let the cat out of the bag, now some of you know you can cheat
at them..
ok millert guenther tedu
2014-12-08 21:56:27 +00:00
tedu
0affe7fc21 okan noticed this was actually calling the cfree turd. 2014-12-08 21:11:02 +00:00
deraadt
7af8bc0b26 we do not use pcc on the vax 2014-12-07 21:06:57 +00:00
deraadt
9950ff4418 the debug / SVR4 chunk has been busted for a while. interesting.
from Jonas Termansen
2014-12-07 19:56:19 +00:00
jmc
17bed03ccd removing the "rigged demo" quote, as it's also present in fortunes (1) file; 2014-12-07 08:47:22 +00:00
deraadt
89f61510a2 Remove SVR4 codeblock which insisted on using srand(time(0)) and rand().
How did this survive the tedu?? Very disappointed!!
2014-12-05 00:48:57 +00:00
deraadt
1e1477420a Stop people from cheating. Especially those that believe in FIPS, they
are the worst.
ok millert ingo tedu
2014-12-04 06:12:33 +00:00
schwarze
6a52b24d9b in the recent update of capitals, this critical file was forgotten 2014-12-03 00:04:54 +00:00
schwarze
5963cb8a8f delete unused, almost empty file 2014-12-02 12:50:04 +00:00
schwarze
550d66d25a get rid of line-printer-era backspace-encoding of diacriticals;
patch from pjanzen@; ok jmc@
2014-12-02 12:43:09 +00:00
schwarze
3430162862 Even though not callable, "Ed" is a macro name, so for clarity,
escape it when it appears on a macro line.
2014-11-30 02:41:43 +00:00
deraadt
62fc451f51 Adjust ordering; from pjanzen 2014-11-24 06:31:50 +00:00
deraadt
ec9f5c310e Add two new IUPAC elements, and adjust the atomic weights of some.
from pjanzen
2014-11-24 06:31:23 +00:00
deraadt
190359872e Update to gravely outdated places to visit, from Jack Szmidt 2014-11-22 20:06:27 +00:00
schwarze
928af296bb minor tweaks and add HISTORY; ok jmc@ 2014-11-20 01:35:47 +00:00
krw
fafc9fefb3 We don't need no stinkin' non-new-curses code. Also eliminates a
double #include.

ok deraadt@ tedu@
2014-11-19 18:55:09 +00:00
schwarze
dc238ad5f4 Bugfix: run for the specified number of seconds as described in the manual,
not for a fixed number of iterations.  This makes a difference on terminals
not fast enough to update every second, in particular in -s mode.
Inspired by FreeBSD, but implemented differently with less bugs.
Patch from pjanzen@, slightly tweaked by me.
2014-11-19 03:27:45 +00:00
krw
14434de622 Nuke some obvious #include duplications.
ok espie@ deraadt@ millert@ tedu@
2014-11-18 20:51:00 +00:00
tedu
1b2da9231e sigwinch support for resizing. from pjanzen 2014-11-18 20:09:45 +00:00
schwarze
7f2aa82d51 Center the clock. Based on an idea and an original diff from tedu@,
arithmetics and validity constraints fixed by me.  OK pjanzen@ tedu@
2014-11-18 05:09:38 +00:00
schwarze
c4f20e92d7 HISTORY and AUTHORS; ok pjanzen@ mickey@ 2014-11-18 02:25:12 +00:00
schwarze
35b20aedb4 Multiple improvements from pjanzen@:
* properly delay scrolling with nanosleep(2), relevant on fast terminals
* change timing to end scrolling on the second instead of starting it
* error out if the terminal is too small instead of garbling the output
* use strtonum(3) rather than strtol(3) and terminate error message with \n
2014-11-17 22:14:25 +00:00
guenther
053196f06f Remove a bogotified comment 2014-11-16 04:50:46 +00:00
guenther
34278d36bd Eliminate pointless use of <sys/param.h>, <sys/file.h>, <sys/sockio.h>,
and <sys/ttydefaults.h>
Replace MAXPATHLEN with PATH_MAX and MAXLOGNAME with LOGIN_NAME_MAX
Pull in <limits.h> where needed
Prefer sizeof(var) over MAXFOO or FOO_MAX

ok deraadt@
2014-11-16 04:49:48 +00:00
bentley
d01fe41759 Reduce instances of `` '' in manuals.
troff displays these as typographic quotes, but nroff implementations
almost always print them literally, which rarely has the intended effect
with modern fonts, even in stock xterm.

These uses of `` '' can be replaced either with more semantic alternatives
or with Dq, which prints typographic quotes in a UTF-8 locale (but will
automatically fall back to `` '' in an ASCII locale).

improvements and ok schwarze@
2014-11-15 14:41:01 +00:00
schwarze
0d300bcaaf Split bcd(6), morse(6), and ppt(6) into three separate manuals
since most of the text is different.
Improve the SYNOPSIS according to suggestions by jmc@, tweaked by me.
Delete a few redundant words, applying a patch from jmc@.
Intentionally not doing any other text changes in this commit;
for further tweaking in the tree.

jmc@, tedu@, and millert@ agree with the general direction, and
deraadt@ suspects we are "all grey beard fanatics" (in all caps).
2014-11-07 22:17:49 +00:00
tedu
09d6f9ae6b fixup argv handling after getopt conversion. oops. 2014-11-06 19:54:10 +00:00
tedu
e17bcdb243 -l option to create "modern" 80 column cards 2014-11-06 19:42:06 +00:00
tedu
05bf2a5dec basic decode functionality 2014-11-06 19:35:13 +00:00
tedu
7215c05fc6 don't deref timeout if null. from theo buehler. 2014-11-05 20:23:38 +00:00
tedu
cc8a234a40 make the long line code work with argv too 2014-11-04 17:58:26 +00:00
tedu
1a508dba00 fix another signed char bug. while here, toupper() is now safe to call
on any char value.
2014-11-04 17:52:12 +00:00
tedu
50d1b26a76 allow printing longer lines than fit on a card by spilling onto more cards.
don't negatively index into the table for signed chars.
ok pjanzen
2014-11-04 17:50:23 +00:00
tedu
5d7c25f29f use knuth shuffle for better distribution of permutations 2014-11-03 22:18:15 +00:00
deraadt
5e64005729 select() to poll() conversions
ok tedu (... other games maintainer absent)
2014-11-03 22:14:54 +00:00
tedu
a8ed32d4ad the man page says it is impossible to cheat, but since the shuffle is
lopsided, a sharp counter can detect uneven permutations. fix this by
using knuth shuffle.
ok mlarkin pjanzen
2014-11-03 19:18:16 +00:00
brad
7bb46c973c Add a format specifier for the printf. 2014-10-26 07:03:47 +00:00
doug
6895fd506a Userland reallocarray() audit.
Avoid potential integer overflow in the size argument of malloc() and
realloc() by using reallocarray() to avoid unchecked multiplication.

ok deraadt@
2014-10-11 04:06:05 +00:00
doug
68db792b8a Userland reallocarray() audit.
Avoid potential integer overflow in the size argument of malloc() and
realloc() by using reallocarray() to avoid unchecked multiplication.

ok deraadt@
2014-10-11 04:00:56 +00:00
doug
d6ad5e9a6e Userland reallocarray() audit.
Avoid potential integer overflow in the size argument of malloc() and
realloc() by using reallocarray() to avoid unchecked multiplication.

ok deraadt@
2014-10-11 03:58:11 +00:00
schwarze
16d4cf49a1 I was mistaken: Nothing's wrong with contractions, they're just a normal
feature of the English language, so revert that part of the previous.
Requested by jmc@.
2014-09-28 07:53:02 +00:00
schwarze
12e8d7d349 Add missing .An macros (found with mandoc -Tlint) and
resolve contractions (found with textproc/igor(1)).
Work done by Kaspars at Bankovskis dot net
during the EuroBSDCon 2014 documentation tutorial.

Very minor addition of a few more missing .An macros by myself.
2014-09-26 21:41:56 +00:00
schwarze
27e959701b obvious cases of missing .An;
found with the new mandoc(1) MANDOCERR_AN_MISSING warning;
no text changes
2014-09-08 01:27:54 +00:00
okan
e9819117c1 zap trailing newlines; "go for it" deraadt 2014-07-16 20:00:14 +00:00
okan
d972594138 replace beforeinstall target with LINKS; rot13 becomes a hardlink to
caesar instead of a symlink.

agreed by deraadt, sobrado, guenther
2014-07-16 16:56:45 +00:00
tedu
d03921ce12 calling this "encryption" makes me cringe. "slightly obfuscated" is better. 2014-07-13 19:40:57 +00:00
tedu
5b92e02df2 if not seeded explicitly, use arc4random instead. ok deraadt 2014-07-13 14:01:04 +00:00
tedu
54740ad2cd long live BSD, SYSV is dead! 2014-07-13 13:00:40 +00:00
tedu
68413d08d8 mlarkin found disabled code to print a battleship. improve it and enable.
ok mlarkin
2014-07-12 08:29:56 +00:00
deraadt
cb127fae54 Remove a pile of (obviously unused) #ifdef SYSV and BSD41 and BSD42
code that catches lots of signals, and then re-enters curses... before
exiting.
2014-07-12 03:41:04 +00:00
schwarze
b9a3a871c4 Mark functions calling exit(3) as __dead.
Issue reported by David Crosby <dave at dafyddcrosby dot com> on tech@.
ok miod@
2014-07-03 20:30:17 +00:00
guenther
20c06e889b Fix typo in Hoare quote 2014-07-01 03:17:29 +00:00
tedu
f8c28d465c use calloc. from Benjamin Baier 2014-05-25 17:39:07 +00:00
schwarze
2bd4d2271d Various cleanup in incard():
* get_line() always returns the same non-NULL pointer,
so testing the return value is useless.
* Garbage collect the unused variable *line.
* Check for end-of-buffer before parsing the next word instead of after it.
* Skip strlen() when the length has been measured three lines before anyway.
* Do not initialize local variables over and over again.
feedback and ok pjanzen@
2014-05-09 23:56:26 +00:00
schwarze
e94b4bde53 Fix a mini-bug reported by pjanzen@:
When entering card names, you can use multiple words (like KING OF SPADES).
If you entered more than one consecutive blank character between words,
the function incard() took that as end-of-string and ignored the rest.
Fix this by dropping duplicate blanks up front, in get_line().
Patch simplified by me, ok pjanzen@.

While here, use beep(3) in an adjacent line instead of manually fiddling
with control characters, suggested by pjanzen@.
2014-05-09 23:39:10 +00:00
jmc
d1e697f3f8 pjanzen pointed out that case is irrelevant, so document it; while here,
zap an old workaround needed to insert a space - it's now useless (was
actually generating a second space);

original diff from pjanzen
2014-05-09 21:53:42 +00:00
schwarze
a0e179f1d4 KNF: unify style and reduce indentation in get_line(), no binary change
ok cmp(1)
2014-05-09 03:13:24 +00:00
schwarze
f84850bae1 After entering an invalid three-letter card name, one letter card names
stopped working because the third letter remained in the buffer,
incard() skipped the NUL and used the old garbage.
Fix this bug reported by pjanzen@, but in a simpler way than he
suggested, by just clearing any trailing garbage from the buffer.
ok pjanzen@
2014-05-09 02:47:25 +00:00
schwarze
4ba9194b64 Various cleanup:
1. Style: Don't use variables as format strings.
NetBSD rev. 1.26 (May 23, 2011) joerg@NetBSD via maintainer pjanzen@.
2. Style: Avoid needless pointer arithmetics.
NetBSD rev. 1.27 (Oct 13, 2012) dholland@NetBSD via pjanzen@,
who also applied some KNF to the indentation while here.
3. End curses before printing fatal error messages; from pjanzen@.
2014-05-09 00:03:41 +00:00
schwarze
997a177148 Do not read from index -1 of an array.
NetBSD rev. 1.16 (Oct 13, 2012) by dholland@NetBSD via maintainer pjanzen@.
2014-05-08 23:12:40 +00:00
schwarze
241534bcd2 This manual was lacking it's most important section, HISTORY.
While here, add .An (author name) macros.
2014-04-25 20:33:05 +00:00
schwarze
f434044808 Security is square, gaming is hip,
so extend the Valhalla Rampage to where it really matters.

Tedu 118 lines of dead code containing 77 dead magic numbers,
rotting in the tree since June 24, 2001.

Spotted by and ok jsg@, ok sthen@.
2014-04-25 20:23:37 +00:00
jmc
4201af8e4b typo fix From: Josh Grosse; 2014-03-30 07:21:26 +00:00
jmc
d157381264 some minor cleanup:
- new sentence, new line
- no need to quote Sh lines, or Pa args
2014-03-23 07:45:47 +00:00
tedu
f657ba201c stop using libwrap. ok deraadt 2014-03-23 02:42:47 +00:00
guenther
ebf3d589a8 Match bwrite()'s prototype with write()'s, zapping a lint comment
Delete casts to char* of arguments to bwrite() and free()
2014-03-11 08:05:15 +00:00
guenther
6200b080bb Welcome to 1989: we can ask for signed chars when we want them 2014-03-11 08:02:36 +00:00
guenther
c56d7ecca7 lint is dead (long live the lint!)
Declare play() and pl_main() as __dead, to solve the original problem
2014-03-11 07:42:55 +00:00
guenther
be932af245 lint is dead (long live the lint!) 2014-03-11 07:41:10 +00:00
jmc
c4c701f93f malcolm macdougall, not dacdougall;
From:       Joe Marcus Clarke
2014-02-16 09:31:27 +00:00
schwarze
98dd9e3200 remove an obsolete man(7) .TP macro that was forgotten
when converting this page to mdoc(7) in revision 1.4;
noticed by Jan Stary <hans at stare dot cz>
2014-02-12 13:09:08 +00:00
schwarze
6d0c574e24 clean up AUTHORS section, no content change:
* add missing .An
* do not use .nf and .fi in mdoc(7) code
* avoid bare TAB outside literal context
* remove pointless .Ss
from Jan Stary <hans at stare dot cz>, tweaked by me
2014-02-11 22:21:21 +00:00
jmc
694ee1bce2 from pjanzen:
Start with the cursor on the worm's head.

ok millert
2014-01-28 14:30:28 +00:00
jmc
3c877182e5 from pjanzen:
Use strtonum() and error out on an unacceptable length argument rather than
reverting to default values; document maximum initial length limit.

started by a diff From: Jan Stary, who requested we document default behaviour

ok millert
2014-01-28 14:28:44 +00:00
schwarze
369bef3a14 obvious .Pa fixes; found with mandocdb(8) 2014-01-21 03:15:44 +00:00
guenther
2778d96683 optarg/optind are declared in <unistd.h>, so kill the externs here 2014-01-11 06:28:46 +00:00
jmc
ae4f181893 typo fix from gavin atkinson, freebsd -r259189; 2013-12-11 07:37:37 +00:00
okan
5195d91e62 remove erroneous char cast to switch expression processing getopt(3);
not used in any cases.

ok deraadt@, guenther@, millert@
2013-11-27 13:32:02 +00:00
millert
16df4d37c7 start_time should be time_t, not int since it holds the reasult of
time(0).  OK guenther@
2013-10-25 21:57:10 +00:00
millert
59b6ed5b93 Use arc4random_uniform() insead of rand() and modulus.
OK deraadt@
2013-10-25 18:31:29 +00:00
deraadt
9fb56250d6 remove conditionals for ELF; prodding by patrick keshishian 2013-10-15 22:09:29 +00:00
deraadt
abdc61a1f5 no more a.out support here 2013-10-15 05:45:55 +00:00
krw
b76d488763 Misc time_t tweaks. %ld / (long)tv_sec -> %lld / (long long)tv_sec.
Eliminate unneeded casts. suggestions from & ok millert@ guenther@
2013-09-12 23:06:43 +00:00
naddy
66e4954187 replace srandomdev()+random() with the arc4random*() family
tweaks and ok millert@, ok deraadt@
2013-08-29 20:22:09 +00:00
naddy
368a5dae0f Tournament mode uses a deterministic random seed for reproducible games.
Switch seeding from srand() to srandom(), corresponding to the change
in random number generator from rand() to random() fifteen years ago.
ok pjanzen@ bluhm@ millert@
2013-08-29 14:35:49 +00:00
guenther
82ff36301f Correct format string mismatches turned up by -Wformat=2
suggestions and ok millert@
2013-08-22 04:43:40 +00:00
guenther
8aac6f43ce Fix calls to printf-like functions which passed a non-fixed string
as the format and no variable args.
Replace "%#0.*X" with "%#.*X": the zero-fill flag is ignored/implied
on numeric conversions when a precision is specified.

ok jung@ millert@ krw@
2013-08-18 16:32:23 +00:00
jmc
73d4fc9bd5 no longer any need to quote macro lines with >9 args;
From: Jan Stary
2013-08-14 06:32:26 +00:00
schwarze
fe8a5a2edf add missing .An and .Mt macro; from Jan Stary <hans at stare dot cz>; ok jmc@ 2013-07-17 20:11:09 +00:00
schwarze
a2daac06b4 use .Mt for AUTHORS email; from Jan Stary <hans at stare dot cz>; ok jmc@ 2013-07-16 11:14:19 +00:00
schwarze
d5873fd2eb Correct obviously exchanged labels in the "computer warpcost" output and
fix a typo in a comment; from <Ted dot Roby at gmail dot com> on tech@.
2013-06-02 04:28:39 +00:00
jmc
faff140bf6 teenagers from *outer* space ("they blast the flesh off hunmans!"); 2013-05-09 09:39:24 +00:00
tedu
9607ea054b this doesn't need to be time_t ok deraadt 2013-04-05 01:28:27 +00:00
jmc
e3e5eeec87 typo fix; from pgoyette, netbsd -r1.15 and -r1.11, respectively; 2013-02-18 08:48:11 +00:00
jmc
b4d871114a typo; fix from patrick keshishian 2013-02-10 15:21:28 +00:00
jmc
073de7f956 macro fixes; 2013-01-17 21:58:08 +00:00
deraadt
4a39ccd02c Remove excessive sys/cdefs.h inclusion
ok guenther millert kettenis
2012-12-05 23:19:48 +00:00
jmc
6d9cdf43d5 grammar fix; from Chris Petrik, freebsd pr 173868 2012-11-24 08:11:59 +00:00
jmc
a4ccc5d0b3 pjanzen spotted that my previous commit mistakenly omitted another
spelling fix;
2012-11-17 12:35:04 +00:00
jmc
bef7f86ede two spelling fixes; from John-Mark Gurney (freebsd -r243048); 2012-11-16 08:56:04 +00:00
jmc
08284e2896 typo; netbsd -r1.10 2012-06-20 07:35:42 +00:00
jmc
d082738b42 make both -d options format the same, and zap that annoying full stop 2012-05-27 16:57:14 +00:00
sthen
b7ad85c8c7 Use an en-dash for 20-200, escape - used as arithmetic symbol.
Same as jmc's tweaks for rain(6).
2012-05-27 11:44:52 +00:00
sthen
a6ef357f8e Update for new -d default; tweaks+ok jmc@ 2012-05-27 11:43:35 +00:00
sthen
a10a9c7e99 Teach rain(6) to calculate terminal delays in the same way as worms(6),
rather than use a default which totally floods the network if run over ssh.

Discussed with matthieu@ martynas@, ok matthieu@
2012-05-27 10:09:33 +00:00
miod
4f5cf19482 typos 2012-05-24 19:34:53 +00:00
fgsch
f9bbbf4534 In preparation for getline and getdelim additions to libc, rename getline()
occurrences to get_line().
Based on a diff from Jan Klemkow <j-dot-klemkow-at-wemelug-dot-de> to tech.
2012-03-04 04:05:15 +00:00
schwarze
7c9469e390 Add HISTORY section and more information regarding AUTHORS.
Feedback and ok Eric Allman (via Kirk McKusick, thanks!), ok jmc@ sobrado@.
2011-12-28 22:06:36 +00:00
pascal
6489a97b86 Fix grammar and spelling in a Latin fortune.
ok jmc@
2011-12-04 18:18:56 +00:00
jmc
528453e7f8 grammar fix, from jnemeth@netbsd (-r1.48); 2011-11-20 08:31:07 +00:00
jmc
9e3b2e5a12 +Cn:112:(285):Copernicium
from pjanzen
2011-11-19 08:34:17 +00:00
guenther
5105d5e33f union wait is dead, ancient history; stop using it
ok deraadt@
2011-11-06 01:43:50 +00:00
jmc
cbc4ffc222 some presidential updates, from pjanzen; 2011-10-06 18:18:28 +00:00
jmc
e324319b8a make -column lists pretty again;
specifically, rewrite them to permit some markup in the column headers,
and use "Ta" instead of literal tabs; mandoc does not currently match groff
100%, but a mandoc fix may be some time off, and we've gone enough releases
with poorly formatting column lists.

in some cases i have rewritten the lists as -tag, where -column made
little sense.
2011-09-03 22:59:07 +00:00
jmc
1f6f5bb175 no more rogue(6); 2011-07-03 13:45:15 +00:00
martynas
e9c94d5e68 Remove rogue. Its license is not acceptable for our tree; been
unlinked from the builds for 8 years.  I've been talking with the
author 2 years ago, he didn't release a proper license.  It's clear
that the issue won't be resolved.  OK tedu@.
2011-07-03 05:12:15 +00:00
schwarze
d9fb19d275 switch to installing source manuals (base part)
discussed with lots of people, tested by naddy@,
"move fast" deraadt@
2011-06-23 22:46:12 +00:00
deraadt
eb38fe0397 delete unused stupid code; Daniel Dickman 2011-06-23 03:14:32 +00:00
miod
c3fc728d99 Do not compare a char' variable to EOF, which does not fit if char' defaults
to unsigned (e.g. arm, powerpc); ok guenther@ matthew@ looks good deraadt@
2011-06-20 17:40:55 +00:00
jmc
670e581642 typo; from Doug Barton (freebsd r222890) 2011-06-10 11:38:10 +00:00
jmc
7e7f27222c some spelling fixes from Lucas De Marchi, via freebsd; 2011-05-16 16:38:09 +00:00
millert
73ea6815fa Fix "-d delay" option and convert to use strtonum()
OK martynas@ a while ago.
2011-04-25 13:30:07 +00:00
dcoppa
e89df1f723 Hide the cursor during game. From NetBSD.
OK nicm@
2011-04-03 10:25:59 +00:00
deraadt
357d2205e9 Use the help pager code, but repair it in various ways.
(I had to fix the $PAGER support beyond the patch supplied by Simon)
from Simon.Nicolussi@student.uibk.ac.at
2011-03-16 18:11:37 +00:00
schwarze
7a287dd846 In roff, the escape sequence \: is an optional line break,
so escape a literal non-punctuation colon correctly as \&:.
Required for correct formatting with groff-1.20.1 and Heirloom troff;
strangely, groff-1.15 and mandoc have the same bug here, hiding the error.
"fine" jmc@

While here, change .Dq to .Sq which looks better for single-character
quoting, as suggested by jmc@.
2011-01-24 00:42:44 +00:00
jasper
e216b597ef - plug mem leak.
ok chl@
2011-01-03 17:38:24 +00:00
tedu
3e54dc23f4 as of 1989, fread/fwrite take void *, so there's no need to cast to char *. 2010-12-15 06:40:39 +00:00
dcoppa
103d36c1aa fix errx() usage.
OK henning@
2010-11-03 12:51:10 +00:00
jmc
9498368bfd remove the "-*- nroff -*-" lines; 2010-10-29 12:27:21 +00:00
jmc
037ab04241 put HISTORY in the right place; 2010-09-19 13:34:52 +00:00
krw
521a018f77 Update 'Fastest Defeat In Chess' fortune, trying to dispel Gibaud
- Lazard 1924 myth.

prompted by and ok jmc@
2010-09-04 17:07:43 +00:00
jmc
879b310506 fix a capitalisation error; 2010-07-31 07:09:37 +00:00
jmc
55d3c359fb fix the Cecil Beaton quote; from Rob Farmer, freebsd pr #148916 2010-07-26 14:53:59 +00:00
deraadt
1dbb2c0de5 sub-function needs const, too 2010-07-20 00:15:20 +00:00
schwarze
fb96007bea More delimiters that need quoting inside macros, hunted down by jmc@,
who asked me to commit because he is just running out of the door.
2010-07-15 20:51:38 +00:00
tedu
156529a139 update to modern regex code and remove libcompat. ok deraadt phessler 2010-07-02 23:43:42 +00:00