summaryrefslogtreecommitdiff
path: root/misc/shuffle/files
diff options
context:
space:
mode:
authorDavid W. Chapman Jr. <dwcjr@FreeBSD.org>2001-06-14 05:43:44 +0000
committerDavid W. Chapman Jr. <dwcjr@FreeBSD.org>2001-06-14 05:43:44 +0000
commit5fb696385158c428ef9619f17b7f3199140e66e8 (patch)
tree822c3efd5cfba9c10512bae2459e110c74f54e02 /misc/shuffle/files
parentupgrade to 2.1.0 (diff)
Add, shuffle(1) from NetBSD, a program that prints a random
permutation of its input lines PR: 28089 Submitted by: dd Obtained from: NetBSD
Notes
Notes: svn path=/head/; revision=43973
Diffstat (limited to 'misc/shuffle/files')
-rw-r--r--misc/shuffle/files/patch-aa24
-rw-r--r--misc/shuffle/files/patch-shuffle.c15
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);
+ }
+