| 1 |
Index: athena-jot-9.0/Makefile.in |
| 2 |
=================================================================== |
| 3 |
--- athena-jot-9.0.orig/Makefile.in |
| 4 |
+++ athena-jot-9.0/Makefile.in |
| 5 |
@@ -20,8 +20,8 @@ ALL_CFLAGS=-I. ${CPPFLAGS} ${CFLAGS} |
| 6 |
|
| 7 |
all: jot |
| 8 |
|
| 9 |
-jot: jot.o |
| 10 |
- ${CC} ${LDFLAGS} -o jot jot.o ${LIBS} |
| 11 |
+jot: jot.o debian/randnum.o |
| 12 |
+ ${CC} ${LDFLAGS} -o jot jot.o randnum.o ${LIBS} |
| 13 |
|
| 14 |
.c.o: |
| 15 |
${CC} -c ${ALL_CFLAGS} $< |
| 16 |
@@ -35,7 +35,7 @@ install: |
| 17 |
${INSTALL} -m 444 ${srcdir}/jot.1 ${DESTDIR}${mandir}/man1 |
| 18 |
|
| 19 |
clean: |
| 20 |
- rm -f jot.o jot |
| 21 |
+ rm -f jot.o jot randnum.o |
| 22 |
|
| 23 |
distclean: clean |
| 24 |
rm -f config.cache config.log config.status Makefile |
| 25 |
Index: athena-jot-9.0/jot.c |
| 26 |
=================================================================== |
| 27 |
--- athena-jot-9.0.orig/jot.c |
| 28 |
+++ athena-jot-9.0/jot.c |
| 29 |
@@ -58,6 +58,7 @@ static char rcsid[] = "$NetBSD: jot.c,v |
| 30 |
#include <stdlib.h> |
| 31 |
#include <string.h> |
| 32 |
#include <time.h> |
| 33 |
+#include <limits.h> |
| 34 |
#include "config.h" |
| 35 |
|
| 36 |
#if !defined(HAVE_SRANDOM) || !defined(HAVE_SRANDOM) |
| 37 |
@@ -96,6 +97,7 @@ void getargs(int, char *[]); |
| 38 |
void getformat(void); |
| 39 |
int getprec(char *); |
| 40 |
void putdata(double, long); |
| 41 |
+long int pw_random_number(long int max_num); |
| 42 |
|
| 43 |
int |
| 44 |
main(argc, argv) |
| 45 |
@@ -114,7 +116,7 @@ main(argc, argv) |
| 46 |
getargs(argc, argv); |
| 47 |
if (randomize) { |
| 48 |
*x = (ender - begin) * (ender > begin ? 1 : -1); |
| 49 |
- srandom((int) s); |
| 50 |
+ srandom(pw_random_number(LONG_MAX)); |
| 51 |
range = *x + 1; |
| 52 |
for (*i = 1; *i <= reps || infinity; (*i)++) { |
| 53 |
do { |