Commit Graph

2156 Commits

Author SHA1 Message Date
dholland 231a9fdc87 Avoid runon sentences. 2015-03-25 16:23:02 +00:00
wiz 076a2da7d8 Use Pp (mdoc) instead of sp (roff).
Use An in AUTHORS section.
2015-02-19 08:51:14 +00:00
mrg 2343aabb74 add a 'down' key to tetris, defaulting to 'n'. it move the block down
a line, if it fits.  like most other tetris games have.

minor clean up of magic number usage while here.
2015-02-19 02:27:30 +00:00
dholland 8e005c7126 typo 2015-02-12 06:24:21 +00:00
wiz 56d805f1de Fix typo. From kspillner@OpenBSD, forwarded by jmc@OpenBSD. 2015-02-07 09:59:47 +00:00
dholland e7288b6692 add something 2015-01-06 22:38:41 +00:00
jnemeth 2e0522b1d5 PR/49513 - Henning Petersen -- tyop 2014-12-29 10:38:52 +00:00
jnemeth f047653252 PR/49513 - Henning Petersen -- tyop 2014-12-29 10:27:03 +00:00
jnemeth 7344513002 PR/49451 - Ben Gergely -- add missing attribution 2014-12-05 23:21:23 +00:00
snj bd4986da66 English 2014-10-18 06:42:31 +00:00
snj 75815ac0a1 1) "It's its"
2) Whitespace
3) You're all too old to be confusing "your" with "you're"
2014-10-18 06:40:18 +00:00
wiz e5079a7b49 usage police 2014-10-04 13:15:50 +00:00
ast bfe1fbfe02 Imported and adapted from FreeBSD svn r272166 and r272207; this fixes
false positives for products of primes larger than 2^16. For example,
before this commit:

  $ /usr/games/primes 4295360521 4295360522
  4295360521
but
  $ /usr/games/factor 4295360521
  4295360521: 65539 65539

or
  $ /usr/games/primes 3825123056546413049 3825123056546413050
  3825123056546413049
yet
  $ /usr/games/factor 3825123056546413049
  3825123056546413049: 165479 23115459100831

or
  $ /usr/games/primes 18446744073709551577
  18446744073709551577
although
  $ /usr/games/factor 18446744073709551577
  18446744073709551577: 139646831 132095686967

Incidentally, the above examples show the smallest and largest cases that
were erroneously stated as prime in the range 2^32 .. 3825123056546413049
.. 2^64; the primes(6) program now stops at 3825123056546413050 as
primality tests on larger integers would be by brute force factorization.

In addition, special to the NetBSD version:
. for -d option, skip first difference when start is >65537 as it is incorrect
. corrected usage to mention both the existing -d as well as the new -h option

For original FreeBSD commit message by Colin Percival, see:
http://svnweb.freebsd.org/base?view=revision&revision=272166
2014-10-02 21:36:37 +00:00
christos 355dba76e5 adhere to stricter groff checking:
- don't specify distance separation between this and the next column for
  the last column, since there's no next column.
- don't pop environment you did not push
2014-09-30 20:46:59 +00:00
wiz 2a65137f55 Sort sections. From Henning Petersen in PR 49222. 2014-09-19 16:02:58 +00:00
wiz 3039a5421b Bump date for -c (exactly one year after previous bump) 2014-07-15 16:17:15 +00:00
pgoyette 990812d69b At suggestion of christos@, use -b for b&w rather than -c 2014-07-13 17:38:38 +00:00
pgoyette 68006fcab2 Provide an option to restore traditional black-and-white mode. 2014-07-13 16:23:55 +00:00
dholland b7b7574d3b Reorg docs, part 1:
Move all the reference manuals to subdirs of /usr/share/doc/reference.
We have subdirs ref1-ref9, corresponding to man page sections 1-9.

Everything that's the reference manual for a program (sections 1, 6,
8), C interface (sections 2, 3), driver or file system (section 4),
format or configuration (section 5), or kernel internal interface
(section 9) belongs in here.

Section 7 is a little less clear: some things that might go in section
7 if they were a man page aren't really reference manuals. So I'm only
putting things in reference section 7 that are (to me) clearly
reference material, rather than e.g. tutorials, guides, FAQs, etc.
This obviously leaves some room for debate, especially without first
editing the docs with this distinction in mind, but if people hate
what I've done things can always be moved again.

Note also that while roff macro man pages traditionally go in section
7, I have put all the roff documentation (macros, tools, etc.) in one
place in reference/ref1/roff. This will make it easier to find and
also easier to edit it into some kind of coherent form.
2014-07-05 19:22:41 +00:00
dholland c3ab26950f Rework /usr/share/doc.
Update the <bsd.doc.mk> infrastructure, and update the docs to match
the new infrastructure.

- Build and install text, ps, pdf, and/or html, not roff sources.

- Don't wire the chapter numbers into the build system, or use them in
the installed pathnames. This didn't matter much when the docs were a
museum, but now that we're theoretically going to start maintaining
them again, we're going to add and remove documents periodically and
having the chapter numbers baked in creates a lot of thrashing for no
purpose.

- Specify the document name explicitly, rather than implicitly in a
path. Use this name (instead of other random strings) as the name
of the installed files.

- Specify the document section, which is the subdirectory of
/usr/share/doc to install into.

- Allow multiple subdocuments. (That is, multiple documents in one
output directory.)

- Enumerate the .png files groff emits along with html so they can be
installed.

- Remove assorted hand-rolled rules for running roff and roff widgetry
and add enough variable settings to make these unnecessary. This
includes support for
   - explicit use of soelim
   - refer
   - tbl
   - pic
   - eqn

- Forcibly apply at least minimal amounts of sanity to certain
autogenerated roff files.

- Don't exclude USD.doc, SMM.doc, and PSD.doc directories from the
build, as they now actually do stuff.

Note: currently we can't generate pdf. This turns out to be a
nontrivial problem with no immediate solution forthcoming. So for now,
as a workaround, install compressed .ps as the printable form.
2014-07-05 19:22:02 +00:00
mrg ac641cb906 remove remaining makefile support for GCC < 45 that i found. 2014-06-14 20:49:36 +00:00
christos a5d2792650 Add a little color. In order to minimize logic differences, keep 0 as the
empty board value, and since 7 is white, turn white into black (0) when
painting.
2014-06-11 16:47:39 +00:00
skrll eec6f7013a Remove unused. 2014-03-30 09:11:50 +00:00
dholland 9cdcb5fdab Use bool (not int) for a boolean return type. 2014-03-30 05:53:12 +00:00
dholland f2f2077532 Use the curses beep function instead of writing a beep to stdout. 2014-03-30 05:48:35 +00:00
dholland 3d0af5d09f curses has printw, use it. 2014-03-30 05:46:54 +00:00
dholland 7a606e3ec4 don't use the preprocessor to rename curses functions, just call them 2014-03-30 05:44:55 +00:00
dholland 290fd62765 fix off-by-one 2014-03-30 05:41:50 +00:00
dholland ea57ad9ea1 Instead of #define STDIN 0, use STDIN_FILENO. 2014-03-30 05:38:13 +00:00
dholland c560d1b163 Remove SHORTLEN and LONGLEN defines; use sizeof() properly instead.
Fix two semi-compensating size bugs in wire transmission affecting
64-bit machines.
2014-03-30 05:30:28 +00:00
dholland b57df0f022 Naming reform for socket pieces, akin to what I did in huntd earlier.
(but not as comprehensive)
2014-03-30 05:14:47 +00:00
dholland 5c657efd0e I wish the socket API didn't require casts. Easy to mess them up. 2014-03-30 04:57:37 +00:00
dholland e25cca1c03 fix obvious mistake (seems to have been there since 4.4) 2014-03-30 04:40:50 +00:00
dholland 90606027c5 Tidy up list of broadcast addresses. 2014-03-30 04:39:40 +00:00
dholland 319c22dff7 Clean up the handling of the list of hunt daemons. 2014-03-30 04:31:21 +00:00
dholland 2509088ed2 use fewer globals 2014-03-30 03:35:26 +00:00
dholland 78a2d83843 more cleanup 2014-03-30 03:26:19 +00:00
dholland 15043e8a8f unexpose some globals that server.c previously required 2014-03-30 02:58:25 +00:00
dholland 3d3dd0d453 name reform, fewer file statics 2014-03-30 02:53:11 +00:00
dholland 61623de9c7 goto considered harmful 2014-03-30 02:46:57 +00:00
dholland 082c40f53a split off a bunch of the nastier network code into its own file 2014-03-30 02:26:09 +00:00
dholland 38f4986ae9 When indexing an array with a char, cast it to unsigned char, not int,
to not only silence the compiler warning but also get the correct
behavior.
2014-03-30 02:11:25 +00:00
dholland 9e2af583dd Remove all the conditional compilation for INTERNET. Now you can run
this on either a local or internet socket (including via inetd on
either) and it will, or is supposed to, DTRT.

Does not really support ipv6 yet, but in a number of places will no
longer vomit or exhibit UB if it encounters an ipv6 address.
2014-03-30 01:44:37 +00:00
dholland 8c7631b6e4 Clean up the names of the various pieces of socket apparatus.
Systematic naming is easier to follow...
2014-03-30 00:26:58 +00:00
dholland f0ab07d690 fix non-INTERNET build 2014-03-29 23:44:38 +00:00
dholland ec434f4b81 Er oops, fix previous. 2014-03-29 22:30:27 +00:00
dholland 865e0d6472 Reduce ifdefs by making a common function to talk to either syslogd or
stderr.
2014-03-29 22:29:55 +00:00
dholland 375031264b group external functions by where they come from 2014-03-29 22:15:26 +00:00
dholland 80f7486c03 be consistent about whether functions are static 2014-03-29 22:15:13 +00:00
dholland 98db4e3267 handle compiled-in pathnames the customary way 2014-03-29 22:11:19 +00:00
dholland af8c06ff02 make some globals static 2014-03-29 22:05:44 +00:00
dholland ecca92983f Additional minor cleanup and remove a straggler data declaration
from hunt_common.h.
2014-03-29 21:55:59 +00:00
dholland 506bf125f4 Group function declarations by which source file they come from, and
delete several that don't actually exist.
2014-03-29 21:43:46 +00:00
dholland e195993756 be consistent about whether functions are static 2014-03-29 21:38:54 +00:00
dholland b19465b277 sprinkle static 2014-03-29 21:33:41 +00:00
dholland f1eb9b5b9c Flush unwanted file. 2014-03-29 21:27:40 +00:00
dholland 39032702fc Move definitions to the file they're used in. 2014-03-29 21:27:08 +00:00
dholland 15b06d8071 move a comment that should have gone with its symbol 2014-03-29 21:25:35 +00:00
dholland b833a6b3f7 Remove tautological #if DEBUG. 2014-03-29 21:24:56 +00:00
dholland ff658bd09f Split hunt and huntd's includes, instead of incestuously sharing a pile
of external data and function declarations between the two programs.

Common constants and defines now go in hunt_common.h. Stuff that belongs
only to hunt is in hunt/hunt_private.h. Stuff that belongs only to huntd
is in huntd/hunt.h.

Copy some declarations that are used in both programs under the same
names (but are not actually the same objects) from huntd/hunt.h to
hunt/hunt_private.h. Move others that are only used in hunt. Remove
some entirely unused material, and tidy up standard includes.
2014-03-29 21:24:26 +00:00
dholland d07915f9b3 Remove unsafe and unnecessary pointer casts. 2014-03-29 20:53:55 +00:00
dholland c6e948ac19 catch up to huntd changes.
XXX: this needs to stop promiscuously sharing .h files.
2014-03-29 20:52:13 +00:00
dholland 8f371b472c tsort contents of file 2014-03-29 20:44:20 +00:00
dholland 1b82cc9fb5 const in unused code 2014-03-29 20:41:57 +00:00
dholland 54eb2b3816 remove stubbed-out function 2014-03-29 20:35:30 +00:00
dholland 263e041ca2 Rip out the code that broadcasts talk requests to the local
hunt-players mailing list.

In this day and age it doesn't even begin to work: even if you were to
have such a mailing list locally, sendmail wouldn't expand it for you,
the addresses you got back wouldn't be talk-requestable addresses,
talk requests don't cross NAT or firewalls safely, talk doesn't
support ipv6, and nobody runs talkd anyway.

It doesn't make sense to try to replace it with some other kind of
notify scheme either; there might still be a multiuser machine
somewhere with enough simultaneous users that broadcasting something
akin to talk requests locally might make sense, and where a nontrivial
number of the users actually play hunt, but probably not, and if so
those users are likely to be better off using wall(1) anyway. Nowadays
games will be set up by looking for people in chat or by emailing or
texting friends.

Theoretically someone could set up an internet hunt metaserver for
finding hunt games, but that would be something entirely different
anyway and I doubt there's demand.
2014-03-29 20:32:04 +00:00
dholland d39951fe62 Remove empty header file. 2014-03-29 20:16:09 +00:00
dholland 7004aab3ca Use setproctitle() instead of handrolled version. 2014-03-29 20:12:12 +00:00
dholland 7b718e7cd8 Make the code for issuing talk requests to find players actually build. 2014-03-29 20:10:10 +00:00
dholland 37a43147ab don't declare own boolean type 2014-03-29 19:41:10 +00:00
dholland 208bf48e82 use random(), not a handrolled 16-bit generator 2014-03-29 19:33:03 +00:00
dholland 329b34a67e Use getaddrinfo() instead of gethostbyname(). 2014-03-29 19:26:28 +00:00
dholland d509fb9f42 typo in error message 2014-03-29 19:03:21 +00:00
dholland 267ec317ae const 2014-03-29 19:02:12 +00:00
dholland 8a64b7f83c simplify silly logic 2014-03-29 19:01:00 +00:00
apb fa823f4eed temp is a pointer, and tempmax, not sizeof(temp), is the length of
the buffer that it points to.  Adjust a strlcat() call to suit.
2014-03-28 17:53:47 +00:00
apb 27e71a78a5 If you are going to use memcpy instead of struct assignment, then at
least use sizeof(the correct variable).  The use of memcmp to test
two pointers for equality, one line earlier, is also weird but may be
correct.
2014-03-28 17:49:11 +00:00
dholland c1b7c6be35 Add note cautioning against bothering with WARNS=6 until gcc improves
(or -Wconversion is removed from WARNS=6) as it produces loads of false
positives. The most entertaining of these that I've seen this afternoon:

games/hack/hack.apply.c:143:22: error: conversion to 'unsigned char:1' from 'int' may alter its value [-Werror=conversion]
   flags.move = multi = 0;
                      ^
2014-03-23 00:17:40 +00:00
dholland 920b84d8b3 fix signedness issue 2014-03-23 00:07:15 +00:00
dholland b34516b7a7 gratuitous (but not harmful) changes to pass gcc48's -Wconversion 2014-03-23 00:03:04 +00:00
dholland 747644908b Use ssize_t for read() results. Don't use int for lseek() results.
Call srandom() with time(), not getpid().
2014-03-22 23:47:03 +00:00
dholland d6160edeb8 Use ssize_t for read() results. Don't use int for lseek() results. 2014-03-22 23:45:34 +00:00
dholland 5f3fafa77c Use uid_t to hold getuid() results, and don't check getuid for failure
as it isn't allowed to fail.
2014-03-22 23:42:48 +00:00
dholland 246baf44c7 use size_t instead of int for a length 2014-03-22 23:39:04 +00:00
dholland 4d631eb951 Use random(), not rand(). 2014-03-22 23:33:33 +00:00
dholland ffe2e1f51c avoid unnecessary floating point ops 2014-03-22 23:31:28 +00:00
dholland 84ecadaa86 avoid signed left-shift 2014-03-22 23:23:55 +00:00
dholland 6955cd2022 Use CHAR_BIT, not 8. 2014-03-22 23:16:21 +00:00
dholland 1b8c34b59e don't declare ospeed; it's in <termcap.h> 2014-03-22 23:10:36 +00:00
dholland 1e7c0bc4d8 Make the list of place types an enumeration. Use unsigned values for
place numbers.
2014-03-22 22:58:56 +00:00
dholland 3216ca61cd use a more suitable type 2014-03-22 22:47:07 +00:00
dholland 66a360a4e6 use more suitable types 2014-03-22 22:45:05 +00:00
dholland 6b884adb36 woops, more of previous. 2014-03-22 22:33:35 +00:00
dholland c1bee345de Make some things unsigned that should be (why would we need e.g. a
negative number of airports?) and remove some related bogus casts.
2014-03-22 22:24:21 +00:00
dholland 860c2027cb Don't cast the return value of malloc. 2014-03-22 22:09:14 +00:00
dholland 6f629695aa Minor tidyup. 2014-03-22 22:04:40 +00:00
dholland 337d73a6f4 tag decl() __noinline, as inlining it would defeat its purpose
(which is to not have interesting string literals appear in the
compiled binary)
2014-03-22 20:07:05 +00:00
dholland 9628f4097a Revert part of previous -r1.21 and fix the errno-handling bug instead. 2014-03-22 19:05:30 +00:00
dholland a94f7f4574 move extern decls to .h files 2014-03-22 18:58:57 +00:00
riastradh 6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
dholland 6b0a4364af fix typo, from Henning Petersen in PR misc/48613 2014-02-22 17:21:19 +00:00
dholland 36e28b2b0d remove duplicate 2013-12-11 14:59:47 +00:00
dholland 6a2afd2842 another minor fix 2013-12-11 14:56:10 +00:00
wiz 8883725705 Reinstate typo since kre claims it's by purpose.
Discussion in PR 48442.
2013-12-11 11:52:27 +00:00
wiz 5b306c5f1f Error and typo fixes from OpenBSD and FreeBSD via Henning Petersen
in PR 48443.

While here, remove a duplication, fix another typo, and
don't claim that Mr. Sheperd was the first man in space.
2013-12-11 11:33:49 +00:00
wiz f309df15dc Error and typo fixes from OpenBSD and FreeBSD via Henning Petersen
in PR 48442.
2013-12-11 11:24:56 +00:00
dholland 963ea49030 WARNS=5 2013-12-07 02:24:12 +00:00
mbalmer 1cdd30d45d hals_end(6) outputs the last words of the supercomputer HAL 9000 aboard
the spaceship in Stanley Kubrick's famous film "2001 - A Space Odissey".
The source code and output of this program were used to illustrate
an article in the book "Total Interaction".  How this looks in print can
be at http://www.netbsd.org/~mbalmer/hals_end.jpg.
2013-11-12 17:46:20 +00:00
christos 193b880fad fix unused variable warnings 2013-10-19 17:19:30 +00:00
uwe 66143a4f4f Untabify the header definition to avoid misaligned comment on
str_delim in PostScript output.
2013-09-19 00:58:11 +00:00
uwe 9a878f03ee Use .Fa instead of .Ar to refer to header fields. 2013-09-19 00:53:55 +00:00
uwe ffa10b6acf Now that we use "nbtool_config.h" we can use __dead again and drop
local attempts to define its equivalent.

Also drop the comment that warns this file is a tool; use of
"nbtool_config.h" makes it evident.
2013-09-19 00:34:00 +00:00
uwe abab96f683 Don't define TRUE/FALSE, which may conflict with host headers.
TRUE is unused anyway.  Replace all instances of FALSE with 0.
2013-09-19 00:18:52 +00:00
uwe d8e459b066 #include "nbtool_config.h" to pull in getprogname() declaration. 2013-09-18 23:18:14 +00:00
joerg 880491ca90 GC descr and helpm. 2013-09-13 20:46:50 +00:00
dholland 1c2751a848 hook cgram to the build 2013-09-01 18:37:06 +00:00
dholland a72799bb86 WARNS=5 2013-08-11 03:44:27 +00:00
dholland 09e313dddd typo in comment 2013-08-11 03:34:48 +00:00
dholland 7229854715 this already passes WARNS=5 2013-08-11 03:27:02 +00:00
wiz 2077b57a6f Add RCS Id. 2013-08-04 07:55:09 +00:00
dholland 0e7c031ea9 Add a curses gizmo for solving Sunday-paper-type cryptograms based on
substitution ciphers. It gets the cleartext from fortune. I wrote this
some years ago for my own amusement; a couple people have suggested
that I should import it.

Approved only by groo, so I'm going to wait a couple days to hook it
to the build in case anyone demands it be removed again...
2013-08-04 05:42:47 +00:00
wiz 9046849a85 Fix typo. 2013-07-24 06:57:09 +00:00
jnemeth 2471f41e04 add an Oscar Wilde quote 2013-07-24 04:41:49 +00:00
wiz a5684d07dd Use Mt for email addresses. 2013-07-20 21:39:55 +00:00
njoly 84e9c4d0dc Fix sendmail section (8 -> 1) in xrefs. 2013-07-09 09:41:30 +00:00
dholland 76f02c63f8 Don't expect fairings. 2013-05-12 03:29:07 +00:00
pgoyette 17514df881 Fix same typo in the other file in which it occurs 2013-02-17 13:39:51 +00:00
pgoyette 244f3b036e Fix minor typo 2013-02-17 13:36:01 +00:00
jmcneill 8d90f8a8ba rename target paper.${PRINTER} to paper.ps -- PRINTER isnt defined anywhere! 2013-02-17 12:17:40 +00:00
jmcneill 9b136a6b53 Workaround a toolchain issue by renaming the 'setup' host tool to 'mkdata' to make UAC happy when building with Cygwin. As described here -- http://msdn.microsoft.com/en-us/library/windows/desktop/bb756960.aspx -- 32-bit executables whose filenames include the strings 'install', 'setup', 'update', 'patch', etc. by default will request admin privileges unless an application manifest is provided. 2013-02-16 17:00:21 +00:00
jmcneill 410c4edada Workaround a toolchain issue by renaming the 'setup' host tool to 'mkdata' to make UAC happy when building with Cygwin. As described here -- http://msdn.microsoft.com/en-us/library/windows/desktop/bb756960.aspx -- 32-bit executables whose filenames include the strings 'install', 'setup', 'update', 'patch', etc. by default will request admin privileges unless an application manifest is provided. 2013-02-16 16:30:28 +00:00
jnemeth be61d44017 Add some quotes by Henry Ford, found at:
http://www.goodreads.com/author/quotes/203714.Henry_Ford
2012-12-08 22:38:09 +00:00
mbalmer 2913016879 Fix misspelling of acceptible (it's only acceptable with an 'a', not an 'i'). 2012-12-01 11:37:26 +00:00
mbalmer 961d9fb287 Fix two quotes from "The Tao of Programming". From FreeBSD. 2012-11-22 11:32:19 +00:00
abs 2de37ae37b PR/47178 from Bug Hunting
src/games/wtf/wtf:
- Correct `usage' (to match new `SYNOPSIS' from man page);
- augment comment on quering pkgsrc's help facility;
- correct interpretation of pkgsrc' help facility query result.

src/games/wtf/wtf.6:
- enhance `SYNOPSIS', document description (`.Dd'), and overal
  program description;
- augment description about quering pkgsrc's help facility;
- improve wording;
- augment `HISTORY' section;
- bump date.
2012-11-20 12:40:54 +00:00
jakllsch 133b402371 Attribute "The STAR WARS Song" to "Weird Al" Yankovic under the proper title,
"Yoda".  Correct said lyrics.

Correct lyrics to "Weird Al" Yankovic's "One Of Those Days".
2012-10-22 14:33:27 +00:00
dholland a59cfd489a Pass -Wstrict-overflow 2012-10-13 21:03:09 +00:00
dholland bf33b97c19 Pass -Wstrict-overflow; while here, use curses TRUE and FALSE only with
curses.
2012-10-13 21:01:13 +00:00
dholland 0d0b06a380 Pass -Wstrict-overflow... mostly. 2012-10-13 20:57:35 +00:00
dholland 211b175c28 Pass -Wstrict-overflow. 2012-10-13 20:42:56 +00:00
dholland 0f960348b2 Pass -Wstrict-overflow, and while here, don't read from index -1 of
an array.
2012-10-13 20:36:06 +00:00
dholland 8bde1deef1 Factor out some common code; pass -Wstrict-overflow. 2012-10-13 20:12:18 +00:00
dholland e31613d908 Pass -Wstrict-overflow. 2012-10-13 19:58:53 +00:00
dholland 44d9434e65 Move scratch variables of main to main, instead of having them be
file-static.
2012-10-13 19:44:36 +00:00
dholland 396c97ad03 Add strategic assertion, now passes -Wstrict-overflow. 2012-10-13 19:39:57 +00:00
dholland bc604cfe52 Remove ifdefs for V7 (as opposed to older) unix. 2012-10-13 19:25:22 +00:00
dholland 4105daf3e6 Pass the move info around instead of using it as a global. 2012-10-13 19:19:38 +00:00
dholland 8733c61f2c Crack down on global variables with single-letter names. 2012-10-13 18:44:14 +00:00
dholland 24462a68ab fix previous, thanks asau@ 2012-10-12 15:41:10 +00:00
dholland 317c009481 Don't use ++ to set flags to true. Now passes -Wstrict-overflow. 2012-10-12 10:44:20 +00:00
dholland 6dd1299b8b Pass -Wstrict-overflow. 2012-10-12 10:38:53 +00:00
christos b64afd2168 if 0 is used for the dimensions, compute the maximum size. 2012-10-06 19:39:51 +00:00
wiz 620c663aea Bump date for previous. 2012-10-03 19:50:43 +00:00
wiz 4f7e551cb8 - improve wording and overall program description (notably for `-f');
- improve macro usage;
- bump date.

From Bug Hunting.
2012-10-03 19:50:11 +00:00
wiz a04ce0cefc - correct `usage' message;
- improve wording.

From Bug Hunting.
2012-10-03 19:50:06 +00:00
riastradh 334a028dd6 Add a remarkably percipient fortune cookie. 2012-10-03 19:41:46 +00:00
riastradh 2a2bf69386 Fix formatting of Churchill quote on declarations of war. 2012-10-03 19:04:55 +00:00
wiz fb9125d78a - improve wording
- sort option list
- add argument names in option list and descriptions and adjust table width
- improve punctuation
- bump date

From Bug Hunting.
2012-08-12 17:30:03 +00:00
jdf 711e13238a src/games/fortune/fortune/fortune.6:
* reference strfile(8) in `SEE ALSO' section.

src/games/fortune/strfile/strfile.8:
 * remove redundant argument to (successive) `.Nm' macros.

src/games/fortune/datfiles/fortunes2:
 * remove (the least complete variant of a) double fortune.

Patch submitted by Bug Hunting.
2012-08-04 22:29:58 +00:00
dholland 277bd0756c WARNS=5, and make WARNS=5 the default for src/games. 2012-06-19 05:46:08 +00:00
dholland ccbf74de27 WARNS=5 2012-06-19 05:45:00 +00:00
dholland c34afa686b WARNS=5 2012-06-19 05:30:43 +00:00
dholland 16c47bfce7 Typo. Reported by I-forget-who-but-they'd-probably-rather-not-be-credited,
during the -6 freeze, and then forgotten until now.
2012-06-19 04:59:19 +00:00
joerg 403de81b16 Remove unused fields 2012-06-15 10:51:25 +00:00
njoly f273b2e5cb Consistently use major/minor for NetBSD version. 2012-06-09 23:15:13 +00:00
martin 4988efdfdc Add missing terminfo 2012-06-09 09:22:21 +00:00
christos c7a09b1276 rcsid, warns 2012-06-06 00:34:32 +00:00
wiz aa7b8d55e1 Sort sections; remove trailing whitespace. 2012-06-06 00:28:02 +00:00
christos 1a812b26a7 add colorbars 2012-06-06 00:16:01 +00:00
christos 5f2f756c3f new colorbars program from Nathanial Sloss 2012-06-06 00:13:36 +00:00
riastradh 6ebd147b51 Attribute the `Consequences, Schmonsequences...' quote to Daffy Duck. 2012-06-05 19:35:44 +00:00
christos 5deb5aa698 use modern shell constructs 2012-04-26 03:16:13 +00:00
jschauma f25e87abc8 allow multiple '-f acronyms' arguments to be given, which makes this behave
more consistently with ACRONYMSDB, which may also point to multiple files
2012-04-26 01:55:14 +00:00
roy 258cf0abec Add capfile(5) to describe the termcap format.
Adjust various man pages and other documentation to point to capfile(5)
instead of termcap(5).
Remove getcap(3) as curses hasn't been building it for a long time.
Punt wrterm.c as tset no longer uses it.
2012-04-21 12:27:24 +00:00
joerg 202d44a492 Fix various format string mismatches. 2012-02-29 23:39:53 +00:00
wiz a19484822f Man page and usage cleanups from Bug Hunting in PR 46103. 2012-02-26 21:06:59 +00:00
matt 29f82ac3aa Fix conflicting variable definitions 2012-02-18 06:57:23 +00:00
christos 7f5fd4a5cd PR/45842: Henning Petersen: compare fgets with NULL not 0 2012-01-16 17:38:16 +00:00
dholland 8879f685e9 grumble. 2012-01-08 18:17:41 +00:00
dholland 158b740733 Oops, I forgot to actually implement the checksumming code for the new
savefile format, so any savefiles generated yesterday can be tampered
with. Oh well. While here, tidy up the crc code.
2012-01-08 18:16:00 +00:00
dholland c99eaa0a43 Redo save file handling. The old save files were unportable, had no
magic number or versioning, relied on random(3) never changing to a
different implementation, and were also saving pointers to disk and
reading them back again. It *looks* as if the pointers thus loaded
were reset before being used, but it's not particularly clear as the
main loop of this thing is goto-based FORTRAN translated lightly to C.
I've changed the logic to null these pointers instead of saving and
loading them, and things seem to still work.

The new save files have a header, support versioning, write only sized
types in network byte order, and for the toy encryption to discourage
cheating do something self-contained instead of using random(3) as a
stream cipher.

Because between the original import from 4.4 until earlier today
trying to save would result in SIGSEGV on most platforms, it's
unlikely anyone has a save file, but just in case (since the pointer
issue appears to be nonlethal) I've kept compat code for old save
files.
2012-01-07 22:23:16 +00:00
dholland f08dd5ca74 Make this not crash on machines that are (a) 64 bit, or (b) have signed
chars by default (i.e., almost all machines). Makes it possible to save
the game. This has been broken since 4.4 and probably ever since the
FORTRAN -> C translation.

Crash reported by Petri Laakso in private mail.
2012-01-07 18:08:35 +00:00
jakllsch 2ee946b266 Per [1] the speed of light in a vaccum is exactly 299792458 m/s.
Per [2] a furlong is 220 yards and a yard is exactly 0.9144 m.
Per [3] a fortnight is 14 days.

As I didn't find a good authority for what definition of a day a fortnight is
measured in, I'll assume here a day is 86400 SI seconds.

Thus, the speed of light in a vaccum is approximately
1.80*10^12 furlongs per fortnight.

1.80*10^12 = 299792458*86400*14/(220*0.9144)

[1]	Resolution 1 of the 17th meeting of the CGPM (1983)
	http://www.bipm.org/en/CGPM/db/17/1/
[2]	Weights and Measures Act 1985
	http://www.legislation.gov.uk/ukpga/1985/72
[3]	The Concise Oxford Dictionary, 5th Edition, 1964, p. 480
2011-12-06 19:41:03 +00:00
ahoka c509c6317e handle EOF in input 2011-12-01 07:05:52 +00:00
jnemeth be8bba3314 grammar fix 2011-11-19 20:44:58 +00:00
drochner 7621b801a7 remove duplicated #defines (in a usually unused part of the code) 2011-11-09 20:17:44 +00:00
roy 4060cbcd0c Use tiparm instead of vtparm. 2011-10-03 12:32:15 +00:00
plunky acae68523e reinstate NULL cast by request, where the NULL was being passed as a vararg 2011-09-01 07:18:50 +00:00
plunky 9f61b80465 NULL does not need a cast 2011-08-31 16:24:54 +00:00
jakllsch 2ed951176c No need to cast double to ubig (aka uintmax_t) through int.
This change prevents a modulo by zero in a invocation such as:
primes 18446744073709551000 18446744073709551615
on a LP64 machine.
2011-08-30 02:58:04 +00:00
joerg 4511a017c1 Use __dead 2011-08-29 20:30:36 +00:00
joerg 17834822b6 Mark error() as dead, so that validation for setclipped works correctly. 2011-08-27 23:42:33 +00:00
tron d504399e17 Avoid non-literal format strings. 2011-08-26 09:01:07 +00:00
dholland ae56ae8f3f Use __dead and __printflike instead of __attribute__. 2011-08-26 06:18:16 +00:00
christos df7b0db034 add printf attributes. 2011-08-25 16:18:28 +00:00
joerg 6e9533bc30 Uses non-literal format strings 2011-08-25 15:50:45 +00:00
plunky e2bd4b0723 -Wno-shadow is no longer needed for HAVE_PCC, here 2011-08-24 17:39:32 +00:00
christos a040843f47 use const char [] for format. 2011-08-21 08:50:08 +00:00
dholland 788ec3df53 Remove redundant set of prototypes for local functions, exposed by
previous.
2011-08-17 18:17:40 +00:00
dholland ec10c574c2 Move some things around so declarations appear in a reasonable order. 2011-08-17 18:16:51 +00:00
dholland 667d044909 Use __dead instead of __attribute__((__noreturn__)). 2011-08-16 19:53:03 +00:00
christos c3a5028162 document non-literal string formats 2011-08-16 11:28:18 +00:00
christos 459966a9ab avoid non-literal format string 2011-08-16 11:26:16 +00:00
christos 5129f378a4 eliminate/document non-literal format strings 2011-08-16 11:19:41 +00:00
christos 18f6b4214c eliminate non-literal format strings 2011-08-16 11:14:04 +00:00
christos aba0d26e70 avoid non-literal format strings. 2011-08-16 11:10:54 +00:00
christos 695bc7fff6 kill homebrew error functions 2011-08-16 11:06:34 +00:00
christos 69c818efb5 document non-literal format strings 2011-08-16 10:14:40 +00:00
christos 72db7ca912 - document non-literal format strings
- avoid strict aliasing violations, but adding an intermediate function.
2011-08-16 09:26:22 +00:00
dholland d5b021c7ed Fix up some lint. 2011-08-07 06:03:45 +00:00
dholland 2c0ecb1ab6 Fix up still more casts; use NULL instead of (char *)0. 2011-08-06 20:42:43 +00:00
dholland 8041af98f6 Remove *another* set of useless casts. sheesh 2011-08-06 20:32:25 +00:00
dholland 8e73b3ad76 Remove more silly casts. 2011-08-06 20:29:37 +00:00
dholland 5aa2a843dc drop private (and wrong) definition of NULL 2011-08-06 20:24:35 +00:00
dholland 434d266e91 Use the right type for the malloc wrapper function, and don't cast the
return value.

(XXX: Except for a pile of allocation macros that produce typed pointer
results; there the typechecking of the result assignment is more valuable
than the warning if the alloc function isn't declared properly. These
macros should go away.)
2011-08-06 20:18:26 +00:00
dholland 25ec296591 Remove silly casts. 2011-08-06 20:00:33 +00:00
dholland 842dc544ae <sys/wait.h> is standard, so just use it instead of fiddling about with
ifdefs for long-dead systems. While here, remove union wait.
2011-08-06 19:53:24 +00:00
dholland d30849d1cd abolish references to index/rindex 2011-08-06 19:47:54 +00:00
dholland 813e3e415d Remove the PYRAMID_BUG code. I don't think Pyramids are coming back, nor
do we care if their compiler vomits trying to decrement a bitfield.
2011-08-06 19:32:58 +00:00
dholland cbc660deee Don't refer to index() in comments; use strchr(). 2011-08-06 19:23:38 +00:00
dholland fcfbc606bf Include system headers before private headers. Avoids various possible
symbol conflicts.
2011-07-20 07:04:30 +00:00
mrg db6886e029 apply some -O0 with gcc 4.5 and vax. 2011-07-03 15:29:34 +00:00
mrg 3206e7e70e use DBL_MIN from <float.h> instead of a hard coded small value (that
becomes zero for vax fp.)
2011-07-03 06:44:01 +00:00
mrg 1a1e24f1e6 include sys/time.h earlier (rather than implicitly via fcntl.h) so that
the "u" variable doesn't shadow stuff, found later in time.h inlines.

kind of a hack, but i don't want to modify time.h either.

XXX: seems kind of annoying
2011-07-02 02:10:33 +00:00
mrg d060781d89 rename a variable from "time" to "stime" (it's a string) 2011-07-02 02:09:08 +00:00
mrg c111245a78 apply some -Wno-error and/or -fno-strict-aliasing.
all of this should be looked at closer, but some of them are not
very trivial.
2011-06-22 02:49:41 +00:00
joerg ab7b7d013a Use consistent sign in compare, the function is only called with
constants as third argument anyway.
2011-05-30 03:11:15 +00:00
joerg 108836d4ba Map RCSID to __RCSID 2011-05-23 23:06:41 +00:00
joerg 6047230580 ANSIfy 2011-05-23 23:03:38 +00:00
joerg 8f09f5ccbd Don't use variables as format string. 2011-05-23 23:02:07 +00:00
joerg 6dee362ea8 Kill some pointer indirections. Don't use variables as format strings. 2011-05-23 23:01:17 +00:00
joerg c112023e0a ANSIfy 2011-05-23 22:59:27 +00:00
joerg 1a5e0fc9be #if 0 some unused code. 2011-05-23 22:58:44 +00:00
joerg 7c549d998f Don't use variables as format string. 2011-05-23 22:56:11 +00:00
joerg 57c13365a3 Correctly print variables as strings, not as format string. 2011-05-23 22:53:25 +00:00
joerg cbd2e3d54f Properly print string. 2011-05-23 22:49:59 +00:00
joerg 76266ce815 Don't use variables as format strings. 2011-05-23 22:48:52 +00:00
joerg 278b576ff4 ANSIfy 2011-05-23 22:47:22 +00:00
joerg f3a51298e1 Don't use strings from arrays as format string. 2011-05-23 22:46:35 +00:00
joerg 2d6cc1dbb0 Don't use return value of a function as format string. 2011-05-23 22:44:18 +00:00
is 96c5ad97be Bug fix: in a game with 26 planes, the last one to be allocated wouldn't
be allocated if it was the only eligible one.
From Jonathan David Amery via Debian Bug report 214626.
2011-02-15 08:25:25 +00:00
dyoung da1712e7ee Fix spelling: it's *Jef* Raskin, not Jeff Raskin. 2011-01-24 15:30:54 +00:00
dholland 7ac7ba70d8 avoid unnecessary cast (hi wiz) 2011-01-05 15:52:20 +00:00
wiz e78e25aaf3 Fix fd leak in error cases. Found by cppcheck. 2011-01-05 15:48:00 +00:00
wiz f274b04232 Fix realloc error. Found by cppcheck. 2011-01-05 15:40:55 +00:00
joerg 5d8f0c3ff5 Don't use the same name for two parameters. 2010-12-08 17:08:07 +00:00
joerg 0dc972e776 Use __c99inline from sys/cdefs.h 2010-12-08 17:06:35 +00:00
pgoyette 6688046702 Fix a few of the games to use getprogname() in their usage() functions.
Suggested by Joerg.

XXX There are probably many more that have their progname hard-coded, but
XXX I'm not up for a wholesale roto-till at the moment.
2010-12-05 04:34:22 +00:00
pgoyette 1c22c7521b Since this game is installed as 'boggle', fix the usage() text to match. 2010-12-05 04:11:51 +00:00
pooka 71604335b9 add one i saw on irc today 2010-11-25 13:51:26 +00:00