]> git.cameronkatri.com Git - bsdgames-darwin.git/log
bsdgames-darwin.git
3 years agocgram: adjust style to survive lint's strict bool mode
rillig [Sun, 21 Feb 2021 16:05:44 +0000 (16:05 +0000)]
cgram: adjust style to survive lint's strict bool mode

The biggest change is the return type of substitute().  Before, 0 meant
success, now false means failure.

No functional change.

3 years agocgram: sort includes
rillig [Sun, 21 Feb 2021 15:42:21 +0000 (15:42 +0000)]
cgram: sort includes

3 years agocgram: indent
rillig [Sun, 21 Feb 2021 15:41:04 +0000 (15:41 +0000)]
cgram: indent

With manual corrections afterwards:

- indent removes empty lines between statement and declaration.  This
  had been a syntax error in C90, since C99 this is common style and
  should be accepted by indent.

- indent didn't format the first line of main for whatever reason, did
  that manually.

- indent removed the empty line above the '/////' separators.  It should
  have left these empty lines as-is.

3 years agocgram: fix Home key for cursor navigation
rillig [Sun, 21 Feb 2021 13:35:37 +0000 (13:35 +0000)]
cgram: fix Home key for cursor navigation

Reported by liweitianux via GitHub.

3 years agoFix circle dep
Cameron Katri [Fri, 9 Apr 2021 13:22:54 +0000 (09:22 -0400)]
Fix circle dep

3 years agoFix darwin-amd64
Cameron Katri [Tue, 6 Apr 2021 12:28:59 +0000 (08:28 -0400)]
Fix darwin-amd64

3 years agoUse PREFIX now
Cameron Katri [Sun, 28 Mar 2021 18:39:02 +0000 (14:39 -0400)]
Use PREFIX now

3 years agoGet all the games compiling for iOS
Cameron Katri [Wed, 17 Feb 2021 19:05:02 +0000 (14:05 -0500)]
Get all the games compiling for iOS

4 years ago- Don't allocate memory dynamically on the stack (for SSP)
christos [Fri, 8 Jan 2021 15:16:04 +0000 (15:16 +0000)]
- Don't allocate memory dynamically on the stack (for SSP)
- Don't return errno as exit code
- Fold long lines

4 years agoset the cursor to invisible
jmcneill [Sat, 2 Jan 2021 12:12:26 +0000 (12:12 +0000)]
set the cursor to invisible

4 years agotrailing whitespace
jmcneill [Sat, 2 Jan 2021 12:10:17 +0000 (12:10 +0000)]
trailing whitespace

4 years agoMarkup/typo fixes.
wiz [Sat, 2 Jan 2021 08:55:51 +0000 (08:55 +0000)]
Markup/typo fixes.

4 years agoAdd testpat(6) to games.
nat [Sat, 2 Jan 2021 03:21:39 +0000 (03:21 +0000)]
Add testpat(6) to games.

Testpat displays a test pattern in curses(3).

4 years agospeed limit 80
dholland [Sun, 6 Dec 2020 11:41:47 +0000 (11:41 +0000)]
speed limit 80

4 years agospeed limit 80
dholland [Sun, 6 Dec 2020 11:35:27 +0000 (11:35 +0000)]
speed limit 80

4 years agoroundsleep(): Too many zeros; tv_nsec should be compared with
rin [Sat, 21 Nov 2020 09:24:02 +0000 (09:24 +0000)]
roundsleep(): Too many zeros; tv_nsec should be compared with
500 msec, not 5000. Raised by clang for ILP32 archs.

4 years agoAvoid common symbols. Use __dead.
joerg [Thu, 12 Nov 2020 22:23:16 +0000 (22:23 +0000)]
Avoid common symbols. Use __dead.

4 years agoComment out debugging build (it still randomly crashes though) pointed out
christos [Wed, 11 Nov 2020 20:04:02 +0000 (20:04 +0000)]
Comment out debugging build (it still randomly crashes though) pointed out
by wiz

4 years agouse strchr, strrchr, random, more lint removal, savefile in /var/games/warp
christos [Wed, 11 Nov 2020 19:55:33 +0000 (19:55 +0000)]
use strchr, strrchr, random, more lint removal, savefile in /var/games/warp
not /usr/share/games/warp...

4 years agono need for -lcompat
christos [Wed, 11 Nov 2020 19:54:53 +0000 (19:54 +0000)]
no need for -lcompat

4 years ago- use termios
christos [Wed, 11 Nov 2020 17:11:19 +0000 (17:11 +0000)]
- use termios
- enable setgid games
- enable savedir

4 years agoFix the old leftover license note
kamil [Wed, 11 Nov 2020 11:54:42 +0000 (11:54 +0000)]
Fix the old leftover license note

Larry Wall: "I outgrew commercial-free licensing about 30 years ago."

4 years agoremove error(1) comments
christos [Tue, 10 Nov 2020 23:32:33 +0000 (23:32 +0000)]
remove error(1) comments

4 years agoAntivaxer support.
christos [Tue, 10 Nov 2020 23:03:22 +0000 (23:03 +0000)]
Antivaxer support.

4 years agocan't have config.h and config.H in case-preserving but case-folding file-systems.
christos [Tue, 10 Nov 2020 22:56:49 +0000 (22:56 +0000)]
can't have config.h and config.H in case-preserving but case-folding file-systems.

4 years agodon't segv if the terminal is too big.
christos [Tue, 10 Nov 2020 22:52:45 +0000 (22:52 +0000)]
don't segv if the terminal is too big.

4 years agopray-tell where are you trying to write?
christos [Tue, 10 Nov 2020 22:52:32 +0000 (22:52 +0000)]
pray-tell where are you trying to write?

4 years agoTime warp forward 34 years so that it compiles (but not work)
christos [Tue, 10 Nov 2020 22:42:19 +0000 (22:42 +0000)]
Time warp forward 34 years so that it compiles (but not work)

4 years agoRemove the smap.* files
kamil [Tue, 10 Nov 2020 11:29:29 +0000 (11:29 +0000)]
Remove the smap.* files

They are generated during the build.

4 years agoIntegrate Warp Kit into the NetBSD build
kamil [Tue, 10 Nov 2020 08:49:08 +0000 (08:49 +0000)]
Integrate Warp Kit into the NetBSD build

Fix the build and make it install and run with minimal required changes.

4 years agoReset CVS keywords
kamil [Tue, 10 Nov 2020 00:02:11 +0000 (00:02 +0000)]
Reset CVS keywords

4 years agoAdd Warp Kit, Version 7.0 by Larry Wall
kamil [Mon, 9 Nov 2020 23:37:05 +0000 (23:37 +0000)]
Add Warp Kit, Version 7.0 by Larry Wall

Warp is a real-time space war game that doesn't get boring very quickly.
Read warp.doc and the manual page for more information.

games/warp originally distributed with 4.3BSD-Reno, is back to the BSD
world via NetBSD. Its remnants were still mentioned in games/Makefile.

Larry Wall, the original author and the copyright holder, generously
donated the game and copyright to The NetBSD Foundation, Inc.

Import the game sources as-is from 4.3BSD-Reno, with the cession
of the copyright and license to BSD-2-clause NetBSD-style.

Signed-off-by: Larry Wall <larry@wall.org>
Signed-off-by: Kamil Rytarowski <kamil@netbsd.org>
4 years agoRestore the catman joke.
dholland [Mon, 9 Nov 2020 03:23:14 +0000 (03:23 +0000)]
Restore the catman joke.

It needs the (8), or it fails to work for people who don't know or had
forgotten catman(8) was ever a thing.

as the de facto fortunes editor and also I think the person who added
that fortune in the first place, and given the discussion in
tech-userlevel, I think I get to do this.

4 years agoRevert to the original phrasing, but remove the man 8 section reference.
kamil [Mon, 9 Nov 2020 00:46:00 +0000 (00:46 +0000)]
Revert to the original phrasing, but remove the man 8 section reference.

catman is a historical Unix tool.

4 years agocatman(8) is a past thing
kamil [Sun, 8 Nov 2020 17:37:29 +0000 (17:37 +0000)]
catman(8) is a past thing

4 years agoAdd one.
simonb [Fri, 30 Oct 2020 04:56:32 +0000 (04:56 +0000)]
Add one.

4 years agorain(6): Make the default delay useful for modern terminals
nia [Wed, 14 Oct 2020 18:32:04 +0000 (18:32 +0000)]
rain(6): Make the default delay useful for modern terminals

4 years agoworms(6): Use a reasonable default delay for non-1980s terminals.
nia [Wed, 14 Oct 2020 07:32:53 +0000 (07:32 +0000)]
worms(6): Use a reasonable default delay for non-1980s terminals.

This is still fast, but not unreasonably fast.

4 years ago- remove duplicate comment
christos [Mon, 12 Oct 2020 13:54:51 +0000 (13:54 +0000)]
- remove duplicate comment
- flush after printing the number
(from kre@)

4 years agomore clarifications.
christos [Mon, 12 Oct 2020 13:53:43 +0000 (13:53 +0000)]
more clarifications.

4 years agomention hex numbers
christos [Sun, 11 Oct 2020 18:48:20 +0000 (18:48 +0000)]
mention hex numbers

4 years agoRemove is_hex_str() (trying to guess if a number was hex or not). It is not
christos [Sun, 11 Oct 2020 18:46:21 +0000 (18:46 +0000)]
Remove is_hex_str() (trying to guess if a number was hex or not). It is not
documented and can lead to unexpected behavior.

4 years agoFrom gson@
christos [Sun, 11 Oct 2020 17:18:34 +0000 (17:18 +0000)]
From gson@
- don't assume -h is always on for large factors
- fix saved large factors printing when -h

4 years ago- for readability when the exponent < 10 don't prefix it with 0x (from kre)
christos [Wed, 7 Oct 2020 19:48:29 +0000 (19:48 +0000)]
- for readability when the exponent < 10 don't prefix it with 0x (from kre)
- fix usage
- merge printing code.

4 years agoPR/55695: Andreas Gustafsson: factor(6) -h option doesn't always work
christos [Mon, 5 Oct 2020 21:11:47 +0000 (21:11 +0000)]
PR/55695: Andreas Gustafsson: factor(6) -h option doesn't always work
Handle -h for factors greater than the primes table.

4 years agorevert previous and don't parse octal
christos [Mon, 5 Oct 2020 14:31:30 +0000 (14:31 +0000)]
revert previous and don't parse octal

4 years agofactor: usage(): mark __dead
tnn [Mon, 5 Oct 2020 12:22:49 +0000 (12:22 +0000)]
factor: usage(): mark __dead

4 years ago- Accept octal input.
christos [Sun, 4 Oct 2020 19:32:15 +0000 (19:32 +0000)]
- Accept octal input.
- Don't play with the original string so we can print it.

4 years agoFix a typo (s/int/in/)
kre [Sun, 4 Oct 2020 14:22:52 +0000 (14:22 +0000)]
Fix a typo (s/int/in/)

4 years agoPR/55693: Andreas Gustafsson: factor(6) lists factors in wrong order
christos [Sat, 3 Oct 2020 22:27:00 +0000 (22:27 +0000)]
PR/55693: Andreas Gustafsson: factor(6) lists factors in wrong order
Sync with FreeBSD and change their -h (that printed hex) to -x because
we were already using -h.

4 years agoavoid uninit memory and use memmove vs strncpy for a will be
mrg [Mon, 7 Sep 2020 00:31:11 +0000 (00:31 +0000)]
avoid uninit memory and use memmove vs strncpy for a will be
truncated on purpose string.

4 years agoapply ${GCC_NO_FORMAT_TRUNCATION} to scores.c
mrg [Sun, 6 Sep 2020 10:51:20 +0000 (10:51 +0000)]
apply ${GCC_NO_FORMAT_TRUNCATION} to scores.c

4 years agos/ be be / be /
msaitoh [Wed, 19 Aug 2020 02:19:06 +0000 (02:19 +0000)]
s/ be be / be /

4 years agorobots: Use arc4random_uniform for better uniform distribution
nia [Sun, 26 Jul 2020 15:38:22 +0000 (15:38 +0000)]
robots: Use arc4random_uniform for better uniform distribution

4 years agorandom(6): Use arc4random_uniform to simplify code
nia [Sun, 26 Jul 2020 15:24:00 +0000 (15:24 +0000)]
random(6): Use arc4random_uniform to simplify code

4 years agoRevert arc4random usage for now
nia [Sun, 26 Jul 2020 15:14:09 +0000 (15:14 +0000)]
Revert arc4random usage for now

this is a host tool and needs to be portable

future plans: add arc4random to libnbcompat

4 years agofortune: arc4random_uniform for better uniform values than random() % ...
nia [Tue, 21 Jul 2020 03:05:40 +0000 (03:05 +0000)]
fortune: arc4random_uniform for better uniform values than random() % ...

4 years agotetris: Use arc4random_uniform instead of modulo for better randomness
nia [Tue, 21 Jul 2020 02:42:05 +0000 (02:42 +0000)]
tetris: Use arc4random_uniform instead of modulo for better randomness

4 years agoAvoid messing up the display when too many letters are guessed at once.
dholland [Sun, 12 Jul 2020 02:34:54 +0000 (02:34 +0000)]
Avoid messing up the display when too many letters are guessed at once.

The field to put them in was made 26 characters wide... but includes
the string "Guessed: ". So if you get to 17 it wraps to the next line
and clreol()'s it. Instead, when reaching this point step on the
"Guessed:" string instead.

Reported by phil@.

4 years agocgram(6): use standard cursor keys, use standard shuffle algorithm
rillig [Thu, 2 Jul 2020 19:11:01 +0000 (19:11 +0000)]
cgram(6): use standard cursor keys, use standard shuffle algorithm

The previous shuffle algorithm asked for 100 random numbers, on average.
The new algorithm asks exactly for 26 random numbers.

Curses predefines numeric constants for keys, and there is no apparent
reason not to use these standard keys for cursor movement.

4 years agoA revision of "The purpose of computing is insight, not numbers" by
sevan [Mon, 15 Jun 2020 12:57:51 +0000 (12:57 +0000)]
A revision of "The purpose of computing is insight, not numbers" by
Richard Hamming.
From The Art of Doing Science and Engineering

4 years agoRecommend using `pkg_admin {fetch-pkg-vulnerabilities,audit}' instead of
leot [Sun, 7 Jun 2020 15:41:03 +0000 (15:41 +0000)]
Recommend using `pkg_admin {fetch-pkg-vulnerabilities,audit}' instead of
{download-vulnerability-list,audit-packages}.

4 years agoProperly quote printf string
leot [Sun, 7 Jun 2020 15:37:04 +0000 (15:37 +0000)]
Properly quote printf string

Noticed by Ottavio Caruso on #netbsd@Freenode, thanks!

4 years agoHeads up on Bell patents
sevan [Mon, 18 May 2020 20:19:08 +0000 (20:19 +0000)]
Heads up on Bell patents
P21 on https://minnie.tuhs.org/Archive/Documentation/AUUGN/AUUGN-V01.1.pdf

4 years agoRemove extra semicolon.
msaitoh [Thu, 14 May 2020 08:34:17 +0000 (08:34 +0000)]
Remove extra semicolon.

4 years agoSimplify, little KNF
christos [Thu, 30 Apr 2020 12:40:11 +0000 (12:40 +0000)]
Simplify, little KNF

4 years agoSimplify, errors to stderr.
christos [Thu, 30 Apr 2020 12:32:26 +0000 (12:32 +0000)]
Simplify, errors to stderr.

4 years agounstr: Check that the input filename fits in the buffer.
nia [Wed, 29 Apr 2020 21:00:42 +0000 (21:00 +0000)]
unstr: Check that the input filename fits in the buffer.

4 years agostrfile: Check that input/output filenames don't exceed the buffer size
nia [Wed, 29 Apr 2020 20:45:05 +0000 (20:45 +0000)]
strfile: Check that input/output filenames don't exceed the buffer size

4 years agobuffnum is shared between subs.c and fancy.c
joerg [Wed, 22 Apr 2020 23:36:26 +0000 (23:36 +0000)]
buffnum is shared between subs.c and fancy.c

4 years agoDisks can sense vibes, DTrace confirms it.
sevan [Thu, 2 Apr 2020 05:55:02 +0000 (05:55 +0000)]
Disks can sense vibes, DTrace confirms it.
https://youtu.be/tDacjrSCeq4

4 years agoAndrew Weatherall's tattoo and a track on A Pox On The Pioneers album.
sevan [Sat, 22 Feb 2020 19:03:04 +0000 (19:03 +0000)]
Andrew Weatherall's tattoo and a track on A Pox On The Pioneers album.
https://pbs.twimg.com/media/ERAuddhU4AAFv3w?format=jpg&name=orig
Story:
https://www.dummymag.com/features/andrew-weatherall-interview-it-s-bollocks-it-s-discos-tell-me-tales-of-the/

4 years agosomething I apparently forgot to commit months or years ago
dholland [Sun, 16 Feb 2020 23:14:19 +0000 (23:14 +0000)]
something I apparently forgot to commit months or years ago

4 years agogames/hack: Suppress -Werror=stringop-truncation error.
fox [Sat, 8 Feb 2020 00:59:55 +0000 (00:59 +0000)]
games/hack: Suppress -Werror=stringop-truncation error.

Add GCC_NO_STRINGOP_TRUNCATION to hack.end.c to prevent build failure.

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

Reviewed by: kamil@

4 years agogames/hack: Revert the strlcpy(1) change since this changes expected behavior from...
fox [Fri, 7 Feb 2020 22:04:02 +0000 (22:04 +0000)]
games/hack: Revert the strlcpy(1) change since this changes expected behavior from strncpy(3).

Reviewed by: kamil@

4 years agogames/hack: Fix -Wstringop-truncation warning.
fox [Fri, 7 Feb 2020 20:34:18 +0000 (20:34 +0000)]
games/hack:  Fix -Wstringop-truncation warning.

Replace strncpy(3) with strlcpy(3).

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

Reviewed by: kamil@

4 years agogames/battlestar: Replace snprintf(3) with strlcpy(3) for better performance.
fox [Thu, 6 Feb 2020 22:09:43 +0000 (22:09 +0000)]
games/battlestar: Replace snprintf(3) with strlcpy(3) for better performance.

Reviewed by: kamil@

4 years agogames/battlestar: Fix the -Werror=restrict warning.
fox [Wed, 5 Feb 2020 20:11:54 +0000 (20:11 +0000)]
games/battlestar: Fix the -Werror=restrict warning.

Replace strcpy(1) with the safer snprintf(3) which guarantees NULL
termination of strings.

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

Reviewed by: kamil@

5 years agos/saftey/safety/
msaitoh [Fri, 27 Dec 2019 09:17:59 +0000 (09:17 +0000)]
s/saftey/safety/

5 years agos/opration/operation/
msaitoh [Fri, 27 Dec 2019 07:41:22 +0000 (07:41 +0000)]
s/opration/operation/

5 years agoIntrospection. From "Surely You're Joking, Mr. Feynman!"
sevan [Tue, 3 Dec 2019 22:42:29 +0000 (22:42 +0000)]
Introspection. From "Surely You're Joking, Mr. Feynman!"

5 years agohttps://twitter.com/sei6r/status/1182433546331279360
sevan [Sun, 10 Nov 2019 22:42:21 +0000 (22:42 +0000)]
https://twitter.com/sei6r/status/1182433546331279360

5 years agoDefinition of austerity by Alexei Sayle on Radio 4
sevan [Sun, 10 Nov 2019 00:54:57 +0000 (00:54 +0000)]
Definition of austerity by Alexei Sayle on Radio 4
https://web.archive.org/web/20190916192807/https://www.bbc.co.uk/sounds/play/m0008bbc

5 years agoGcc-8 bug confusion with restrict on sh3
christos [Tue, 29 Oct 2019 21:30:42 +0000 (21:30 +0000)]
Gcc-8 bug confusion with restrict on sh3

5 years agoChris' happiest moment
sevan [Sun, 27 Oct 2019 23:31:15 +0000 (23:31 +0000)]
Chris' happiest moment
http://bbc.co.uk/programmes/b09b1zbb

5 years agoadjust a fallthru comment and add a missing break.
mrg [Sun, 13 Oct 2019 07:42:57 +0000 (07:42 +0000)]
adjust a fallthru comment and add a missing break.

5 years agointroduce some common variables for use in GCC warning disables:
mrg [Sun, 13 Oct 2019 07:28:04 +0000 (07:28 +0000)]
introduce some common variables for use in GCC warning disables:

GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.

we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."

5 years agoexpand the internal consistency checks in truedirec() to avoid
mrg [Sat, 5 Oct 2019 23:34:14 +0000 (23:34 +0000)]
expand the internal consistency checks in truedirec() to avoid
fallthrough cases.  now if direction turns up wrong (it should
not, but this code can't tell that, and convert it to an enum
that would also fix this, is more effort than this is worth.

5 years agoconvert HAVE_GCC == 7 to HAVE_GCC >= 7.
mrg [Sun, 29 Sep 2019 23:44:58 +0000 (23:44 +0000)]
convert HAVE_GCC == 7 to HAVE_GCC >= 7.

5 years agoEnd sentence with a dot.
wiz [Mon, 2 Sep 2019 08:26:00 +0000 (08:26 +0000)]
End sentence with a dot.

5 years agoDocument history.
sevan [Sun, 1 Sep 2019 22:50:11 +0000 (22:50 +0000)]
Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which version,
hence I've skipped mentioning it.

5 years agoDonnie Darko
sevan [Thu, 22 Aug 2019 22:51:47 +0000 (22:51 +0000)]
Donnie Darko

5 years agoThe mother of all demos
sevan [Fri, 26 Jul 2019 07:41:22 +0000 (07:41 +0000)]
The mother of all demos

5 years agoUse .Dl for displays with single command. Specify .Bl -width with the
uwe [Tue, 23 Jul 2019 11:02:29 +0000 (11:02 +0000)]
Use .Dl for displays with single command.  Specify .Bl -width with the
same formatting as the actual tags.

5 years agostrfile is installed, don't claim it isn't.
uwe [Tue, 23 Jul 2019 10:40:55 +0000 (10:40 +0000)]
strfile is installed, don't claim it isn't.

5 years agoPrettify formatting.
uwe [Tue, 23 Jul 2019 09:50:27 +0000 (09:50 +0000)]
Prettify formatting.

5 years agoUse double dash to simulate em dash
sevan [Mon, 22 Jul 2019 13:44:13 +0000 (13:44 +0000)]
Use double dash to simulate em dash

5 years agoUse \(em to get an emphasis dash
sevan [Mon, 22 Jul 2019 13:37:37 +0000 (13:37 +0000)]
Use \(em to get an emphasis dash

5 years agoArt for the masses - The Dream Machine
sevan [Mon, 22 Jul 2019 09:47:28 +0000 (09:47 +0000)]
Art for the masses - The Dream Machine
The text used an em dash which I've replaced with a coma here.

5 years agoReport the users score _after_ the game has ended and the screen has
pgoyette [Tue, 19 Mar 2019 00:11:34 +0000 (00:11 +0000)]
Report the users score _after_ the game has ended and the screen has
been restored to pre-game state.  Otherwise, the user gets a message
that their score did (or more likely, did not) improve over their
previous score, yet the user has no indication of what the current
score actually was!