summaryrefslogtreecommitdiff
path: root/games/hack
AgeCommit message (Collapse)Author
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()
2014-03-11Welcome to 1989: we can ask for signed chars when we want themPhilip Guenther
2014-03-11lint is dead (long live the lint!)Philip Guenther
2014-01-21obvious .Pa fixes; found with mandocdb(8)Ingo Schwarze
2011-03-16Use the help pager code, but repair it in various ways.Theo de Raadt
(I had to fix the $PAGER support beyond the patch supplied by Simon) from Simon.Nicolussi@student.uibk.ac.at
2010-10-29remove the "-*- nroff -*-" lines;Jason McIntyre
2009-12-10fix potential bugs spotted by parfaitBob Beck
ok millert@ pjanzen@
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
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
2009-06-03remove unused variableCharles Longeau
ok millert@ ray@
2009-06-01Fix fgets handling.Ray Lai
1. Skip blank lines instead of dereferencing NULL-1. 2. If bufr is a blank line don't pass bufr+1 as a pointer. OK millert