summaryrefslogtreecommitdiffstats
path: root/games/hack (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix intercardinal directions in hack help.tb2021-03-071-1/+1
| | | | From Raf Czlonka
* Fix build with -fno-common. OK deraadt@millert2021-01-261-4/+1
|
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-287-24/+24
| | | | | | 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.
* macro args and punctuation should be space spearated;jmc2019-04-081-3/+3
| | | | from fabio scotoni
* Fix hack(6).bentley2019-04-056-39/+62
| | | | | | | | | | - 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@
* Remove a few too early pledge(2)s on games/ and apply them a little bit latermestre2018-08-241-4/+5
| | | | | | | | | | | 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@
* remove misc. depend and yacc nits that no longer matter.espie2017-07-101-2/+1
| | | | okay millert@
* missed BUILDFIRST. Allow stuff to proceed without dependsespie2017-07-011-2/+2
| | | | as found by krw@
* Fix a path in Makequest and remove hack.sh (it never worked).akfaew2017-06-203-90/+4
| | | | OK tb@
* snprintf() format string should be literalgsoares2017-04-081-2/+2
| | | | | | avoid compiler silly warnings sure deraadt@
* Callers of time(3) should #include <time.h>.tb2016-09-111-1/+2
| | | | ok deraadt
* These games have been broken for the better part of a year, ever sincetb2016-09-091-2/+9
| | | | | | their setgid bits got removed. Mark them as such in their manuals. ok deraadt, help with wording jmc
* Prefer fseek(3) over rewind(3) since the latter although it also calls fseekmestre2016-03-161-2/+4
| | | | | | | 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@
* execl(3) calls must have the last argument casted to (char *)NULLmestre2016-03-152-6/+6
| | | | | | | 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@
* #ifdef QUEST then a few functions won't work, because of that includemestre2016-01-101-1/+4
| | | | | | <stdlib.h> if we are on a QUEST OK tb@
* Remove several casts to (char *) 0 and replace them by NULLmestre2016-01-0910-28/+28
| | | | Prompted and OK by tb@
* This diff is rather large, but it's just simply removing unnecessary headersmestre2016-01-0959-381/+417
| | | | | | | | , 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
* hack expects to be able to read ^Z as a normal character so disablemillert2016-01-071-1/+3
| | | | | SUSP in the termios settings. Presumably this is how things worked before the conversion to termios. Fixes suspend/resume in hack.
* Some basic code maintenance in games/tb2016-01-072-7/+11
| | | | | | | | | | - 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@
* Set as __dead a few more functions, that don't return, on games/mestre2015-12-261-3/+3
| | | | With precious tip, help and also OK from tb@
* Use __progname instead of hand-rolled parsing of argv[0].tb2015-12-162-7/+6
| | | | | | | Inspired by similar diffs by tobias@ and millert@. "I like the concept" pjanzen@ ok tedu@
* add missing #include "hack.h"tb2015-12-051-1/+2
|
* delete useless BUGS section; patch from Jan Stary <hans at stare dot cz>schwarze2015-11-301-6/+2
|
* In 1995, all of the games were setuid games. At end of 1996, I took them allderaadt2015-11-241-2/+1
| | | | | | | | | 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
* creat() -> open equiv; from Frederic Nowakderaadt2015-11-114-9/+9
|
* replace setbuf with setvbuf, from Frederic Nowaktedu2015-11-041-2/+2
|
* Cast ctype functions' argument to unsigned char.mmcc2015-10-242-7/+8
| | | | ok guenther@
* Cast ctype functions' arguments to unsigned char.mmcc2015-10-242-7/+7
| | | | ok guenther@
* Cast isdigit()'s argument to unsigned char.mmcc2015-10-241-3/+3
| | | | ok guenther@
* Cast ctype functions' arguments to unsigned char.mmcc2015-10-241-4/+4
| | | | ok guenther@
* Cast ctype functions' arguments to unsigned char.mmcc2015-10-241-3/+5
| | | | ok guenther@
* Cast isdigit()'s argument to unsigned char.mmcc2015-10-241-3/+3
| | | | ok guenther@
* Disable !-command to escape to a shell. You are supposed to play, presstobias2015-10-162-3/+3
| | | | | | ^Z, or open up another terminal if there is something else to do. ok deraadt
* Annotate funcs with __attribute__((printf(...))) and clean up the fallout:guenther2015-09-2715-45/+52
| | | | | | | | | | * 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@
* remove the first comma from constructs like ", and," and ", or,": you can usejmc2015-03-131-3/+3
| | | | | "and" and "or" to join sentence clauses, and you can use commas, but both hinders reading;
* Make some $OpenBSD$ lines prettier/standardier by eliminatingkrw2015-01-191-1/+1
| | | | | | | superflous '*' after '/*' and adding blank after terminating '$'. Also eases parsing of the lines by simple awk scripts. Aesthetic approval from tedu@.
* all modern systems can do this SUSPEND thingderaadt2015-01-152-5/+3
|
* NR_OF_EOFS is a festering boil, lance & drain.deraadt2015-01-151-25/+1
| | | | ok millert
* For now, these games still contain deterministic randomization (forderaadt2014-12-081-3/+2
| | | | | | | 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
* Eliminate pointless use of <sys/param.h>, <sys/file.h>, <sys/sockio.h>,guenther2014-11-161-3/+3
| | | | | | | | | 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@
* obvious cases of missing .An;schwarze2014-09-081-6/+15
| | | | | found with the new mandoc(1) MANDOCERR_AN_MISSING warning; no text changes
* Match bwrite()'s prototype with write()'s, zapping a lint commentguenther2014-03-1116-81/+80
| | | | Delete casts to char* of arguments to bwrite() and free()
* Welcome to 1989: we can ask for signed chars when we want themguenther2014-03-111-6/+2
|
* lint is dead (long live the lint!)guenther2014-03-114-22/+4
|
* obvious .Pa fixes; found with mandocdb(8)schwarze2014-01-211-4/+4
|
* Use the help pager code, but repair it in various ways.deraadt2011-03-163-6/+9
| | | | | (I had to fix the $PAGER support beyond the patch supplied by Simon) from Simon.Nicolussi@student.uibk.ac.at
* remove the "-*- nroff -*-" lines;jmc2010-10-291-3/+3
|
* fix potential bugs spotted by parfaitbeck2009-12-101-3/+3
| | | | ok millert@ pjanzen@
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-2757-289/+57
| | | | | | | 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
* remove unused variablechl2009-06-031-3/+3
| | | | ok millert@ ray@