]> git.cameronkatri.com Git - bsdgames-darwin.git/log
bsdgames-darwin.git
10 years agoReorg docs, part 1:
dholland [Sat, 5 Jul 2014 19:22:41 +0000 (19:22 +0000)]
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.

10 years agoRework /usr/share/doc.
dholland [Sat, 5 Jul 2014 19:22:02 +0000 (19:22 +0000)]
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.

10 years agoremove remaining makefile support for GCC < 45 that i found.
mrg [Sat, 14 Jun 2014 20:49:36 +0000 (20:49 +0000)]
remove remaining makefile support for GCC < 45 that i found.

10 years agoAdd a little color. In order to minimize logic differences, keep 0 as the
christos [Wed, 11 Jun 2014 16:47:39 +0000 (16:47 +0000)]
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.

10 years agoRemove unused.
skrll [Sun, 30 Mar 2014 09:11:50 +0000 (09:11 +0000)]
Remove unused.

10 years agoUse bool (not int) for a boolean return type.
dholland [Sun, 30 Mar 2014 05:53:12 +0000 (05:53 +0000)]
Use bool (not int) for a boolean return type.

10 years agoUse the curses beep function instead of writing a beep to stdout.
dholland [Sun, 30 Mar 2014 05:48:35 +0000 (05:48 +0000)]
Use the curses beep function instead of writing a beep to stdout.

10 years agocurses has printw, use it.
dholland [Sun, 30 Mar 2014 05:46:54 +0000 (05:46 +0000)]
curses has printw, use it.

10 years agodon't use the preprocessor to rename curses functions, just call them
dholland [Sun, 30 Mar 2014 05:44:55 +0000 (05:44 +0000)]
don't use the preprocessor to rename curses functions, just call them

10 years agofix off-by-one
dholland [Sun, 30 Mar 2014 05:41:50 +0000 (05:41 +0000)]
fix off-by-one

10 years agoInstead of #define STDIN 0, use STDIN_FILENO.
dholland [Sun, 30 Mar 2014 05:38:13 +0000 (05:38 +0000)]
Instead of #define STDIN 0, use STDIN_FILENO.

10 years agoRemove SHORTLEN and LONGLEN defines; use sizeof() properly instead.
dholland [Sun, 30 Mar 2014 05:30:28 +0000 (05:30 +0000)]
Remove SHORTLEN and LONGLEN defines; use sizeof() properly instead.
Fix two semi-compensating size bugs in wire transmission affecting
64-bit machines.

10 years agoNaming reform for socket pieces, akin to what I did in huntd earlier.
dholland [Sun, 30 Mar 2014 05:14:47 +0000 (05:14 +0000)]
Naming reform for socket pieces, akin to what I did in huntd earlier.
(but not as comprehensive)

10 years agoI wish the socket API didn't require casts. Easy to mess them up.
dholland [Sun, 30 Mar 2014 04:57:37 +0000 (04:57 +0000)]
I wish the socket API didn't require casts. Easy to mess them up.

10 years agofix obvious mistake (seems to have been there since 4.4)
dholland [Sun, 30 Mar 2014 04:40:50 +0000 (04:40 +0000)]
fix obvious mistake (seems to have been there since 4.4)

10 years agoTidy up list of broadcast addresses.
dholland [Sun, 30 Mar 2014 04:39:40 +0000 (04:39 +0000)]
Tidy up list of broadcast addresses.

10 years agoClean up the handling of the list of hunt daemons.
dholland [Sun, 30 Mar 2014 04:31:21 +0000 (04:31 +0000)]
Clean up the handling of the list of hunt daemons.

10 years agouse fewer globals
dholland [Sun, 30 Mar 2014 03:35:26 +0000 (03:35 +0000)]
use fewer globals

10 years agomore cleanup
dholland [Sun, 30 Mar 2014 03:26:19 +0000 (03:26 +0000)]
more cleanup

10 years agounexpose some globals that server.c previously required
dholland [Sun, 30 Mar 2014 02:58:25 +0000 (02:58 +0000)]
unexpose some globals that server.c previously required

10 years agoname reform, fewer file statics
dholland [Sun, 30 Mar 2014 02:53:11 +0000 (02:53 +0000)]
name reform, fewer file statics

10 years agogoto considered harmful
dholland [Sun, 30 Mar 2014 02:46:57 +0000 (02:46 +0000)]
goto considered harmful

10 years agosplit off a bunch of the nastier network code into its own file
dholland [Sun, 30 Mar 2014 02:26:09 +0000 (02:26 +0000)]
split off a bunch of the nastier network code into its own file

10 years agoWhen indexing an array with a char, cast it to unsigned char, not int,
dholland [Sun, 30 Mar 2014 02:11:25 +0000 (02:11 +0000)]
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.

10 years agoRemove all the conditional compilation for INTERNET. Now you can run
dholland [Sun, 30 Mar 2014 01:44:37 +0000 (01:44 +0000)]
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.

10 years agoClean up the names of the various pieces of socket apparatus.
dholland [Sun, 30 Mar 2014 00:26:58 +0000 (00:26 +0000)]
Clean up the names of the various pieces of socket apparatus.
Systematic naming is easier to follow...

10 years agofix non-INTERNET build
dholland [Sat, 29 Mar 2014 23:44:38 +0000 (23:44 +0000)]
fix non-INTERNET build

10 years agoEr oops, fix previous.
dholland [Sat, 29 Mar 2014 22:30:27 +0000 (22:30 +0000)]
Er oops, fix previous.

10 years agoReduce ifdefs by making a common function to talk to either syslogd or
dholland [Sat, 29 Mar 2014 22:29:55 +0000 (22:29 +0000)]
Reduce ifdefs by making a common function to talk to either syslogd or
stderr.

10 years agogroup external functions by where they come from
dholland [Sat, 29 Mar 2014 22:15:26 +0000 (22:15 +0000)]
group external functions by where they come from

10 years agobe consistent about whether functions are static
dholland [Sat, 29 Mar 2014 22:15:13 +0000 (22:15 +0000)]
be consistent about whether functions are static

10 years agohandle compiled-in pathnames the customary way
dholland [Sat, 29 Mar 2014 22:11:19 +0000 (22:11 +0000)]
handle compiled-in pathnames the customary way

10 years agomake some globals static
dholland [Sat, 29 Mar 2014 22:05:44 +0000 (22:05 +0000)]
make some globals static

10 years agoAdditional minor cleanup and remove a straggler data declaration
dholland [Sat, 29 Mar 2014 21:55:59 +0000 (21:55 +0000)]
Additional minor cleanup and remove a straggler data declaration
from hunt_common.h.

10 years agoGroup function declarations by which source file they come from, and
dholland [Sat, 29 Mar 2014 21:43:46 +0000 (21:43 +0000)]
Group function declarations by which source file they come from, and
delete several that don't actually exist.

10 years agobe consistent about whether functions are static
dholland [Sat, 29 Mar 2014 21:38:54 +0000 (21:38 +0000)]
be consistent about whether functions are static

10 years agosprinkle static
dholland [Sat, 29 Mar 2014 21:33:41 +0000 (21:33 +0000)]
sprinkle static

10 years agoFlush unwanted file.
dholland [Sat, 29 Mar 2014 21:27:40 +0000 (21:27 +0000)]
Flush unwanted file.

10 years agoMove definitions to the file they're used in.
dholland [Sat, 29 Mar 2014 21:27:08 +0000 (21:27 +0000)]
Move definitions to the file they're used in.

10 years agomove a comment that should have gone with its symbol
dholland [Sat, 29 Mar 2014 21:25:35 +0000 (21:25 +0000)]
move a comment that should have gone with its symbol

10 years agoRemove tautological #if DEBUG.
dholland [Sat, 29 Mar 2014 21:24:56 +0000 (21:24 +0000)]
Remove tautological #if DEBUG.

10 years agoSplit hunt and huntd's includes, instead of incestuously sharing a pile
dholland [Sat, 29 Mar 2014 21:24:26 +0000 (21:24 +0000)]
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.

10 years agoRemove unsafe and unnecessary pointer casts.
dholland [Sat, 29 Mar 2014 20:53:55 +0000 (20:53 +0000)]
Remove unsafe and unnecessary pointer casts.

10 years agocatch up to huntd changes.
dholland [Sat, 29 Mar 2014 20:52:13 +0000 (20:52 +0000)]
catch up to huntd changes.
XXX: this needs to stop promiscuously sharing .h files.

10 years agotsort contents of file
dholland [Sat, 29 Mar 2014 20:44:20 +0000 (20:44 +0000)]
tsort contents of file

10 years agoconst in unused code
dholland [Sat, 29 Mar 2014 20:41:57 +0000 (20:41 +0000)]
const in unused code

10 years agoremove stubbed-out function
dholland [Sat, 29 Mar 2014 20:35:30 +0000 (20:35 +0000)]
remove stubbed-out function

10 years agoRip out the code that broadcasts talk requests to the local
dholland [Sat, 29 Mar 2014 20:32:04 +0000 (20:32 +0000)]
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.

10 years agoRemove empty header file.
dholland [Sat, 29 Mar 2014 20:16:09 +0000 (20:16 +0000)]
Remove empty header file.

10 years agoUse setproctitle() instead of handrolled version.
dholland [Sat, 29 Mar 2014 20:12:12 +0000 (20:12 +0000)]
Use setproctitle() instead of handrolled version.

10 years agoMake the code for issuing talk requests to find players actually build.
dholland [Sat, 29 Mar 2014 20:10:10 +0000 (20:10 +0000)]
Make the code for issuing talk requests to find players actually build.

10 years agodon't declare own boolean type
dholland [Sat, 29 Mar 2014 19:41:10 +0000 (19:41 +0000)]
don't declare own boolean type

10 years agouse random(), not a handrolled 16-bit generator
dholland [Sat, 29 Mar 2014 19:33:03 +0000 (19:33 +0000)]
use random(), not a handrolled 16-bit generator

10 years agoUse getaddrinfo() instead of gethostbyname().
dholland [Sat, 29 Mar 2014 19:26:28 +0000 (19:26 +0000)]
Use getaddrinfo() instead of gethostbyname().

10 years agotypo in error message
dholland [Sat, 29 Mar 2014 19:03:21 +0000 (19:03 +0000)]
typo in error message

10 years agoconst
dholland [Sat, 29 Mar 2014 19:02:12 +0000 (19:02 +0000)]
const

10 years agosimplify silly logic
dholland [Sat, 29 Mar 2014 19:01:00 +0000 (19:01 +0000)]
simplify silly logic

10 years agotemp is a pointer, and tempmax, not sizeof(temp), is the length of
apb [Fri, 28 Mar 2014 17:53:47 +0000 (17:53 +0000)]
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.

10 years agoIf you are going to use memcpy instead of struct assignment, then at
apb [Fri, 28 Mar 2014 17:49:11 +0000 (17:49 +0000)]
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.

10 years agoAdd note cautioning against bothering with WARNS=6 until gcc improves
dholland [Sun, 23 Mar 2014 00:17:40 +0000 (00:17 +0000)]
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;
                      ^

10 years agofix signedness issue
dholland [Sun, 23 Mar 2014 00:07:15 +0000 (00:07 +0000)]
fix signedness issue

10 years agogratuitous (but not harmful) changes to pass gcc48's -Wconversion
dholland [Sun, 23 Mar 2014 00:03:04 +0000 (00:03 +0000)]
gratuitous (but not harmful) changes to pass gcc48's -Wconversion

10 years agoUse ssize_t for read() results. Don't use int for lseek() results.
dholland [Sat, 22 Mar 2014 23:47:03 +0000 (23:47 +0000)]
Use ssize_t for read() results. Don't use int for lseek() results.
Call srandom() with time(), not getpid().

10 years agoUse ssize_t for read() results. Don't use int for lseek() results.
dholland [Sat, 22 Mar 2014 23:45:34 +0000 (23:45 +0000)]
Use ssize_t for read() results. Don't use int for lseek() results.

10 years agoUse uid_t to hold getuid() results, and don't check getuid for failure
dholland [Sat, 22 Mar 2014 23:42:48 +0000 (23:42 +0000)]
Use uid_t to hold getuid() results, and don't check getuid for failure
as it isn't allowed to fail.

10 years agouse size_t instead of int for a length
dholland [Sat, 22 Mar 2014 23:39:04 +0000 (23:39 +0000)]
use size_t instead of int for a length

10 years agoUse random(), not rand().
dholland [Sat, 22 Mar 2014 23:33:33 +0000 (23:33 +0000)]
Use random(), not rand().

10 years agoavoid unnecessary floating point ops
dholland [Sat, 22 Mar 2014 23:31:28 +0000 (23:31 +0000)]
avoid unnecessary floating point ops

10 years agoavoid signed left-shift
dholland [Sat, 22 Mar 2014 23:23:55 +0000 (23:23 +0000)]
avoid signed left-shift

10 years agoUse CHAR_BIT, not 8.
dholland [Sat, 22 Mar 2014 23:16:21 +0000 (23:16 +0000)]
Use CHAR_BIT, not 8.

10 years agodon't declare ospeed; it's in <termcap.h>
dholland [Sat, 22 Mar 2014 23:10:36 +0000 (23:10 +0000)]
don't declare ospeed; it's in <termcap.h>

10 years agoMake the list of place types an enumeration. Use unsigned values for
dholland [Sat, 22 Mar 2014 22:58:56 +0000 (22:58 +0000)]
Make the list of place types an enumeration. Use unsigned values for
place numbers.

10 years agouse a more suitable type
dholland [Sat, 22 Mar 2014 22:47:07 +0000 (22:47 +0000)]
use a more suitable type

10 years agouse more suitable types
dholland [Sat, 22 Mar 2014 22:45:05 +0000 (22:45 +0000)]
use more suitable types

10 years agowoops, more of previous.
dholland [Sat, 22 Mar 2014 22:33:35 +0000 (22:33 +0000)]
woops, more of previous.

10 years agoMake some things unsigned that should be (why would we need e.g. a
dholland [Sat, 22 Mar 2014 22:24:21 +0000 (22:24 +0000)]
Make some things unsigned that should be (why would we need e.g. a
negative number of airports?) and remove some related bogus casts.

10 years agoDon't cast the return value of malloc.
dholland [Sat, 22 Mar 2014 22:09:14 +0000 (22:09 +0000)]
Don't cast the return value of malloc.

10 years agoMinor tidyup.
dholland [Sat, 22 Mar 2014 22:04:40 +0000 (22:04 +0000)]
Minor tidyup.

10 years agotag decl() __noinline, as inlining it would defeat its purpose
dholland [Sat, 22 Mar 2014 20:07:05 +0000 (20:07 +0000)]
tag decl() __noinline, as inlining it would defeat its purpose
(which is to not have interesting string literals appear in the
compiled binary)

10 years agoRevert part of previous -r1.21 and fix the errno-handling bug instead.
dholland [Sat, 22 Mar 2014 19:05:30 +0000 (19:05 +0000)]
Revert part of previous -r1.21 and fix the errno-handling bug instead.

10 years agomove extern decls to .h files
dholland [Sat, 22 Mar 2014 18:58:57 +0000 (18:58 +0000)]
move extern decls to .h files

10 years agoMerge riastradh-drm2 to HEAD.
riastradh [Tue, 18 Mar 2014 18:20:35 +0000 (18:20 +0000)]
Merge riastradh-drm2 to HEAD.

10 years agofix typo, from Henning Petersen in PR misc/48613
dholland [Sat, 22 Feb 2014 17:21:19 +0000 (17:21 +0000)]
fix typo, from Henning Petersen in PR misc/48613

11 years agoremove duplicate
dholland [Wed, 11 Dec 2013 14:59:47 +0000 (14:59 +0000)]
remove duplicate

11 years agoanother minor fix
dholland [Wed, 11 Dec 2013 14:56:10 +0000 (14:56 +0000)]
another minor fix

11 years agoReinstate typo since kre claims it's by purpose.
wiz [Wed, 11 Dec 2013 11:52:27 +0000 (11:52 +0000)]
Reinstate typo since kre claims it's by purpose.
Discussion in PR 48442.

11 years agoError and typo fixes from OpenBSD and FreeBSD via Henning Petersen
wiz [Wed, 11 Dec 2013 11:33:49 +0000 (11:33 +0000)]
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.

11 years agoError and typo fixes from OpenBSD and FreeBSD via Henning Petersen
wiz [Wed, 11 Dec 2013 11:24:56 +0000 (11:24 +0000)]
Error and typo fixes from OpenBSD and FreeBSD via Henning Petersen
in PR 48442.

11 years agoWARNS=5
dholland [Sat, 7 Dec 2013 02:24:12 +0000 (02:24 +0000)]
WARNS=5

11 years agohals_end(6) outputs the last words of the supercomputer HAL 9000 aboard
mbalmer [Tue, 12 Nov 2013 17:46:20 +0000 (17:46 +0000)]
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.

11 years agofix unused variable warnings
christos [Sat, 19 Oct 2013 17:19:30 +0000 (17:19 +0000)]
fix unused variable warnings

11 years agoUntabify the header definition to avoid misaligned comment on
uwe [Thu, 19 Sep 2013 00:58:11 +0000 (00:58 +0000)]
Untabify the header definition to avoid misaligned comment on
str_delim in PostScript output.

11 years agoUse .Fa instead of .Ar to refer to header fields.
uwe [Thu, 19 Sep 2013 00:53:55 +0000 (00:53 +0000)]
Use .Fa instead of .Ar to refer to header fields.

11 years agoNow that we use "nbtool_config.h" we can use __dead again and drop
uwe [Thu, 19 Sep 2013 00:34:00 +0000 (00:34 +0000)]
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.

11 years agoDon't define TRUE/FALSE, which may conflict with host headers.
uwe [Thu, 19 Sep 2013 00:18:52 +0000 (00:18 +0000)]
Don't define TRUE/FALSE, which may conflict with host headers.
TRUE is unused anyway.  Replace all instances of FALSE with 0.

11 years ago#include "nbtool_config.h" to pull in getprogname() declaration.
uwe [Wed, 18 Sep 2013 23:18:14 +0000 (23:18 +0000)]
#include "nbtool_config.h" to pull in getprogname() declaration.

11 years agoGC descr and helpm.
joerg [Fri, 13 Sep 2013 20:46:50 +0000 (20:46 +0000)]
GC descr and helpm.

11 years agohook cgram to the build
dholland [Sun, 1 Sep 2013 18:37:06 +0000 (18:37 +0000)]
hook cgram to the build

11 years agoWARNS=5
dholland [Sun, 11 Aug 2013 03:44:27 +0000 (03:44 +0000)]
WARNS=5

11 years agotypo in comment
dholland [Sun, 11 Aug 2013 03:34:48 +0000 (03:34 +0000)]
typo in comment