pkgsrc/games/sex/patches/patch-ab
dholland f0cc3ee9c5 Fix build problem on Minix and a couple other minor C issues I noticed
while passing by. Closes PR 45048 from Thomas Cort.
2011-06-12 04:47:26 +00:00

41 lines
1 KiB
Text

$NetBSD: patch-ab,v 1.2 2011/06/12 04:47:26 dholland Exp $
- use correct C constructs
--- sex.c.orig 2001-04-28 17:21:29.000000000 +0000
+++ sex.c
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <time.h>
#include <ctype.h>
@@ -240,7 +241,7 @@ TABLE list[] = {
{his, SZ(his)}, {dongadj, SZ(dongadj)},
{dong, SZ(dong)}, {intoher, SZ(intoher)},
{twatadj, SZ(twatadj)}, {twat, SZ(twat)},
- {(char **)NULL, (short)NULL},
+ {NULL, 0},
};
#define LLINE 50
@@ -252,7 +253,7 @@ int main(int argc, char **argv)
register TABLE *ttp;
register char *cp;
int getpid();
- long now;
+ time_t now;
char buffer[2048];
int pos, lastword;
@@ -279,7 +280,7 @@ int main(int argc, char **argv)
buffer[lastword] = '\n';
lwidth = pos - lastword;
}
- if (isspace(*cp)) {
+ if (isspace((unsigned char)*cp)) {
lastword = pos;
}
pos++;