aboutsummaryrefslogtreecommitdiffstats
path: root/misc/shuffle/files
diff options
context:
space:
mode:
authordwcjr <dwcjr@FreeBSD.org>2001-06-14 13:43:44 +0800
committerdwcjr <dwcjr@FreeBSD.org>2001-06-14 13:43:44 +0800
commitb2bcfcf0780b2c84c1cb3a83c548ad2aba9f1c8c (patch)
treeb8ad87d7696be7f9e90ef5480f0dad448ff6b77f /misc/shuffle/files
parentafce509c671f8e933783fdfcbedaa663019076de (diff)
downloadfreebsd-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-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);
+ }
+