NULL => 0 (Arne Juul; PR#3629)
This commit is contained in:
parent
0914945bfe
commit
58efb9d20c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: io.c,v 1.7 1995/03/21 15:08:53 cgd Exp $ */
|
||||
/* $NetBSD: io.c,v 1.8 1997/05/17 19:26:18 pk Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -37,7 +37,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: io.c,v 1.7 1995/03/21 15:08:53 cgd Exp $";
|
||||
static char rcsid[] = "$NetBSD: io.c,v 1.8 1997/05/17 19:26:18 pk Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -256,10 +256,10 @@ incard(crd)
|
|||
if (!(line = getline()))
|
||||
goto gotit;
|
||||
p = p1 = line;
|
||||
while (*p1 != ' ' && *p1 != NULL)
|
||||
while (*p1 != ' ' && *p1 != '\0')
|
||||
++p1;
|
||||
*p1++ = NULL;
|
||||
if (*p == NULL)
|
||||
*p1++ = '\0';
|
||||
if (*p == '\0')
|
||||
goto gotit;
|
||||
|
||||
/* IMPORTANT: no real card has 2 char first name */
|
||||
|
@ -295,17 +295,17 @@ incard(crd)
|
|||
if (rnk == EMPTY)
|
||||
goto gotit;
|
||||
p = p1;
|
||||
while (*p1 != ' ' && *p1 != NULL)
|
||||
while (*p1 != ' ' && *p1 != '\0')
|
||||
++p1;
|
||||
*p1++ = NULL;
|
||||
if (*p == NULL)
|
||||
*p1++ = '\0';
|
||||
if (*p == '\0')
|
||||
goto gotit;
|
||||
if (!strcmp("OF", p)) {
|
||||
p = p1;
|
||||
while (*p1 != ' ' && *p1 != NULL)
|
||||
while (*p1 != ' ' && *p1 != '\0')
|
||||
++p1;
|
||||
*p1++ = NULL;
|
||||
if (*p == NULL)
|
||||
*p1++ = '\0';
|
||||
if (*p == '\0')
|
||||
goto gotit;
|
||||
}
|
||||
sut = EMPTY;
|
||||
|
@ -354,7 +354,7 @@ number(lo, hi, prompt)
|
|||
|
||||
for (sum = 0;;) {
|
||||
msg(prompt);
|
||||
if (!(p = getline()) || *p == NULL) {
|
||||
if (!(p = getline()) || *p == '\0') {
|
||||
msg(quiet ? "Not a number" :
|
||||
"That doesn't look like a number");
|
||||
continue;
|
||||
|
@ -369,7 +369,7 @@ number(lo, hi, prompt)
|
|||
++p;
|
||||
}
|
||||
|
||||
if (*p != ' ' && *p != '\t' && *p != NULL)
|
||||
if (*p != ' ' && *p != '\t' && *p != '\0')
|
||||
sum = lo - 1;
|
||||
if (sum >= lo && sum <= hi)
|
||||
break;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: score.c,v 1.3 1995/03/21 15:08:57 cgd Exp $ */
|
||||
/* $NetBSD: score.c,v 1.4 1997/05/17 19:26:19 pk Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -37,7 +37,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)score.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: score.c,v 1.3 1995/03/21 15:08:57 cgd Exp $";
|
||||
static char rcsid[] = "$NetBSD: score.c,v 1.4 1997/05/17 19:26:19 pk Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -121,7 +121,7 @@ scorehand(hand, starter, n, crb, do_explain)
|
|||
CARD h[(CINHAND + 1)];
|
||||
char buf[32];
|
||||
|
||||
expl[0] = NULL; /* initialize explanation */
|
||||
expl[0] = '\0'; /* initialize explanation */
|
||||
score = 0;
|
||||
flag = TRUE;
|
||||
k = hand[0].suit;
|
||||
|
@ -137,7 +137,7 @@ scorehand(hand, starter, n, crb, do_explain)
|
|||
}
|
||||
|
||||
if (flag && n >= CINHAND) {
|
||||
if (do_explain && expl[0] != NULL)
|
||||
if (do_explain && expl[0] != '\0')
|
||||
strcat(expl, ", ");
|
||||
if (starter.suit == k) {
|
||||
score += 5;
|
||||
|
@ -146,13 +146,13 @@ scorehand(hand, starter, n, crb, do_explain)
|
|||
} else
|
||||
if (!crb) {
|
||||
score += 4;
|
||||
if (do_explain && expl[0] != NULL)
|
||||
if (do_explain && expl[0] != '\0')
|
||||
strcat(expl, ", Four-flush");
|
||||
else
|
||||
strcpy(expl, "Four-flush");
|
||||
}
|
||||
}
|
||||
if (do_explain && expl[0] != NULL)
|
||||
if (do_explain && expl[0] != '\0')
|
||||
strcat(expl, ", ");
|
||||
h[n] = starter;
|
||||
sorthand(h, n + 1); /* sort by rank */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef lint
|
||||
static char rcsid[] = "$NetBSD: io.c,v 1.5 1996/08/15 03:53:24 mrg Exp $";
|
||||
static char rcsid[] = "$NetBSD: io.c,v 1.6 1997/05/17 19:26:22 pk Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/* io.c Larn is copyrighted 1986 by Noah Morgan.
|
||||
|
@ -416,11 +416,11 @@ char *lgetw()
|
|||
register char *lgp,cc;
|
||||
register int n=LINBUFSIZE,quote=0;
|
||||
lgp = lgetwbuf;
|
||||
do cc=lgetc(); while ((cc <= 32) && (cc > NULL)); /* eat whitespace */
|
||||
do cc=lgetc(); while ((cc <= 32) && (cc > '\0')); /* eat whitespace */
|
||||
for ( ; ; --n,cc=lgetc())
|
||||
{
|
||||
if ((cc==NULL) && (lgp==lgetwbuf)) return(NULL); /* EOF */
|
||||
if ((n<=1) || ((cc<=32) && (quote==0))) { *lgp=NULL; return(lgetwbuf); }
|
||||
if ((cc=='\0') && (lgp==lgetwbuf)) return(NULL); /* EOF */
|
||||
if ((n<=1) || ((cc<=32) && (quote==0))) { *lgp='\0'; return(lgetwbuf); }
|
||||
if (cc != '"') *lgp++ = cc; else quote ^= 1;
|
||||
}
|
||||
}
|
||||
|
@ -436,10 +436,10 @@ char *lgetl()
|
|||
register char *str=lgetwbuf;
|
||||
for ( ; ; --i)
|
||||
{
|
||||
if ((*str++ = ch = lgetc()) == NULL)
|
||||
if ((*str++ = ch = lgetc()) == '\0')
|
||||
{
|
||||
if (str == lgetwbuf+1) return(NULL); /* EOF */
|
||||
ot: *str = NULL; return(lgetwbuf); /* line ended by EOF */
|
||||
ot: *str = '\0'; return(lgetwbuf); /* line ended by EOF */
|
||||
}
|
||||
if ((ch=='\n') || (i<=1)) goto ot; /* line ended by \n */
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: inventory.c,v 1.3 1995/04/22 10:27:35 cgd Exp $ */
|
||||
/* $NetBSD: inventory.c,v 1.4 1997/05/17 19:26:24 pk Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1993
|
||||
|
@ -40,7 +40,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)inventory.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: inventory.c,v 1.3 1995/04/22 10:27:35 cgd Exp $";
|
||||
static char rcsid[] = "$NetBSD: inventory.c,v 1.4 1997/05/17 19:26:24 pk Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -182,9 +182,9 @@ struct id_com_s com_id_tab[COMS] = {
|
|||
'b', "b down & left",
|
||||
'c', "c call object",
|
||||
'n', "n down & right",
|
||||
NULL, "<SHIFT><dir>: run that way",
|
||||
'\0', "<SHIFT><dir>: run that way",
|
||||
')', ") print current weapon",
|
||||
NULL, "<CTRL><dir>: run till adjacent",
|
||||
'\0', "<CTRL><dir>: run till adjacent",
|
||||
']', "] print current armor",
|
||||
'f', "f<dir> fight till death or near death",
|
||||
'=', "= print current rings",
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$Id: atof-ieee.c,v 1.4 1995/12/21 08:54:14 mycroft Exp $";
|
||||
static char rcsid[] = "$Id: atof-ieee.c,v 1.5 1997/05/17 19:24:44 pk Exp $";
|
||||
#endif
|
||||
|
||||
#include "as.h"
|
||||
|
@ -173,7 +173,7 @@ LITTLENUM_TYPE *words; /* Build the binary here. */
|
|||
generic_floating_point_number.low = bits + MAX_PRECISION;
|
||||
generic_floating_point_number.high = NULL;
|
||||
generic_floating_point_number.leader = NULL;
|
||||
generic_floating_point_number.exponent = NULL;
|
||||
generic_floating_point_number.exponent = 0;
|
||||
generic_floating_point_number.sign = '\0';
|
||||
|
||||
/* Use more LittleNums than seems */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bt_seq.c,v 1.7 1996/05/03 21:50:54 cgd Exp $ */
|
||||
/* $NetBSD: bt_seq.c,v 1.8 1997/05/17 19:28:11 pk Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993, 1994
|
||||
|
@ -40,7 +40,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)bt_seq.c 8.7 (Berkeley) 7/20/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: bt_seq.c,v 1.7 1996/05/03 21:50:54 cgd Exp $";
|
||||
static char rcsid[] = "$NetBSD: bt_seq.c,v 1.8 1997/05/17 19:28:11 pk Exp $";
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -364,7 +364,7 @@ __bt_first(t, key, erval, exactp)
|
|||
* page) and return it.
|
||||
*/
|
||||
if ((ep = __bt_search(t, key, exactp)) == NULL)
|
||||
return (NULL);
|
||||
return (0);
|
||||
if (*exactp) {
|
||||
if (F_ISSET(t, B_NODUPS)) {
|
||||
*erval = *ep;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: getcap.c,v 1.11 1997/01/23 14:01:54 mrg Exp $ */
|
||||
/* $NetBSD: getcap.c,v 1.12 1997/05/17 19:29:18 pk Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -40,7 +40,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)getcap.c 8.3 (Berkeley) 3/25/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: getcap.c,v 1.11 1997/01/23 14:01:54 mrg Exp $";
|
||||
static char rcsid[] = "$NetBSD: getcap.c,v 1.12 1997/05/17 19:29:18 pk Exp $";
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -741,7 +741,7 @@ cgetnext(bp, db_array)
|
|||
}
|
||||
}
|
||||
rp = buf;
|
||||
for(cp = nbuf; *cp != NULL; cp++)
|
||||
for(cp = nbuf; *cp != '\0'; cp++)
|
||||
if (*cp == '|' || *cp == ':')
|
||||
break;
|
||||
else
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ftpcmd.y,v 1.9 1997/04/27 03:21:39 lukem Exp $ */
|
||||
/* $NetBSD: ftpcmd.y,v 1.10 1997/05/17 19:32:08 pk Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1985, 1988, 1993, 1994
|
||||
|
@ -46,7 +46,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)ftpcmd.y 8.3 (Berkeley) 4/6/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: ftpcmd.y,v 1.9 1997/04/27 03:21:39 lukem Exp $";
|
||||
static char rcsid[] = "$NetBSD: ftpcmd.y,v 1.10 1997/05/17 19:32:08 pk Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -964,7 +964,7 @@ yylex()
|
|||
}
|
||||
(void) alarm(0);
|
||||
#ifdef HASSETPROCTITLE
|
||||
if (strncasecmp(cbuf, "PASS", 4) != NULL)
|
||||
if (strncasecmp(cbuf, "PASS", 4) != 0)
|
||||
setproctitle("%s: %s", proctitle, cbuf);
|
||||
#endif /* HASSETPROCTITLE */
|
||||
if ((cp = strchr(cbuf, '\r'))) {
|
||||
|
|
Loading…
Reference in New Issue