summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-08-28 17:13:16 -0400
committerJune McEnroe <june@causal.agency>2019-08-28 17:13:16 -0400
commit21878fc139bd39bfb476f2c6f76ca9b0c15d6ec8 (patch)
tree85f6ad387ac10524177f8767cc88c66c18a5679c /bin
parentRemove wake (diff)
downloadsrc-21878fc139bd39bfb476f2c6f76ca9b0c15d6ec8.tar.gz
src-21878fc139bd39bfb476f2c6f76ca9b0c15d6ec8.zip
Use rand(3) in beef
Diffstat (limited to 'bin')
-rw-r--r--bin/.gitignore1
-rw-r--r--bin/Makefile2
-rw-r--r--bin/beef.c4
-rw-r--r--bin/man1/beef.18
4 files changed, 5 insertions, 10 deletions
diff --git a/bin/.gitignore b/bin/.gitignore
index 25d7499a..5013166a 100644
--- a/bin/.gitignore
+++ b/bin/.gitignore
@@ -32,7 +32,6 @@ shotty
 tags
 ttpre
 up
-wake
 wat
 when
 xx
diff --git a/bin/Makefile b/bin/Makefile
index 7bffb1f9..bf096907 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -19,6 +19,7 @@ LDLIBS_x11 = ${LDLIBS} -lX11
 -include config.mk
 
 BINS_ANY += aes
+BINS_ANY += beef
 BINS_ANY += bit
 BINS_ANY += dtch
 BINS_ANY += glitch
@@ -42,7 +43,6 @@ LINKS_ANY += open
 LINKS_ANY += pbcopy
 LINKS_ANY += pbpaste
 
-BINS_BSD += beef
 BINS_BSD += wat
 
 BINS_GFX += brot
diff --git a/bin/beef.c b/bin/beef.c
index 556742d9..b2579b73 100644
--- a/bin/beef.c
+++ b/bin/beef.c
@@ -20,6 +20,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sysexits.h>
+#include <time.h>
 
 enum {
 	Cols = 80,
@@ -78,7 +79,7 @@ static bool step(void) {
 		return true;
 	}
 
-	if (ch == '?') ch = "><^v"[arc4random_uniform(4)];
+	if (ch == '?') ch = "><^v"[rand() % 4];
 
 	long x, y, v;
 	switch (ch) {
@@ -114,6 +115,7 @@ static bool step(void) {
 }
 
 int main(int argc, char *argv[]) {
+	srand(time(NULL));
 	memset(page, ' ', sizeof(page));
 
 	FILE *file = stdin;
diff --git a/bin/man1/beef.1 b/bin/man1/beef.1
index c42152d8..ea52cfa0 100644
--- a/bin/man1/beef.1
+++ b/bin/man1/beef.1
@@ -1,4 +1,4 @@
-.Dd January 26, 2019
+.Dd August 28, 2019
 .Dt BEEF 1
 .Os
 .
@@ -89,9 +89,3 @@ or 0 if the stack is left empty.
 .%D September, 1993
 .%U https://github.com/catseye/Befunge-93/blob/master/doc/Befunge-93.markdown
 .Re
-.
-.Sh CAVEATS
-.Nm
-does not support Linux
-since it uses
-.Xr arc4random_uniform 3 .
>2012-01-30Set shiftwidth to 4 for LuaJune McEnroe 2012-01-29Don't show Syntastic errors automaticallyJune McEnroe 2012-01-28Update to Quicktask 1.1June McEnroe 2012-01-22Use space-test branch of quicktaskJune McEnroe 2012-01-22Enable syntax-based foldingJune McEnroe 2012-01-22Update quicktaskJune McEnroe 2012-01-22Revert "Add AutoClose"June McEnroe This reverts commit 39cfdd62ba82f93f68a2b5fa7b5771303d8b9dee. This fixes the delay when leaving insert mode 2012-01-22Revert "Disable powerline for now"June McEnroe This reverts commit fa48f5965c57272e616721d92475cd2f1e35f667. 2012-01-22Revert "Add VCS repo directories to wildignore"June McEnroe This reverts commit 41cb1db33ba7b64d8af63bf55bb82f7e8a617518. This fixes not being able to commit with vim-fugitive 2012-01-22Disable powerline for nowJune McEnroe 2012-01-22Update some pluginsJune McEnroe 2012-01-22Add VCS repo directories to wildignoreJune McEnroe 2012-01-22Map ,e and ,b to CtrlP file and buffer respectivelyJune McEnroe 2012-01-22Add vim-spaceJune McEnroe 2012-01-22Add AutoCloseJune McEnroe 2012-01-22Add binding for GundoJune McEnroe 2012-01-22Add GundoJune McEnroe 2012-01-22Add Jellybeans colorschemeJune McEnroe 2012-01-22Add syntasticJune McEnroe 2012-01-21Add PowerlineJune McEnroe 2012-01-21Add quicktaskJune McEnroe 2012-01-15Moved comments out of mapsJune McEnroe 2012-01-14Disable scrollbarsJune McEnroe