History log of /openbsd-src/games/worms/worms.c (Results 1 – 25 of 30)
Revision Date Author Comments
# bda84ce9 23-Oct-2021 mestre <mestre@openbsd.org>

if both stdout and stderr are redirected to a non-tty, pledge(2) will kill
ncurses applications, e.g.:

/usr/games/worms 2>&1 | cat

solve this by only calling pledge(2) after initscr(3) is set and d

if both stdout and stderr are redirected to a non-tty, pledge(2) will kill
ncurses applications, e.g.:

/usr/games/worms 2>&1 | cat

solve this by only calling pledge(2) after initscr(3) is set and done, or
whatever function that calls it. since pledge(2) is called later now the
promises might be reduced, but this a diff for another day.

found by naddy@ almost a year ago, discussed with him deraadt@ and tb@
ok tb@

show more ...


# 20ac8c99 06-Aug-2018 mestre <mestre@openbsd.org>

Drop "rpath" from pledge(2) after ncurses initialization.

Discussed with and OK tb@
OK cheloha@ on previous version


# c47f841b 05-Mar-2016 tb <tb@openbsd.org>

KNF: wrap three overly long lines. No binary change.


# 11b125a3 04-Mar-2016 mestre <mestre@openbsd.org>

- Convert atoi(3) to strtonum(3)
- Replace hardcoded program string by getprogname(3)
- Remove '?' from getopt(3)'s switch default case (but still keep 'h')

OK tb@ after his suggestions


# c3139318 27-Feb-2016 tb <tb@openbsd.org>

Untangle a mess of nested ternary operators.

ok mestre@


# 17641e31 07-Jan-2016 tb <tb@openbsd.org>

Some basic code maintenance in games/

- in main() replace exit with return
- drop some /* NOTREACHED */ lint comments along the way.
- make more use of standard CFLAGS, esp. -Wimplicit-function-decl

Some basic code maintenance in games/

- in main() replace exit with return
- drop some /* NOTREACHED */ lint comments along the way.
- make more use of standard CFLAGS, esp. -Wimplicit-function-declaration
- add and sort some headers when needed
- add straightforward pledges to some programs used at compile time

discussed with and ok mestre@

show more ...


# 2010f3c8 04-Jan-2016 mestre <mestre@openbsd.org>

More cleanup and sorting on header section

OK tb@ and he also pointed out that for consistency with rest of the tree we
should include termios.h instead of sys/ttydefaults.h, where applicable


# db911c47 21-Nov-2015 deraadt <deraadt@openbsd.org>

pledge the wyrms


# dff8a80e 18-Feb-2015 tedu <tedu@openbsd.org>

don't cast function arguments; use reallocarray in one place


# 66e49541 29-Aug-2013 naddy <naddy@openbsd.org>

replace srandomdev()+random() with the arc4random*() family
tweaks and ok millert@, ok deraadt@


# 73ea6815 25-Apr-2011 millert <millert@openbsd.org>

Fix "-d delay" option and convert to use strtonum()
OK martynas@ a while ago.


# 043fbe51 27-Oct-2009 deraadt <deraadt@openbsd.org>

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(th

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

show more ...


# 1ed98fdf 02-Sep-2007 deraadt <deraadt@openbsd.org>

use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg


# 3eb8c9ed 29-Nov-2004 jsg <jsg@openbsd.org>

ansi. ok deraadt@


# dcde2efe 08-Jan-2004 millert <millert@openbsd.org>

Adjust delay based on terminal speed; ok tedu@


# 7a09557b 03-Jun-2003 millert <millert@openbsd.org>

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


# ffe3e522 06-Dec-2002 millert <millert@openbsd.org>

Replace things like srandom(time(NULL)) with srandomdev(3). random(3)
good enough for games but we should at least use a decent seed.
pjanzen@ OK


# 97419aa0 31-May-2002 pjanzen <pjanzen@openbsd.org>

de-register


# ef2c807a 31-May-2002 pjanzen <pjanzen@openbsd.org>

No dm -> no need to revoke setegid.


# c72b5b24 16-Feb-2002 millert <millert@openbsd.org>

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be don

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.

show more ...


# 1c65590b 25-Jan-2000 pjanzen <pjanzen@openbsd.org>

use only non-deprecated curses (i.e., no termcap) and tidy a little; mostly
from jsm@netbsd.org


# bf592beb 29-Oct-1999 pjanzen <pjanzen@openbsd.org>

srandom() for variety.


# 1ed0e75d 19-Aug-1998 pjanzen <pjanzen@openbsd.org>

tags, formatting, ANSI-fication, prototypes, de-typos, and the occasional
initialization, removal of unused variable, or other minor fix. Most
changes are from or inspired by NetBSD.


# 76db234b 12-Mar-1998 pjanzen <pjanzen@openbsd.org>

OpenBSD ID (changed from NetBSD)


# 296f1046 14-Feb-1998 deraadt <deraadt@openbsd.org>

further fixes from pjanzen@foatdi.harvard.edu


12