[BACK]Return to patch-ab CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / games / sex / patches

File: [cvs.NetBSD.org] / pkgsrc / games / sex / patches / patch-ab (download)

Revision 1.2, Sun Jun 12 04:47:26 2011 UTC (10 years, 5 months ago) by dholland
Branch: MAIN
CVS Tags: pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3, pkgsrc-2012Q2-base, pkgsrc-2012Q2, pkgsrc-2012Q1-base, pkgsrc-2012Q1, pkgsrc-2011Q4-base, pkgsrc-2011Q4, pkgsrc-2011Q3-base, pkgsrc-2011Q3, pkgsrc-2011Q2-base, pkgsrc-2011Q2, HEAD
Changes since 1.1: +32 -4 lines

Fix build problem on Minix and a couple other minor C issues I noticed
while passing by. Closes PR 45048 from Thomas Cort.

$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++;