#
1.34 |
|
23-Oct-2021 |
mestre |
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@
|
Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
|
#
1.33 |
|
12-Sep-2016 |
tb |
If boardspec doesn't consist entirely of lower case letters, there will be out of bound accesses of arrays, leading to sefaults or bus errors. Verify that at most one boardspec with lower case letters is given, or error out.
ok millert
|
#
1.32 |
|
12-Sep-2016 |
otto |
fix init, from randy hartman; ok tb@
|
#
1.31 |
|
27-Aug-2016 |
guenther |
Pull in <time.h> for time() and perhaps other functions
ok deraadt@
|
Revision tags: OPENBSD_6_0_BASE
|
#
1.30 |
|
07-Mar-2016 |
mestre |
- General changes: - Remove -? from getopt(3) options, but still keep (or add) -h where applicable - Replace hardcoded program strings by getprogname(3)
- Specific changes: - atc(6): this used -? and -u for usage(), remove both from game and manpage - bcd(6): use __progname instead of getprogname(3), no need to include stdlib.h - hunt(6): replace fputs(3) by fprintf(3)
OK tb@ after his suggestions
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.29 |
|
10-Jan-2016 |
mestre |
Remove unnecessary headers
OK tb@
|
#
1.28 |
|
07-Jan-2016 |
tb |
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@
|
#
1.27 |
|
03-Jan-2016 |
mestre |
About 13 years ago when the idiom srandom(time()), and sometimes srandom(time()+getpid()), was changed by srandomdev(), but #include <time.h> lived up until this day so remove it.
Additionally, earlier than that, 18 years ago, random(6) was one of the first consumers of arc4random(3) family, and was pulling it from dev/rndvar.h but these days we pull it from stdlib.h, which is already done, so while here remove dev/rndvar.h also.
"seems comprehensive to me" deraadt@ and OK tb@
|
#
1.26 |
|
30-Nov-2015 |
tb |
pledge "stdio rpath tty" for boggle.
skip mkdict and mkindex for now, they aren't installed anyway.
|
#
1.25 |
|
24-Oct-2015 |
mmcc |
Cast islower()'s argument to unsigned char.
ok guenther@
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.24 |
|
04-Dec-2014 |
deraadt |
Stop people from cheating. Especially those that believe in FIPS, they are the worst. ok millert ingo tedu
|
#
1.23 |
|
11-Oct-2014 |
doug |
Userland reallocarray() audit.
Avoid potential integer overflow in the size argument of malloc() and realloc() by using reallocarray() to avoid unchecked multiplication.
ok deraadt@
|
Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
|
#
1.22 |
|
18-Aug-2013 |
guenther |
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@
|
Revision tags: OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
|
#
1.21 |
|
04-Mar-2012 |
fgsch |
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.
|
Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE
|
#
1.20 |
|
27-Oct-2009 |
deraadt |
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
|
Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
|
#
1.19 |
|
12-Aug-2008 |
mbalmer |
Fix a typo in a comment. From dawedawe@gmx.de.
|
Revision tags: OPENBSD_4_4_BASE
|
#
1.18 |
|
24-Mar-2008 |
millert |
remove dependency on recalloc()
|
#
1.17 |
|
20-Mar-2008 |
millert |
Make the bog code generic enough to handle arbitrary NxN grids and add cubes for 5x5 mode based on Boggle Deluxe (aka Big Boggle) as well as support for the "challenge cube" shipped with some versions of Boggle. Also Dynamically allocate record keeping structures so we can deal with large word lists and add a --More-- prompt for when there are too many wwords found by the computer to fit on the terminal. OK deraadt@
|
#
1.16 |
|
17-Mar-2008 |
sobrado |
synchronization between usage and synopsis; add some missing "usage:"'s
ok jmc@
|
Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
|
#
1.15 |
|
24-Dec-2006 |
martin |
fix program name in usage, use __progname
|
Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
|
#
1.14 |
|
10-Jul-2004 |
deraadt |
more ansi; khalek@linuxgamers.net
|
Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE
|
#
1.13 |
|
03-Jun-2003 |
millert |
Remove the advertising clause in the UCB license which Berkeley rescinded 22 July 1999. Proofed by myself and Theo.
|
#
1.12 |
|
07-Apr-2003 |
tdeval |
strlcpy -- ok tedu@, deraadt@, millert@
|
Revision tags: OPENBSD_3_3_BASE
|
#
1.11 |
|
06-Dec-2002 |
millert |
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
|
Revision tags: OPENBSD_3_2_BASE
|
#
1.10 |
|
31-May-2002 |
pjanzen |
de-register
|
#
1.9 |
|
31-May-2002 |
pjanzen |
No dm -> no need to revoke setegid.
|
Revision tags: OPENBSD_3_1_BASE
|
#
1.8 |
|
16-Feb-2002 |
millert |
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.
|
Revision tags: OPENBSD_3_0_BASE
|
#
1.7 |
|
03-Jun-2001 |
pjanzen |
make '++' work.
|
Revision tags: OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE
|
#
1.6 |
|
31-Jul-1999 |
pjanzen |
0 -> SEEK_SET; jsm28@cam.ac.uk.
|
Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE
|
#
1.5 |
|
24-Sep-1998 |
pjanzen |
NetBSD changes and a few obvious fixes
|
Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE
|
#
1.4 |
|
23-Jul-1997 |
kstailey |
tabify
|
Revision tags: OPENBSD_2_1_BASE
|
#
1.3 |
|
15-Jan-1997 |
millert |
getopt(3) returns -1 when out of args, not EOF, whee!
|
#
1.2 |
|
19-Dec-1996 |
deraadt |
setgid games, not setuid games. closes a neat set of holes
|
#
1.1 |
|
18-Oct-1995 |
deraadt |
branches: 1.1.1; Initial revision
|
Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
|
#
1.33 |
|
12-Sep-2016 |
tb |
If boardspec doesn't consist entirely of lower case letters, there will be out of bound accesses of arrays, leading to sefaults or bus errors. Verify that at most one boardspec with lower case letters is given, or error out.
ok millert
|
#
1.32 |
|
12-Sep-2016 |
otto |
fix init, from randy hartman; ok tb@
|
#
1.31 |
|
27-Aug-2016 |
guenther |
Pull in <time.h> for time() and perhaps other functions
ok deraadt@
|
Revision tags: OPENBSD_6_0_BASE
|
#
1.30 |
|
07-Mar-2016 |
mestre |
- General changes: - Remove -? from getopt(3) options, but still keep (or add) -h where applicable - Replace hardcoded program strings by getprogname(3)
- Specific changes: - atc(6): this used -? and -u for usage(), remove both from game and manpage - bcd(6): use __progname instead of getprogname(3), no need to include stdlib.h - hunt(6): replace fputs(3) by fprintf(3)
OK tb@ after his suggestions
|
Revision tags: OPENBSD_5_9_BASE
|
#
1.29 |
|
10-Jan-2016 |
mestre |
Remove unnecessary headers
OK tb@
|
#
1.28 |
|
07-Jan-2016 |
tb |
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@
|
#
1.27 |
|
03-Jan-2016 |
mestre |
About 13 years ago when the idiom srandom(time()), and sometimes srandom(time()+getpid()), was changed by srandomdev(), but #include <time.h> lived up until this day so remove it.
Additionally, earlier than that, 18 years ago, random(6) was one of the first consumers of arc4random(3) family, and was pulling it from dev/rndvar.h but these days we pull it from stdlib.h, which is already done, so while here remove dev/rndvar.h also.
"seems comprehensive to me" deraadt@ and OK tb@
|
#
1.26 |
|
30-Nov-2015 |
tb |
pledge "stdio rpath tty" for boggle.
skip mkdict and mkindex for now, they aren't installed anyway.
|
#
1.25 |
|
24-Oct-2015 |
mmcc |
Cast islower()'s argument to unsigned char.
ok guenther@
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
|
#
1.24 |
|
04-Dec-2014 |
deraadt |
Stop people from cheating. Especially those that believe in FIPS, they are the worst. ok millert ingo tedu
|
#
1.23 |
|
11-Oct-2014 |
doug |
Userland reallocarray() audit.
Avoid potential integer overflow in the size argument of malloc() and realloc() by using reallocarray() to avoid unchecked multiplication.
ok deraadt@
|
Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
|
#
1.22 |
|
18-Aug-2013 |
guenther |
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@
|
Revision tags: OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
|
#
1.21 |
|
04-Mar-2012 |
fgsch |
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.
|
Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE
|
#
1.20 |
|
27-Oct-2009 |
deraadt |
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
|
Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
|
#
1.19 |
|
12-Aug-2008 |
mbalmer |
Fix a typo in a comment. From dawedawe@gmx.de.
|
Revision tags: OPENBSD_4_4_BASE
|
#
1.18 |
|
24-Mar-2008 |
millert |
remove dependency on recalloc()
|
#
1.17 |
|
20-Mar-2008 |
millert |
Make the bog code generic enough to handle arbitrary NxN grids and add cubes for 5x5 mode based on Boggle Deluxe (aka Big Boggle) as well as support for the "challenge cube" shipped with some versions of Boggle. Also Dynamically allocate record keeping structures so we can deal with large word lists and add a --More-- prompt for when there are too many wwords found by the computer to fit on the terminal. OK deraadt@
|
#
1.16 |
|
17-Mar-2008 |
sobrado |
synchronization between usage and synopsis; add some missing "usage:"'s
ok jmc@
|
Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
|
#
1.15 |
|
24-Dec-2006 |
martin |
fix program name in usage, use __progname
|
Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
|
#
1.14 |
|
10-Jul-2004 |
deraadt |
more ansi; khalek@linuxgamers.net
|
Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE
|
#
1.13 |
|
03-Jun-2003 |
millert |
Remove the advertising clause in the UCB license which Berkeley rescinded 22 July 1999. Proofed by myself and Theo.
|
#
1.12 |
|
07-Apr-2003 |
tdeval |
strlcpy -- ok tedu@, deraadt@, millert@
|
Revision tags: OPENBSD_3_3_BASE
|
#
1.11 |
|
06-Dec-2002 |
millert |
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
|
Revision tags: OPENBSD_3_2_BASE
|
#
1.10 |
|
31-May-2002 |
pjanzen |
de-register
|
#
1.9 |
|
31-May-2002 |
pjanzen |
No dm -> no need to revoke setegid.
|
Revision tags: OPENBSD_3_1_BASE
|
#
1.8 |
|
16-Feb-2002 |
millert |
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.
|
Revision tags: OPENBSD_3_0_BASE
|
#
1.7 |
|
03-Jun-2001 |
pjanzen |
make '++' work.
|
Revision tags: OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE
|
#
1.6 |
|
31-Jul-1999 |
pjanzen |
0 -> SEEK_SET; jsm28@cam.ac.uk.
|
Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE
|
#
1.5 |
|
24-Sep-1998 |
pjanzen |
NetBSD changes and a few obvious fixes
|
Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE
|
#
1.4 |
|
23-Jul-1997 |
kstailey |
tabify
|
Revision tags: OPENBSD_2_1_BASE
|
#
1.3 |
|
15-Jan-1997 |
millert |
getopt(3) returns -1 when out of args, not EOF, whee!
|
#
1.2 |
|
19-Dec-1996 |
deraadt |
setgid games, not setuid games. closes a neat set of holes
|
#
1.1 |
|
18-Oct-1995 |
deraadt |
branches: 1.1.1; Initial revision
|