Subject: Re: sysinst and different ramdisks
To: None <frank@wins.uva.nl>
From: Phil Nelson <philnelson@home.com>
List: tech-install
Date: 01/20/2000 08:13:11
>dhcp support only if it is. I wish there were dynamically configurable
>menus, but since we're currently stuck with menuc, this will not
>happen.
To be more specific about dynamic menus, you can see an example
of dynamic menus in src/usr.bin/menuc/testm. But to summarize,
you specify
allow dynamic menus;
in your menu definition file and that makes the folowing two
routines available. (Yes, I really need to document this.)
int new_menu (char * title, menu_ent * opts, int numopts,
int x, int y, int h, int w, int mopt,
void (*post_act)(void), void (*exit_act), char * help)
void free_menu (int menu_no)
New menu returns a number you can use in a
process_menu (menu_number);
That can process it.
To change entries without changing the number of options, just
change the opts array. To change the number of options, you
would need to do a free_menu() and a new_menu with the correct
data.
I was thinking of trying to write a menuc/sysinst style package
installer so packages could be installed by selecting from
menus.
So what this does is allow for the advantages of static menus
in a menu definition file and also allow for the flexibility
of dynamic menus.
For some history, I started sysinst with ncurses' menu library
and found that I was writing a LOT of code to create menus.
I knew that there was an easier way to create static menus.
But there still was the need to have dynamic menus.
I'll try to improve the menuc documentation before 1.5.
--
Phil Nelson
e-mail: philnelson@home.com (Work: phil@cs.wwu.edu)
web: members.home.com/philnelson