summaryrefslogtreecommitdiff
path: root/usr.bin/mg/help.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-05-23 16:14:01 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-05-23 16:14:01 +0000
commit98f21610df433af5bf3bed095d14bfd525152020 (patch)
treea6923088a471fb0bd25b752713277feeff28f3dc /usr.bin/mg/help.c
parent9fc9a4c5b1362421e02277bc418447dce05c82c2 (diff)
Get rid of 'prefix' and use NULL instead.
Diffstat (limited to 'usr.bin/mg/help.c')
-rw-r--r--usr.bin/mg/help.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/mg/help.c b/usr.bin/mg/help.c
index 928b3247164..8358a3884eb 100644
--- a/usr.bin/mg/help.c
+++ b/usr.bin/mg/help.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: help.c,v 1.4 2001/01/29 01:58:07 niklas Exp $ */
+/* $OpenBSD: help.c,v 1.5 2001/05/23 16:14:00 art Exp $ */
/*
* Help functions for Mg 2
@@ -52,7 +52,7 @@ desckey(f, n)
pep[-1] = ' ';
pep = keyname(pep, key.k_chars[key.k_count++] =
c = getkey(FALSE));
- if ((funct = doscan(curmap, c)) != prefix)
+ if ((funct = doscan(curmap, c)) != NULL)
break;
*pep++ = '-';
*pep = '\0';
@@ -63,7 +63,7 @@ desckey(f, n)
if (ISUPPER(key.k_chars[key.k_count - 1])) {
funct = doscan(curmap,
TOLOWER(key.k_chars[key.k_count - 1]));
- if (funct == prefix) {
+ if (funct == NULL) {
*pep++ = '-';
*pep = '\0';
curmap = ele->k_prefmap;
@@ -78,7 +78,7 @@ nextmode:
curmap = curbp->b_modes[m]->p_map;
for (i = 0; i < key.k_count; i++) {
funct = doscan(curmap, key.k_chars[i]);
- if (funct != prefix) {
+ if (funct != NULL) {
if (i == key.k_count - 1 && funct != rescan)
goto found;
funct = rescan;
@@ -162,7 +162,7 @@ showall(ind, map)
for (i = ele->k_base; i <= last; i++) {
functp = ele->k_funcp[i - ele->k_base];
if (functp != rescan) {
- if (functp != prefix)
+ if (functp != NULL)
cp2 = function_name(functp);
else
cp2 = map_name(ele->k_prefmap);
@@ -182,7 +182,7 @@ showall(ind, map)
ele < &map->map_element[map->map_num]; ele++) {
if (ele->k_prefmap != NULL) {
for (i = ele->k_base;
- ele->k_funcp[i - ele->k_base] != prefix; i++) {
+ ele->k_funcp[i - ele->k_base] != NULL; i++) {
if (i >= ele->k_num)
/* damaged map */
return FALSE;
@@ -275,7 +275,7 @@ findbind(funct, ind, map)
last = ele->k_num;
for (i = ele->k_base; i <= last; i++) {
if (funct == ele->k_funcp[i - ele->k_base]) {
- if (funct == prefix) {
+ if (funct == NULL) {
cp = map_name(ele->k_prefmap);
if (!cp ||
strncmp(cp, buf2, strlen(cp)) != 0)
@@ -290,7 +290,7 @@ findbind(funct, ind, map)
ele < &map->map_element[map->map_num]; ele++) {
if (ele->k_prefmap != NULL) {
for (i = ele->k_base;
- ele->k_funcp[i - ele->k_base] != prefix; i++) {
+ ele->k_funcp[i - ele->k_base] != NULL; i++) {
if (i >= ele->k_num)
/* damaged */
return;