summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade/dmenu.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-05-16 02:53:31 +0000
committerjkh <jkh@FreeBSD.org>1995-05-16 02:53:31 +0000
commit78baa7daa2277e0e7dd73a985847ead284b36551 (patch)
tree613dfed0fbc81719d1686eec3d022f605e6f0a22 /usr.sbin/sade/dmenu.c
parent9de827c98085791c80cf2d99d483e6af2bb0249c (diff)
downloadFreeBSD-src-78baa7daa2277e0e7dd73a985847ead284b36551.zip
FreeBSD-src-78baa7daa2277e0e7dd73a985847ead284b36551.tar.gz
This does _not yet compile_; I'm simply bringing in my changes from
this weekend in order to more easily sync with my CVS tree at home. Another commit relative to these changes will follow shortly.
Diffstat (limited to 'usr.sbin/sade/dmenu.c')
-rw-r--r--usr.sbin/sade/dmenu.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/usr.sbin/sade/dmenu.c b/usr.sbin/sade/dmenu.c
index 7c43ed2..d10167c 100644
--- a/usr.sbin/sade/dmenu.c
+++ b/usr.sbin/sade/dmenu.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
- * $Id: dmenu.c,v 1.6 1995/05/10 08:00:47 jkh Exp $
+ * $Id: dmenu.c,v 1.7 1995/05/11 06:10:50 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -47,6 +47,16 @@
static DMenuItem shellAction = { NULL, NULL, DMENU_SHELL_ESCAPE, NULL, 0 };
+/* Traverse menu but give user no control over positioning */
+void
+dmenuOpenSimple(DMenu *menu)
+{
+ int choice, scroll, curr, max;
+
+ choice = scroll = curr = max = 0;
+ dmenuOpen(menu, &choice, &scroll, &curr, &max);
+}
+
/* Traverse over an internal menu */
void
dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
@@ -139,7 +149,8 @@ dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
items_free(nitems, curr, max);
return;
}
- if (dispatch(tmp, result) || menu->options & DMENU_SELECTION_RETURNS) {
+ if (dispatch(tmp, result) ||
+ menu->options & DMENU_SELECTION_RETURNS) {
items_free(nitems, curr, max);
return;
}
OpenPOWER on IntegriCloud