Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/menuc Use OPT_NOMENU as error return for new_menu (i...
details: https://anonhg.NetBSD.org/src/rev/72c4397cd799
branches: trunk
changeset: 999905:72c4397cd799
user: martin <martin%NetBSD.org@localhost>
date: Sun Jun 23 11:22:48 2019 +0000
description:
Use OPT_NOMENU as error return for new_menu (instead of old hard coded -1).
Update man page for the OPT_NOMENU change.
diffstat:
usr.bin/menuc/menu_sys.def | 6 +++---
usr.bin/menuc/menuc.1 | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diffs (42 lines):
diff -r b669baa65bda -r 72c4397cd799 usr.bin/menuc/menu_sys.def
--- a/usr.bin/menuc/menu_sys.def Sun Jun 23 06:33:17 2019 +0000
+++ b/usr.bin/menuc/menu_sys.def Sun Jun 23 11:22:48 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: menu_sys.def,v 1.70 2019/06/22 20:44:54 christos Exp $ */
+/* $NetBSD: menu_sys.def,v 1.71 2019/06/23 11:22:48 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -859,12 +859,12 @@
/* Find free menu entry. */
for (ix = DYN_MENU_START; ; ix++) {
if (ix >= num_menus && !double_menus())
- return -1;
+ return OPT_NOMENU;
m = menu_list[ix];
if (m == NULL) {
m = calloc(sizeof *m, 1);
if (m == NULL)
- return -1;
+ return OPT_NOMENU;
menu_list[ix] = m;
break;
}
diff -r b669baa65bda -r 72c4397cd799 usr.bin/menuc/menuc.1
--- a/usr.bin/menuc/menuc.1 Sun Jun 23 06:33:17 2019 +0000
+++ b/usr.bin/menuc/menuc.1 Sun Jun 23 11:22:48 2019 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: menuc.1,v 1.37 2019/02/25 20:47:37 martin Exp $
+.\" $NetBSD: menuc.1,v 1.38 2019/06/23 11:22:48 martin Exp $
.\"
.\" Copyright 1997 Piermont Information Systems Inc.
.\" All rights reserved.
@@ -424,7 +424,7 @@
} menu_ent ;
/* For opt_menu */
-#define OPT_NOMENU -1
+#define OPT_NOMENU 0
/* For opt_flags */
#define OPT_SUB 1
Home |
Main Index |
Thread Index |
Old Index