Commit Graph

100 Commits

Author SHA1 Message Date
dholland c34afa686b WARNS=5 2012-06-19 05:30:43 +00:00
matt 29f82ac3aa Fix conflicting variable definitions 2012-02-18 06:57:23 +00:00
roy 4060cbcd0c Use tiparm instead of vtparm. 2011-10-03 12:32:15 +00:00
joerg 4511a017c1 Use __dead 2011-08-29 20:30:36 +00:00
dholland ae56ae8f3f Use __dead and __printflike instead of __attribute__. 2011-08-26 06:18:16 +00:00
christos 5129f378a4 eliminate/document non-literal format strings 2011-08-16 11:19:41 +00:00
dholland 6763d40772 Document the options that actually exist, instead of some other
completely unrelated set. Bump date. (first time since 1993!)
2010-04-24 01:13:37 +00:00
dholland de82ffd7cb Handle the "diedtime" field of the player log (which is not the high
scores file, the append-only log of all games) as int32_t instead of
time_t. Log files from before the 64-bit time_t change can now be read
again; however, log files from the last year of -current are hosed.
All none of you who play larn, take note...
2010-04-24 00:56:14 +00:00
christos 99b1f1b15a ctime can return NULL. 2010-04-02 21:40:00 +00:00
roy 98eb889579 Userland now builds and uses terminfo instead of termcap.
OK: core@, jdc@
2010-02-03 15:34:37 +00:00
snj 550147bd6a Remove 3rd and 4th clauses in christos' license. OK christos. 2009-10-21 01:07:44 +00:00
dholland f2a20f5fe4 sprinkle static 2009-08-12 08:04:05 +00:00
joerg 6ffb688fd8 Fix list markup. Use .Ic for key as suggested by wiz. 2009-03-11 16:37:06 +00:00
gmcgarry 81f725f1e0 Both legs of the conditional operator must return the same type. 2008-08-29 00:37:38 +00:00
dholland 591ca18c53 Split some code from moreobj.c into action.c, as per larn 12.2. 2008-02-19 06:05:26 +00:00
dholland f5334b0815 More assorted cleanup merged from larn 12.2. 2008-02-04 01:07:01 +00:00
dholland c310e89d2d Once upon a time, larn 12.0 had functions named getchar() and putchar()
that conflicted with libc. We changed them to lgetchar() and xputchar()
respectively; larn 12.2 changed them to ttgetch() and ttputch(). After
reflecting on this for a while I've decided to adopt the larn 12.2
names; not so much for compatibility but for consistency going forward.
So, massrename them. Also make ttputch() static.
2008-02-03 21:24:58 +00:00
dholland e87aa9031c Don't create files mode 666 in /var. (The code in question is not enabled
by default, though.)
2008-02-03 20:41:53 +00:00
dholland 5c10491064 Larn does not need its own private versions of functions from <ctype.h>.
Also, remove the function gettokstr(), which is not used. From larn 12.2.
2008-02-03 20:11:04 +00:00
dholland b6e0b3d3c9 A long time ago, larn had code to prohibit playing it during work hours.
Most of this code was removed ages ago, probably when dm(6) was invented;
long before -r1.1 in the NetBSD tree in any event.

Now remove the last fragment of it.

Also nuke the file of US holidays 1987-1993 that we've been carrying
around for no reason.
2008-02-03 20:01:24 +00:00
dholland ef066a156b Some assorted minor cleanups, from larn 12.2. 2008-02-03 19:29:50 +00:00
dholland d7ba3de791 Make a bunch of functions static. Merged from larn 12.2. 2008-02-03 19:20:40 +00:00
dholland ded3829627 Use mkstemp to make the temporary files used when you win. 2008-02-03 03:49:15 +00:00
dholland 511d1e002c Since games are (now) setgid, not setuid, it is no longer necessary to
manipulate the effective uid, only the effective gid.
2008-02-03 03:45:55 +00:00
dholland 398690b6f4 Call srandom() as well as initializing the private random generator
(which is crappy and should be removed, but that's for another day...)
This way e.g. fortune cookies no longer appear always in the same order.
2008-01-28 05:48:57 +00:00
dholland 9cc7e27481 Larn now builds with WARNS=4. 2008-01-28 05:38:53 +00:00
dholland 3d81345939 Apparently the reason the printf arguments were all wrong is that larn
had its own private and not-quite-standard implementation of printf.
Remove it surgically with a chainsaw.
2008-01-28 04:04:17 +00:00
dholland 8ce4d17196 Add gcc printf format checking, and fix the abundant problems this revealed.
(It appears that someone sometime thought that you use %d to print a long.)
2008-01-28 03:39:30 +00:00
mouse 2609539fc5 Per PR 36185, OKed by martin@ 2007-04-22 02:09:02 +00:00
wiz 09cb1d6f1c s/existance/existence/, from Zafer. 2006-11-24 22:52:16 +00:00
mrg aadd7d4847 sprinkle some -fno-strict-aliasing and -Wno-pointer-sign with GCC4. 2006-05-11 23:16:28 +00:00
mrg 524d5f27c4 lrint() -> larn_lrint(). 2006-05-11 10:23:24 +00:00
mrg 4bc6feceb6 end the argument list to exec*(3) with a NULL instead of a bare '0', as
the latter isn't a pointer context in these varargs functions.
2006-05-11 00:22:52 +00:00
snj bf5ceaae16 It's "its." 2006-04-24 18:00:53 +00:00
christos 0e8c6c24b2 Coverity CID 2073: Fix memory leak. 2006-03-19 00:37:15 +00:00
christos 0255deb434 Coverity CID 999: Prevent NULL deref. 2006-03-19 00:32:18 +00:00
wiz d9f5a9df01 Use standard AUTHORS section header. From YOMURA Masanori in private mail
Sort sections if necessary. Use more/better markup.
2005-09-15 02:09:41 +00:00
simonb 1d351ebc53 Remove a incorrect semicolon at the end of an if().
Magic levels now appear after extensive play testing!
2005-02-25 15:04:43 +00:00
perry 1a3bb884dc A preprocessor macro named "srand" was defined which seeded the random
number generator.

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

I've renamed "srand" to "seedrand" to eliminate the conflict.
2005-02-03 02:23:02 +00:00
wiz d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
jsm cb5fd8342e Remove uses of __P. 2004-01-27 20:30:28 +00:00
agc c5275d9ccd Don't redefine NULL 2003-10-21 07:26:39 +00:00
agc e5aeb4ea46 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22269, verified by myself.
2003-08-07 09:36:50 +00:00
wiz 43fd1b176d Sy Aq -> Aq Sy so both work. 2003-07-01 10:25:03 +00:00
wiz 990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
wiz c91d8d6b9b Lots of minor fixes resulting from reading these man pages in detail. 2002-09-26 18:31:58 +00:00
wiz 0d22e30cd0 New sentences begin on new lines.
Patch from Richard Elz, slightly improved by yours truly.
2002-09-26 16:12:39 +00:00
wiz 7fd8f3df3f __STDC__ is always defined on NetBSD. 2002-05-26 00:12:11 +00:00
ross dc5571b22e Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:21:55 +00:00
christos 1703d1eee6 Update to the new t_agetstr() API. 2001-11-02 18:27:00 +00:00