Module Name: src
Committed By: christos
Date: Sat Apr 9 18:47:05 UTC 2016
Modified Files:
src/lib/libedit: filecomplete.c vi.c
Log Message:
Change some 0's to NULL's from Pedro Giffuni
To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/lib/libedit/filecomplete.c
cvs rdiff -u -r1.56 -r1.57 src/lib/libedit/vi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libedit/filecomplete.c
diff -u src/lib/libedit/filecomplete.c:1.40 src/lib/libedit/filecomplete.c:1.41
--- src/lib/libedit/filecomplete.c:1.40 Wed Feb 17 14:47:49 2016
+++ src/lib/libedit/filecomplete.c Sat Apr 9 14:47:05 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: filecomplete.c,v 1.40 2016/02/17 19:47:49 christos Exp $ */
+/* $NetBSD: filecomplete.c,v 1.41 2016/04/09 18:47:05 christos Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include "config.h"
#if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: filecomplete.c,v 1.40 2016/02/17 19:47:49 christos Exp $");
+__RCSID("$NetBSD: filecomplete.c,v 1.41 2016/04/09 18:47:05 christos Exp $");
#endif /* not lint && not SCCSID */
#include <sys/types.h>
@@ -449,7 +449,7 @@ fn_complete(EditLine *el,
/* these can be used by function called in completion_matches() */
/* or (*attempted_completion_function)() */
- if (point != 0)
+ if (point != NULL)
*point = (int)(li->cursor - li->buffer);
if (end != NULL)
*end = (int)(li->lastchar - li->buffer);
@@ -460,7 +460,7 @@ fn_complete(EditLine *el,
ct_encode_string(temp, &el->el_scratch),
cur_off - (int)len, cur_off);
} else
- matches = 0;
+ matches = NULL;
if (!attempted_completion_function ||
(over != NULL && !*over && !matches))
matches = completion_matches(
Index: src/lib/libedit/vi.c
diff -u src/lib/libedit/vi.c:1.56 src/lib/libedit/vi.c:1.57
--- src/lib/libedit/vi.c:1.56 Sat Apr 9 14:43:17 2016
+++ src/lib/libedit/vi.c Sat Apr 9 14:47:05 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: vi.c,v 1.56 2016/04/09 18:43:17 christos Exp $ */
+/* $NetBSD: vi.c,v 1.57 2016/04/09 18:47:05 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)vi.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: vi.c,v 1.56 2016/04/09 18:43:17 christos Exp $");
+__RCSID("$NetBSD: vi.c,v 1.57 2016/04/09 18:47:05 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -1092,7 +1092,7 @@ vi_history_word(EditLine *el, wint_t c _
if (wp == NULL)
return CC_ERROR;
- wep = wsp = 0;
+ wep = wsp = NULL;
do {
while (iswspace(*wp))
wp++;
@@ -1105,7 +1105,7 @@ vi_history_word(EditLine *el, wint_t c _
} while ((!el->el_state.doingarg || --el->el_state.argument > 0)
&& *wp != 0);
- if (wsp == 0 || (el->el_state.doingarg && el->el_state.argument != 0))
+ if (wsp == NULL || (el->el_state.doingarg && el->el_state.argument != 0))
return CC_ERROR;
cv_undo(el);