diff options
author | dwcjr <dwcjr@FreeBSD.org> | 2001-06-14 13:43:44 +0800 |
---|---|---|
committer | dwcjr <dwcjr@FreeBSD.org> | 2001-06-14 13:43:44 +0800 |
commit | b2bcfcf0780b2c84c1cb3a83c548ad2aba9f1c8c (patch) | |
tree | b8ad87d7696be7f9e90ef5480f0dad448ff6b77f /misc/shuffle/files | |
parent | afce509c671f8e933783fdfcbedaa663019076de (diff) | |
download | freebsd-ports-gnome-b2bcfcf0780b2c84c1cb3a83c548ad2aba9f1c8c.tar.gz freebsd-ports-gnome-b2bcfcf0780b2c84c1cb3a83c548ad2aba9f1c8c.tar.zst freebsd-ports-gnome-b2bcfcf0780b2c84c1cb3a83c548ad2aba9f1c8c.zip |
Add, shuffle(1) from NetBSD, a program that prints a random
permutation of its input lines
PR: 28089
Submitted by: dd
Obtained from: NetBSD
Diffstat (limited to 'misc/shuffle/files')
-rw-r--r-- | misc/shuffle/files/patch-aa | 24 | ||||
-rw-r--r-- | misc/shuffle/files/patch-shuffle.c | 15 |
2 files changed, 39 insertions, 0 deletions
diff --git a/misc/shuffle/files/patch-aa b/misc/shuffle/files/patch-aa new file mode 100644 index 000000000000..a28e43cd5b21 --- /dev/null +++ b/misc/shuffle/files/patch-aa @@ -0,0 +1,24 @@ +Index: shuffle.c +=================================================================== +RCS file: /stl/src/NetBSD/basesrc/usr.bin/shuffle/shuffle.c,v +retrieving revision 1.9 +diff -u -r1.9 shuffle.c +--- shuffle.c 2001/03/16 08:02:32 1.9 ++++ shuffle.c 2001/06/03 22:21:49 +@@ -37,6 +37,7 @@ + #endif /* not lint */ + + #include <err.h> ++#include <limits.h> + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +@@ -255,7 +256,7 @@ + nlines = pick; + } + +- for (i = 0; i < nlines; i++) { ++ for (i = 0; (unsigned)i < nlines; i++) { + if (nflag) + printf("%ld\n", (long)shuffle[i]); + else diff --git a/misc/shuffle/files/patch-shuffle.c b/misc/shuffle/files/patch-shuffle.c new file mode 100644 index 000000000000..af3a9b5e7d26 --- /dev/null +++ b/misc/shuffle/files/patch-shuffle.c @@ -0,0 +1,15 @@ +--- shuffle.c.orig Wed Jun 13 22:07:36 2001 ++++ shuffle.c Wed Jun 13 22:07:36 2001 +@@ -133,10 +133,11 @@ + static void + usage() + { ++ extern const char *__progname; + + (void) fprintf(stderr, + "Usage: %s [-f <filename>] [-n <number>] [-p <number>] [<arg> ...]\n", +- getprogname()); ++ __progname); + exit(1); + } + |