summaryrefslogtreecommitdiffstats
path: root/games/backgammon
AgeCommit message (Collapse)AuthorFilesLines
2021-02-06while learning (teachgammon(1)) you might want to save your game so "{w,c}path"mestre1-2/+2
pledge(2) permissions are required
2017-07-11User count checks have been compiled out since 1998, get rid of them.fcambus1-19/+1
OK mlarkin@
2017-01-21Nuke whitespace foolish enough to expose itself during the greatkrw2-11/+11
"warning:" rectification.
2017-01-20mark the prototypes of tutor() and leave() as __dead as well.tb2-4/+6
ok guenther, krw
2017-01-20Mark functions that do not return as __dead to quiet gcc warnings.krw2-4/+4
ok beck@
2016-01-08add missing 'void'tb2-4/+4
ok mestre@
2016-01-03About 13 years ago when the idiom srandom(time()), and sometimesmestre1-2/+2
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@
2015-12-26Set as __dead a few more functions, that don't return, on games/mestre1-2/+2
With precious tip, help and also OK from tb@
2015-12-02Drop the argument passing between backgammon and teachgammon.tb6-27/+19
It's broken. Instead, make -d imply -n. You're supposed to know the rules before you start tweaking them. Issue reported by and ok pjanzen@ Patient help with the manual jmc@
2015-12-01Make sure "exec" rights are dropped asap in all code paths.tb1-3/+6
The game also needs "wpath cpath" for supporting the score file, so add those.
2015-12-01Answering "yes" to the question "Do you want to see the rules of the game?"tb1-2/+6
execs teachgammon. Allow this and drop this pledge afterward. Spotted by Paul Janzen, thanks!
2015-11-30Pledge for backgammon and teachgammon.tb17-121/+85
Both are straightforward "stdio rpath tty" programs; teachgammon exec's backgammon at the end, so give it "exec" in addition. While there, ANSIfy
2015-11-11creat() -> open equiv; from Frederic Nowakderaadt1-3/+7
2015-08-22remove malloc/calloc/realloc* casts, due to stdlib.h being present; ok millert krwderaadt1-2/+2
2015-07-20Sometimes, the computer's move was printed, but the computer's men didn'tschwarze1-5/+2
actually move. This happened when "swap" was called earlier, and then later in the final call to makmove(), swapping back would have been required, but was erroneously denied. Patch sent in pjanzen@. It looks like the bug was already present in the original version in 4.1a BSD in 1982.
2015-06-26/home/otto/okotto4-9/+13
2015-05-20Fix sign compare bug introduced when rnum() was redefined to usemillert1-2/+2
arc4random_uniform(). From pjanzen@, OK deraadt@
2014-11-16Eliminate pointless use of <sys/param.h>, <sys/file.h>, <sys/sockio.h>,guenther1-4/+4
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-04-25This manual was lacking it's most important section, HISTORY.schwarze1-4/+11
While here, add .An (author name) macros.
2014-04-25Security is square, gaming is hip,schwarze2-126/+2
so extend the Valhalla Rampage to where it really matters. Tedu 118 lines of dead code containing 77 dead magic numbers, rotting in the tree since June 24, 2001. Spotted by and ok jsg@, ok sthen@.
2013-11-27remove erroneous char cast to switch expression processing getopt(3);okan1-2/+2
not used in any cases. ok deraadt@, guenther@, millert@
2013-08-29replace srandomdev()+random() with the arc4random*() familynaddy2-4/+3
tweaks and ok millert@, ok deraadt@
2012-12-05Remove excessive sys/cdefs.h inclusionderaadt1-2/+1
ok guenther millert kettenis
2009-10-28a few leftovers from yesterday's SCCS/RCS-ID removal;schwarze1-5/+1
survived a full make build on i386; "sure" deraadt@
2009-10-27rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt19-183/+19
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
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.ray1-8/+1
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
2008-03-17synchronization between usage and synopsis; add some missing "usage:"'ssobrado1-3/+3
ok jmc@
2007-10-17remove "unused variable" warningschl1-3/+2
tested by deraadt@ on a gcc2 arch looks ok ray@ ok deraadt@
2007-05-31convert to new .Dd format;jmc1-2/+2
2006-12-14fix DEBUG by renaming a variable colliding with ncursesmartin4-22/+23
found by Sascha Welter, ok otto@
2006-11-01tidy up the quick reference section;jmc1-10/+16
2006-11-01Sort flags and commands.ray1-13/+16
Use correct capitalization and punctuation in flag descriptions. Mark up -n flag in description. Help and OK jmc@.
2006-10-31Remove -h flag and simplify usage output to one line, like mostray2-23/+16
other programs. Vote to simplify usage jmc@, OK martin@.
2006-10-31Add new -d flag to SYNOPSIS and remove optional and unfunctionalray1-7/+6
[-] flag, which, according to FreeBSD logs, is supposed to print the usage. Sort flags in SYNOPSIS and DESCRIPTION. OK martin@, jmc@. Detective work and ok to kill [-] otto@.
2006-10-29-d: make it possible playing without doubling as it is not commonlymartin6-13/+22
played everywhere in the world ok todd@ otto@
2006-03-27assorted fixes mostly from coverity via netbsd via jasper adriaanse via techtedu3-9/+9
2004-04-07Remove those option letters from the getopt string which do not have a caseaaron1-3/+3
handler below. millert@ ok
2004-04-05Don't init curses until after option processing. pjanzen@ okaaron1-3/+4
2003-06-03Remove the advertising clause in the UCB license which Berkeleymillert22-151/+63
rescinded 22 July 1999. Proofed by myself and Theo.
2003-06-01Undo a misguided attempt to fix speling errors from long ago. UCBmillert1-3/+3
copyrights say "acknowledgement", not "acknowledgment". You cannot just go changing the text of a license willy-nilly.
2003-05-30section reorder;jmc1-6/+6
2003-05-12From NetBSD: don't need to declare ospeed.pjanzen1-4/+2
2003-04-23some typos, and clarification of game rules;jmc1-5/+5
help, suggestions and ok pjanzen@
2003-04-062451 lines of strdup/sprintf/strcpy whacking. mostly ok'd by pjanzenderaadt1-7/+7
already, but he may have later changes to make still.
2002-12-06Replace things like srandom(time(NULL)) with srandomdev(3). random(3)millert1-5/+3
good enough for games but we should at least use a decent seed. pjanzen@ OK
2002-07-30Replace the "blows chunks" algorithm with pubeval, a public domain algorithmpjanzen5-186/+175
which plays an acceptable, if not optimal, game. pubeval author approves.
2002-07-30Kill buffer overflow.pjanzen3-13/+19
2002-05-31No dm -> no need to revoke setegid.pjanzen2-12/+4
2002-05-23The troll strikes.. The troll strikes.. The dungeon master dies.distrib/sets/listsderaadt2-4/+2
2002-02-16Part 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.millert4-67/+67