summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade/misc.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-04-29 19:33:06 +0000
committerjkh <jkh@FreeBSD.org>1995-04-29 19:33:06 +0000
commitfe13bd0b5e978f8a7c822e5dd4d039a5981f7204 (patch)
treeab80745bc8d6737d2054b314ccdba01ec7273564 /usr.sbin/sade/misc.c
parent3710598186a6d9cf7b16aac1100f0197134ef8a9 (diff)
downloadFreeBSD-src-fe13bd0b5e978f8a7c822e5dd4d039a5981f7204.zip
FreeBSD-src-fe13bd0b5e978f8a7c822e5dd4d039a5981f7204.tar.gz
o Add extra menu types (radio implemented, multiple choice shortly).
o Make the framework generally more robust. o Figured out how to nest the menu descriptions - no more grotty initialization of menus. o Fix bug with helpline and helpfile not being reset. o Add stubs for the media selection code. Coming next: Fdisk and disklabel screens using Phk's new libdisk stuff.
Diffstat (limited to 'usr.sbin/sade/misc.c')
-rw-r--r--usr.sbin/sade/misc.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.sbin/sade/misc.c b/usr.sbin/sade/misc.c
index e9a5642..4f789e2 100644
--- a/usr.sbin/sade/misc.c
+++ b/usr.sbin/sade/misc.c
@@ -1,7 +1,7 @@
/*
* Miscellaneous support routines..
*
- * $Id$
+ * $Id: misc.c,v 1.1.1.1 1995/04/27 12:50:35 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -99,9 +99,10 @@ safe_free(void *ptr)
}
/*
- * These next two are kind of specialized just for building string lists
+ * These next routines are kind of specialized just for building string lists
* for dialog_menu().
*/
+
/* Add a string to an item list */
char **
item_add(char **list, char *item, int *curr, int *max)
@@ -115,6 +116,15 @@ item_add(char **list, char *item, int *curr, int *max)
return list;
}
+/* Add a pair of items to an item list (more the usual case) */
+char **
+item_add_pair(char **list, char *item1, char *item2, int *curr, int *max)
+{
+ list = item_add(list, item1, curr, max);
+ list = item_add(list, item2, curr, max);
+ return list;
+}
+
/* Toss the items out */
void
items_free(char **list, int *curr, int *max)
OpenPOWER on IntegriCloud