History log of /openbsd-src/games/hack/hack.main.c (Results 1 – 25 of 26)
Revision Date Author Comments
# 25fdf802 06-Sep-2023 jsg <jsg@openbsd.org>

remove uneeded function decls
ok tb@


# 77f90040 03-Jun-2023 op <op@openbsd.org>

drop `uptodate()' check from hack(6)

hack(6) scrapes $PATH to find its executable and compare the mtime to
the save file and bone file. If the game is newer than those, they're
not loaded.

Drop th

drop `uptodate()' check from hack(6)

hack(6) scrapes $PATH to find its executable and compare the mtime to
the save file and bone file. If the game is newer than those, they're
not loaded.

Drop this feature. /usr/games is not in the default $PATH anymore, and
the format for those file didn't change since the import.

Diff from Anton Konyahin (me [at] konyahin [dot] xyz)

show more ...


# df69c215 28-Jun-2019 deraadt <deraadt@openbsd.org>

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

show more ...


# dc14b708 05-Apr-2019 bentley <bentley@openbsd.org>

Fix hack(6).

- Write savegames and scorefiles to the current directory instead of /var
- Save oc_name and oc_descr alongside oc_uname in all situations
- When a levitation potion times out, explicit

Fix hack(6).

- Write savegames and scorefiles to the current directory instead of /var
- Save oc_name and oc_descr alongside oc_uname in all situations
- When a levitation potion times out, explicitly float down

These patches were contributed last year by "tonypony76"; thanks!

ok deraadt@, with added enthusiasm from tedu@

show more ...


# 6acf840e 09-Jan-2016 mestre <mestre@openbsd.org>

Remove several casts to (char *) 0 and replace them by NULL

Prompted and OK by tb@


# aed906e4 09-Jan-2016 mestre <mestre@openbsd.org>

This diff is rather large, but it's just simply removing unnecessary headers
, remove some lint-style comments, add missing void to functions without args,
also some function prototypes (extern) were

This diff is rather large, but it's just simply removing unnecessary headers
, remove some lint-style comments, add missing void to functions without args,
also some function prototypes (extern) were missing their args, so I added them
as they were defined in hack.h

OK tb@ on separate diffs

show more ...


# 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 ...


# 466e81df 16-Dec-2015 tb <tb@openbsd.org>

Use __progname instead of hand-rolled parsing of argv[0].
Inspired by similar diffs by tobias@ and millert@.

"I like the concept" pjanzen@
ok tedu@


# 33206277 04-Nov-2015 tedu <tedu@openbsd.org>

replace setbuf with setvbuf, from Frederic Nowak


# 911134d2 27-Sep-2015 guenther <guenther@openbsd.org>

Annotate funcs with __attribute__((printf(...))) and clean up the fallout:
* lots of foo(str) --> foo("%s", str) transformations
* one totally insane foo(fmt, ap) --> vfoo(fmt, ap) conversion: how

Annotate funcs with __attribute__((printf(...))) and clean up the fallout:
* lots of foo(str) --> foo("%s", str) transformations
* one totally insane foo(fmt, ap) --> vfoo(fmt, ap) conversion: how did
this ever work?
* prefer const char[] over char* for static format strings, as it lets
gcc check the format and eliminates an unnecessary pointer

ok beck@

show more ...


# f84032ed 08-Dec-2014 deraadt <deraadt@openbsd.org>

For now, these games still contain deterministic randomization (for
save / replay modes of operation that have not yet been cleaned up).
OK, I've let the cat out of the bag, now some of you know you

For now, these games still contain deterministic randomization (for
save / replay modes of operation that have not yet been cleaned up).
OK, I've let the cat out of the bag, now some of you know you can cheat
at them..
ok millert guenther tedu

show more ...


# 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 ...


# f4878eba 01-May-2005 djm <djm@openbsd.org>

use setresgid() to drop privs, it is simply a better and less ambiguous API;
ok deraadt@ and millert@ a while ago, more to come


# 479daa62 06-Jul-2003 avsm <avsm@openbsd.org>

convert a bunch of strn{cpy,cat}->strl{cpy,cat}
pjanzen@ ok


# 4a5fbbc4 19-May-2003 pjanzen <pjanzen@openbsd.org>

De-register, ANSIfy, clean up.


# 846311fc 07-May-2003 tdeval <tdeval@openbsd.org>

Major strings rework. Ok pjanzen@


# 42ceebb3 06-Apr-2003 deraadt <deraadt@openbsd.org>

2451 lines of strdup/sprintf/strcpy whacking. mostly ok'd by pjanzen
already, but he may have later changes to make still.


# d25013f2 16-Mar-2003 camield <camield@openbsd.org>

hack is free

Thanks to Andries Brouwer, Jay Fenlason and the folks at CWI for their
efforts.

http://www.cwi.nl/~aeb/games/hack/hack.html

ok deraadt@


# ef7cc336 23-Jun-2002 deraadt <deraadt@openbsd.org>

uid_t and gid_t are unsigned


# d0b779f3 28-Jan-2001 niklas <niklas@openbsd.org>

$OpenBSD$


# 6cd28e42 16-Aug-1999 millert <millert@openbsd.org>

use O_* defines for open(2) flags and include fcntl.h


# a7a85d61 28-Mar-1997 tholo <tholo@openbsd.org>

Set umask so save files are writeable by hack


# 180acc8f 17-Jan-1997 millert <millert@openbsd.org>

r?index -> strr?chr


# 161033a1 22-Dec-1996 deraadt <deraadt@openbsd.org>

proper gid revoke


# c7b2accb 26-Oct-1996 millert <millert@openbsd.org>

prefer $LOGNAME over $USER. fix strncpy() usage.


12