summaryrefslogtreecommitdiff
path: root/games/hack
AgeCommit message (Collapse)Author
2024-08-19file not neededTheo de Raadt
2024-08-19spelling error, fixed by "snj", 21 years ago in some other repositoryTheo de Raadt
2024-05-21remove prototypes with no matching function and externs with no varJonathan Gray
partly checked by millert@
2024-02-08Feed more generated files to the clean target; joint work with naddy@Miod Vallat
2023-09-06remove uneeded function declsJonathan Gray
ok tb@
2023-06-03drop `uptodate()' check from hack(6)Omar Polo
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)
2022-02-18Avoid gendered language in man pages when not referring to a specificJonathan Gray
person. Rewrite or use singular they. ok thfr@ sthen@ daniel@ ian@ job@ kmos@ jcs@ ratchov@ phessler@ and others I'm likely missing on an earlier version. feedback tj@, feedback and ok jmc@
2021-12-15The PATH_MAX+1 bites. The PATH_MAX+1 bites. You die...Theo de Raadt
ok millert mlarkin
2021-03-07Fix intercardinal directions in hack help.Theo Buehler
From Raf Czlonka
2021-01-26Fix build with -fno-common. OK deraadt@Todd C. Miller
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
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.
2019-04-08macro args and punctuation should be space spearated;Jason McIntyre
from fabio scotoni
2019-04-05Fix hack(6).Anthony J. Bentley
- 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@
2018-08-24Remove a few too early pledge(2)s on games/ and apply them a little bit laterRicardo Mestre
but with much reduced permissions ("stdio tty" if ncurses based and "stdio" for the ones that only perform basic operations). There's still a few games that we cannot yet remove their fs access, through pledge(2), since they open files on demand and too late, this might get revisited in the future. OK tb@
2017-07-10remove misc. depend and yacc nits that no longer matter.Marc Espie
okay millert@
2017-07-01missed BUILDFIRST. Allow stuff to proceed without dependsMarc Espie
as found by krw@
2017-06-20Fix a path in Makequest and remove hack.sh (it never worked).Michal Mazurek
OK tb@
2017-04-08snprintf() format string should be literalGleydson Soares
avoid compiler silly warnings sure deraadt@
2016-09-11Callers of time(3) should #include <time.h>.Theo Buehler
ok deraadt
2016-09-09These games have been broken for the better part of a year, ever sinceTheo Buehler
their setgid bits got removed. Mark them as such in their manuals. ok deraadt, help with wording jmc
2016-03-16Prefer fseek(3) over rewind(3) since the latter although it also calls fseekmestre
then additionally it calls clearerr(3) deliberately but we want to catch any error that may happen and this way we couldn't catch it OK tb@
2016-03-15execl(3) calls must have the last argument casted to (char *)NULLmestre
At the time when this was commited me and tb@ discussed that it shouldn't be changed, but still snucked in within a larger diff that we didn't notice. OK tb@
2016-01-10#ifdef QUEST then a few functions won't work, because of that includemestre
<stdlib.h> if we are on a QUEST OK tb@
2016-01-09Remove several casts to (char *) 0 and replace them by NULLmestre
Prompted and OK by tb@
2016-01-09This diff is rather large, but it's just simply removing unnecessary headersmestre
, 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
2016-01-07hack expects to be able to read ^Z as a normal character so disableTodd C. Miller
SUSP in the termios settings. Presumably this is how things worked before the conversion to termios. Fixes suspend/resume in hack.
2016-01-07Some basic code maintenance in games/tb
- 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@
2015-12-26Set as __dead a few more functions, that don't return, on games/mestre
With precious tip, help and also OK from tb@
2015-12-16Use __progname instead of hand-rolled parsing of argv[0].tb
Inspired by similar diffs by tobias@ and millert@. "I like the concept" pjanzen@ ok tedu@
2015-12-05add missing #include "hack.h"tb
2015-11-30delete useless BUGS section; patch from Jan Stary <hans at stare dot cz>Ingo Schwarze
2015-11-24In 1995, all of the games were setuid games. At end of 1996, I took them allTheo de Raadt
to setgid games, and we started wittling them down. Nearly 10 years later I am removing all setgid from the games. If any of these have score files they are now broken, and I hope various folk repair them. I have argued for years (and received pushback...) that the score file features must be removed, or rewritten to use private files, because setgid is the wrong tool. ok tedu
2015-11-11creat() -> open equiv; from Frederic NowakTheo de Raadt
2015-11-04replace setbuf with setvbuf, from Frederic NowakTed Unangst
2015-10-24Cast ctype functions' argument to unsigned char.mmcc
ok guenther@
2015-10-24Cast ctype functions' arguments to unsigned char.mmcc
ok guenther@
2015-10-24Cast isdigit()'s argument to unsigned char.mmcc
ok guenther@
2015-10-24Cast ctype functions' arguments to unsigned char.mmcc
ok guenther@
2015-10-24Cast ctype functions' arguments to unsigned char.mmcc
ok guenther@
2015-10-24Cast isdigit()'s argument to unsigned char.mmcc
ok guenther@
2015-10-16Disable !-command to escape to a shell. You are supposed to play, pressTobias Stoeckmann
^Z, or open up another terminal if there is something else to do. ok deraadt
2015-09-27Annotate funcs with __attribute__((printf(...))) and clean up the fallout:Philip Guenther
* 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@
2015-03-13remove the first comma from constructs like ", and," and ", or,": you can useJason McIntyre
"and" and "or" to join sentence clauses, and you can use commas, but both hinders reading;
2015-01-19Make some $OpenBSD$ lines prettier/standardier by eliminatingKenneth R Westerback
superflous '*' after '/*' and adding blank after terminating '$'. Also eases parsing of the lines by simple awk scripts. Aesthetic approval from tedu@.
2015-01-15all modern systems can do this SUSPEND thingTheo de Raadt
2015-01-15NR_OF_EOFS is a festering boil, lance & drain.Theo de Raadt
ok millert
2014-12-08For now, these games still contain deterministic randomization (forTheo de Raadt
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
2014-11-16Eliminate pointless use of <sys/param.h>, <sys/file.h>, <sys/sockio.h>,Philip Guenther
and <sys/ttydefaults.h> Replace MAXPATHLEN with PATH_MAX and MAXLOGNAME with LOGIN_NAME_MAX Pull in <limits.h> where needed Prefer sizeof(var) over MAXFOO or FOO_MAX ok deraadt@
2014-09-08obvious cases of missing .An;Ingo Schwarze
found with the new mandoc(1) MANDOCERR_AN_MISSING warning; no text changes
2014-03-11Match bwrite()'s prototype with write()'s, zapping a lint commentPhilip Guenther
Delete casts to char* of arguments to bwrite() and free()