-/* $OpenBSD: genget.c,v 1.4 2014/07/20 06:39:41 guenther Exp $ */
+/* $OpenBSD: genget.c,v 1.5 2014/07/20 10:32:23 jsg Exp $ */
/*-
* Copyright (c) 1991, 1993
char **c, **found;
int n;
- if (name == 0)
- return 0;
+ if (name == NULL)
+ return (NULL);
- found = 0;
- for (c = table; *c != 0; c = (char **)((char *)c + stlen)) {
+ found = NULL;
+ for (c = table; *c != NULL; c = (char **)((char *)c + stlen)) {
if ((n = isprefix(name, *c)) == 0)
continue;
if (n < 0) /* exact match */
-/* $OpenBSD: main.c,v 1.27 2014/07/20 10:18:10 guenther Exp $ */
+/* $OpenBSD: main.c,v 1.28 2014/07/20 10:32:23 jsg Exp $ */
/* $NetBSD: main.c,v 1.5 1996/02/28 21:04:05 thorpej Exp $ */
/*
*argp++ = argv[0]; /* host */
if (argc > 1)
*argp++ = argv[1]; /* port */
- *argp = 0;
+ *argp = NULL;
if (setjmp(toplevel) != 0)
Exit(0);
}
(void)setjmp(toplevel);
for (;;) {
- command(1, 0, 0);
+ command(1, NULL, 0);
}
return 0;
}
-/* $OpenBSD: ring.c,v 1.9 2014/07/20 09:59:42 guenther Exp $ */
+/* $OpenBSD: ring.c,v 1.10 2014/07/20 10:32:23 jsg Exp $ */
/* $NetBSD: ring.c,v 1.7 1996/02/28 21:04:07 thorpej Exp $ */
/*
ring_clear_mark(ring)
Ring *ring;
{
- ring->mark = 0;
+ ring->mark = NULL;
}
/*
if (ring->mark &&
(ring_subtract(ring, ring->mark, ring->consume) < count)) {
- ring->mark = 0;
+ ring->mark = NULL;
}
ring->consume = ring_increment(ring, ring->consume, count);
ring->consumetime = ++ring_clock;
ring_full_count(ring)
Ring *ring;
{
- if ((ring->mark == 0) || (ring->mark == ring->consume)) {
+ if ((ring->mark == NULL) || (ring->mark == ring->consume)) {
if (ring_full(ring)) {
return ring->size; /* nothing consumed, but full */
} else {
ring_full_consecutive(ring)
Ring *ring;
{
- if ((ring->mark == 0) || (ring->mark == ring->consume)) {
+ if ((ring->mark == NULL) || (ring->mark == ring->consume)) {
if ((ring->supply < ring->consume) || ring_full(ring)) {
return ring_subtract(ring, ring->top, ring->consume);
} else {
-/* $OpenBSD: telnet.c,v 1.26 2014/07/20 10:18:10 guenther Exp $ */
+/* $OpenBSD: telnet.c,v 1.27 2014/07/20 10:32:23 jsg Exp $ */
/* $NetBSD: telnet.c,v 1.7 1996/02/28 21:04:15 thorpej Exp $ */
/*
globalmode,
clienteof = 0;
-char *prompt = 0;
+char *prompt = NULL;
int scheduler_lockout_tty = 0;
int is_unique(char *, char **, char **);
static char *name_unknown = "UNKNOWN";
-static char *unknown[] = { 0, 0 };
+static char *unknown[] = { NULL, NULL };
char **
mklist(buf, name)
if (name) {
if ((int)strlen(name) > 40) {
- name = 0;
+ name = NULL;
unknown[0] = name_unknown;
} else {
unknown[0] = name;
* Allocate an array to put the name pointers into
*/
argv = (char **)malloc((n+3)*sizeof(char *));
- if (argv == 0)
+ if (argv == NULL)
return(unknown);
/*
* Fill up the array of pointers to names.
*/
- *argv = 0;
+ *argv = NULL;
argvp = argv+1;
n = 0;
for (cp = cp2 = buf; (c = *cp); cp++) {
*/
cp = *(argvp-1);
*argvp++ = cp;
- *argvp = 0;
+ *argvp = NULL;
- if (*argv == 0) {
+ if (*argv == NULL) {
if (name)
*argv = name;
else {
gettermname()
{
char *tname;
- static char **tnamep = 0;
+ static char **tnamep = NULL;
static char **next;
int errret;
}
next = tnamep;
}
- if (*next == 0)
+ if (*next == NULL)
next = tnamep;
return(*next++);
}
localchars = 1;
for (spcp = spc_data; spcp < &spc_data[NSLC+1]; spcp++) {
spcp->val = 0;
- spcp->valp = 0;
+ spcp->valp = NULL;
spcp->flags = spcp->mylevel = SLC_NOSUPPORT;
}