1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00
Commit Graph

70 Commits

Author SHA1 Message Date
daniel
126bb2a7ff add Czechia as an alternative for Czech Republic 2022-12-18 18:02:00 +00:00
op
9e6678dc8f fully switch quiz(6) to getline; diff from Ben Fuller (ben [at] bvnf
space), ok millert@
2022-08-08 17:54:08 +00:00
daniel
0fde2ccbdd update countres and capitals in quiz(6)
Changes:
- update country and capital names that have changed in recent years
- remove the formal prefix from South Africa for consistency with other
  country names
- add additional capitals for countries with multiple capitals
- add "The" as optional prefix for The Gambia and The Bahamas
- add missing suffix "City" to a few capitals
- add many missing countries

NetBSD appears to have also added territories which I've not added in this
update.

The removal of The Hague for The Netherlands was taken from NetBSD and
confirmed by otto@

The duplicate Turkey and Georgia entries have not been touched.

Prompted by a diff by Ben Fuller, who also provided much helpful feedback.
2022-07-06 02:09:05 +00:00
naddy
5a0076c3c8 quiz: handle line continuation in data files correctly, switch to getline(3)
Specifically, the following quiz.db line

foo:\
bar

was parsed into "foo:bar\n", which made it impossible to answer correctly.

Bug reported and inital fix from Alex Karle, partially reworked by
yours truly, further input from millert@
2021-03-11 21:18:25 +00:00
jmc
d075035988 some updates from pjanzen; 2021-01-21 07:12:34 +00:00
mestre
b9f1292116 Remove a few too early pledge(2)s on games/ and apply them a little bit later
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@
2018-08-24 11:14:49 +00:00
jmc
02dad92ccb elements 113, 115, 117, and 118; from pjanzen 2016-12-03 07:38:38 +00:00
mestre
6fa5e1da34 - General changes:
- Remove -? from getopt(3) options, but still keep (or add) -h where applicable
- Replace hardcoded program strings by getprogname(3)

- Specific changes:
- atc(6): this used -? and -u for usage(), remove both from game and manpage
- bcd(6): use __progname instead of getprogname(3), no need to include stdlib.h
- hunt(6): replace fputs(3) by fprintf(3)

OK tb@ after his suggestions
2016-03-07 12:07:55 +00:00
mestre
7e027cb7af As per style(9), remove remaining lint-style comments from games/
OK tb@
2016-01-10 13:35:09 +00:00
tb
17641e3181 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@
2016-01-07 16:00:31 +00:00
mestre
2010f3c835 More cleanup and sorting on header section
OK tb@ and he also pointed out that for consistency with rest of the tree we
should include termios.h instead of sys/ttydefaults.h, where applicable
2016-01-04 17:33:24 +00:00
mestre
9ea8ec706f About 13 years ago when the idiom srandom(time()), and sometimes
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@
2016-01-03 14:38:16 +00:00
mestre
f0628b46ae Declare usage() functions as __dead void, if they don't return, on games section.
Found another one in arithmetic(6) which also didn't return, and removed a function from number(6) which is not used anymore.

OK tb@
2015-12-25 20:59:09 +00:00
tb
da74d77a50 Treat quiz the same way as the other games and try to preserve the look
and feel.  Revert previous and allow the pager with pledge "proc exec".
Play the game with pledge "stdio rpath".

Discussed with tedu@
2015-12-06 09:55:58 +00:00
tedu
5e0221f546 just dump the help on stdout with messing about with a pager.
makes pledge much simpler.
from jan stary
2015-10-25 09:34:49 +00:00
deraadt
a0d5b14ebf flower & bird adjustments for Nunavut, from pjanzen 2015-07-16 15:13:25 +00:00
schwarze
6a52b24d9b in the recent update of capitals, this critical file was forgotten 2014-12-03 00:04:54 +00:00
schwarze
5963cb8a8f delete unused, almost empty file 2014-12-02 12:50:04 +00:00
schwarze
550d66d25a get rid of line-printer-era backspace-encoding of diacriticals;
patch from pjanzen@; ok jmc@
2014-12-02 12:43:09 +00:00
deraadt
62fc451f51 Adjust ordering; from pjanzen 2014-11-24 06:31:50 +00:00
deraadt
ec9f5c310e Add two new IUPAC elements, and adjust the atomic weights of some.
from pjanzen
2014-11-24 06:31:23 +00:00
deraadt
190359872e Update to gravely outdated places to visit, from Jack Szmidt 2014-11-22 20:06:27 +00:00
bentley
d01fe41759 Reduce instances of `` '' in manuals.
troff displays these as typographic quotes, but nroff implementations
almost always print them literally, which rarely has the intended effect
with modern fonts, even in stock xterm.

These uses of `` '' can be replaced either with more semantic alternatives
or with Dq, which prints typographic quotes in a UTF-8 locale (but will
automatically fall back to `` '' in an ASCII locale).

improvements and ok schwarze@
2014-11-15 14:41:01 +00:00
naddy
66e4954187 replace srandomdev()+random() with the arc4random*() family
tweaks and ok millert@, ok deraadt@
2013-08-29 20:22:09 +00:00
jmc
9e3b2e5a12 +Cn:112:(285):Copernicium
from pjanzen
2011-11-19 08:34:17 +00:00
jmc
cbc4ffc222 some presidential updates, from pjanzen; 2011-10-06 18:18:28 +00:00
deraadt
043fbe51c1 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
2009-10-27 23:59:19 +00:00
deraadt
4b7050ef20 Repair long group handling; Alf Schlichting, PR 4164 2008-10-03 13:00:06 +00:00
sobrado
a307e700ad synchronization between usage and synopsis; add some missing "usage:"'s
ok jmc@
2008-03-17 09:17:56 +00:00
jmc
5135dbeae3 update some capital cities (and spelling); from Daniel Dickman 2007-07-10 07:56:35 +00:00
jmc
9490d37cb6 convert to new .Dd format; 2007-05-31 19:19:00 +00:00
ajacoutot
41927d4623 - add Beijing as a choice for the capital of China
from Daniel Dickman <didickman at gmail dot com>

ok pyr@
2007-05-27 13:27:41 +00:00
jmc
ff64178610 -i takes an argument; from Igor Sobrado 2007-04-02 15:17:35 +00:00
ray
41aa44d930 Don't check buf[strlen(buf) - 1] on empty strings.
OK moritz@.
2006-11-02 18:19:30 +00:00
jmc
e268e621a9 update with a couple of new elements;
from pjanzen@
2005-08-17 07:14:29 +00:00
jmc
e6f616a8d8 provide alternative spellings for alumin{i}um, c{a}esium, and
sul[f|ph]er;

from perry@netbsd: -r1.3, -r1.5, and -r1.7, respectively;
ok pjanzen@
2005-08-16 15:47:39 +00:00
jmc
79acb9df25 - synchronise synopsis w/ usage(), which is clearer i think
- sort options
- .sp -> .Pp
- all uppercase for .Sh headings
2005-05-04 08:56:17 +00:00
deraadt
ff8320a74d more ansi; khalek@linuxgamers.net 2004-07-10 07:26:22 +00:00
avsm
53afd9609d add a comment that an strncpy should not be converted to an strlcpy;
noted by pjanzen@
2003-07-06 02:04:03 +00:00
pjanzen
05eb133c22 Number 43. 2003-06-11 09:15:23 +00:00
pjanzen
b4501e6869 spelling 2003-06-11 08:59:28 +00:00
millert
7a09557bd4 Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.
2003-06-03 03:01:37 +00:00
deraadt
42ceebb3a4 2451 lines of strdup/sprintf/strcpy whacking. mostly ok'd by pjanzen
already, but he may have later changes to make still.
2003-04-06 18:50:33 +00:00
millert
ffe3e52230 Replace things like srandom(time(NULL)) with srandomdev(3). random(3)
good enough for games but we should at least use a decent seed.
pjanzen@ OK
2002-12-06 21:48:50 +00:00
pjanzen
ef2c807a96 No dm -> no need to revoke setegid. 2002-05-31 03:39:55 +00:00
deraadt
f53dc9f68f The troll strikes.. The troll strikes.. The dungeon master dies.distrib/sets/lists 2002-05-23 18:42:59 +00:00
millert
c72b5b24e1 Part 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. 2002-02-16 21:27:05 +00:00
pjanzen
157bf1de6c Fixes, mainly from Thomas Nordin <nordin@cse.ogi.edu> 2001-07-09 21:18:03 +00:00
pjanzen
5c1a5b48b8 Alternate (valid) element names from Dan Koranyi 2000-04-07 04:42:36 +00:00
pjanzen
787e3a853a Fix capital of Monaco; capo@writeme.com vi jsm@netbsd.org 1999-12-17 10:39:18 +00:00