iPXE
form_ui.c File Reference

Text widget forms. More...

#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <ipxe/ansicol.h>
#include <ipxe/dynui.h>
#include <ipxe/jumpscroll.h>
#include <ipxe/settings.h>
#include <ipxe/editbox.h>
#include <ipxe/message.h>

Go to the source code of this file.

Data Structures

struct  form
 A form. More...
struct  form_control
 A form control. More...

Macros

#define TITLE_ROW   1U
 Form title row.
#define START_ROW   3U
 Starting control row.
#define END_ROW   ( LINES - 3U )
 Ending control row.
#define INSTRUCTION_ROW   ( LINES - 2U )
 Instructions row.
#define INSTRUCTION_PAD   " "
 Padding between instructions.
#define INPUT_WIDTH   ( COLS / 2U )
 Input field width.
#define INPUT_COL   ( ( COLS - INPUT_WIDTH ) / 2U )
 Input field column.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 FILE_SECBOOT (PERMITTED)
static struct formalloc_form (struct dynamic_ui *dynui)
 Allocate form.
static void free_form (struct form *form)
 Free form.
static int layout_form (struct form *form)
 Assign form rows.
static void draw_form (struct form *form)
 Draw form.
static void draw_errors (struct form *form)
 Draw (or clear) error messages.
static int parse_names (struct form *form)
 Parse setting names.
static void load_values (struct form *form)
 Load current input values.
static int save_values (struct form *form)
 Store current input values.
static int submit_form (struct form *form)
 Submit form.
static int form_loop (struct form *form)
 Form main loop.
int show_form (struct dynamic_ui *dynui)
 Show form.

Detailed Description

Text widget forms.

Definition in file form_ui.c.

Macro Definition Documentation

◆ TITLE_ROW

#define TITLE_ROW   1U

Form title row.

Definition at line 44 of file form_ui.c.

Referenced by draw_form(), draw_title_row(), and show_menu().

◆ START_ROW

#define START_ROW   3U

Starting control row.

Definition at line 47 of file form_ui.c.

Referenced by layout_form().

◆ END_ROW

#define END_ROW   ( LINES - 3U )

Ending control row.

Definition at line 50 of file form_ui.c.

Referenced by layout_form().

◆ INSTRUCTION_ROW

#define INSTRUCTION_ROW   ( LINES - 2U )

Instructions row.

Definition at line 53 of file form_ui.c.

Referenced by draw_form(), and draw_instruction_row().

◆ INSTRUCTION_PAD

#define INSTRUCTION_PAD   " "

Padding between instructions.

Definition at line 56 of file form_ui.c.

Referenced by draw_form(), and draw_instruction_row().

◆ INPUT_WIDTH

#define INPUT_WIDTH   ( COLS / 2U )

Input field width.

Definition at line 59 of file form_ui.c.

Referenced by layout_form().

◆ INPUT_COL

#define INPUT_COL   ( ( COLS - INPUT_WIDTH ) / 2U )

Input field column.

Definition at line 62 of file form_ui.c.

Referenced by layout_form().

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

◆ alloc_form()

struct form * alloc_form ( struct dynamic_ui * dynui)
static

Allocate form.

Parameters
dynuiDynamic user interface
Return values
formForm, or NULL on error

Definition at line 100 of file form_ui.c.

100 {
101 struct form *form;
102 struct form_control *control;
103 struct dynamic_item *item;
104 char *name;
105 size_t len;
106
107 /* Calculate total length */
108 len = sizeof ( *form );
109 list_for_each_entry ( item, &dynui->items, list ) {
110 len += sizeof ( *control );
111 if ( item->name )
112 len += ( strlen ( item->name ) + 1 /* NUL */ );
113 }
114
115 /* Allocate and initialise structure */
116 form = zalloc ( len );
117 if ( ! form )
118 return NULL;
119 control = ( ( ( void * ) form ) + sizeof ( *form ) );
120 name = ( ( ( void * ) control ) +
121 ( dynui->count * sizeof ( *control ) ) );
122 form->dynui = dynui;
124 list_for_each_entry ( item, &dynui->items, list ) {
125 control->item = item;
126 if ( item->name ) {
127 control->name = name;
128 name = ( stpcpy ( name, item->name ) + 1 /* NUL */ );
129 }
130 control++;
131 }
132 assert ( ( ( void * ) name ) == ( ( ( void * ) form ) + len ) );
133
134 return form;
135}
#define NULL
NULL pointer (VOID *)
Definition Base.h:322
#define assert(condition)
Assert a condition at run-time.
Definition assert.h:50
const char * name
Definition ath9k_hw.c:1986
ring len
Length.
Definition dwmac.h:226
#define list_for_each_entry(pos, head, member)
Iterate over entries in a list.
Definition list.h:432
void * zalloc(size_t size)
Allocate cleared memory.
Definition malloc.c:662
uint32_t control
Control.
Definition myson.h:3
char * stpcpy(char *dest, const char *src)
Copy string.
Definition string.c:327
size_t strlen(const char *src)
Get length of string.
Definition string.c:244
A dynamic user interface item.
Definition dynui.h:30
struct list_head list
List of dynamic user interface items.
Definition dynui.h:32
const char * name
Name.
Definition dynui.h:34
unsigned int count
Number of user interface items.
Definition dynui.h:26
struct list_head items
Dynamic user interface items.
Definition dynui.h:24
A form control.
Definition form_ui.c:75
A form.
Definition form_ui.c:65
struct dynamic_ui * dynui
Dynamic user interface.
Definition form_ui.c:67
struct form_control * controls
Array of form controls.
Definition form_ui.c:71

References assert, control, form::controls, dynamic_ui::count, form::dynui, dynamic_ui::items, len, dynamic_item::list, list_for_each_entry, dynamic_item::name, name, NULL, stpcpy(), strlen(), and zalloc().

Referenced by show_form().

◆ free_form()

void free_form ( struct form * form)
static

Free form.

Parameters
formForm

Definition at line 142 of file form_ui.c.

142 {
143 unsigned int i;
144
145 /* Free input value buffers */
146 for ( i = 0 ; i < form->dynui->count ; i++ )
147 free ( form->controls[i].value );
148
149 /* Free form */
150 free ( form );
151}
static void(* free)(struct refcnt *refcnt))
Definition refcnt.h:55
char * value
Modifiable setting value.
Definition form_ui.c:89

References form::controls, dynamic_ui::count, form::dynui, free, and form_control::value.

Referenced by show_form().

◆ layout_form()

int layout_form ( struct form * form)
static

Assign form rows.

Parameters
formForm
Return values
rcReturn status code

Definition at line 159 of file form_ui.c.

159 {
160 struct form_control *control;
161 struct dynamic_item *item;
162 unsigned int labels = 0;
163 unsigned int inputs = 0;
164 unsigned int pad_control = 0;
165 unsigned int pad_label = 0;
166 unsigned int minimum;
167 unsigned int remaining;
168 unsigned int between;
169 unsigned int row;
170 unsigned int flags;
171 unsigned int i;
172
173 /* Count labels and inputs */
174 for ( i = 0 ; i < form->dynui->count ; i++ ) {
175 control = &form->controls[i];
176 item = control->item;
177 if ( item->text[0] )
178 labels++;
179 if ( item->name ) {
180 if ( ! inputs )
181 form->scroll.current = i;
182 inputs++;
183 if ( item->flags & DYNUI_DEFAULT )
184 form->scroll.current = i;
185 form->scroll.count = ( i + 1 );
186 }
187 }
189 DBGC ( form, "FORM %p has %d controls (%d labels, %d inputs)\n",
190 form, form->dynui->count, labels, inputs );
191
192 /* Refuse to create forms with no inputs */
193 if ( ! inputs )
194 return -EINVAL;
195
196 /* Calculate minimum number of rows */
197 minimum = ( labels + ( inputs * 2 /* edit box and error message */ ) );
198 remaining = ( END_ROW - START_ROW );
199 DBGC ( form, "FORM %p has %d (of %d) usable rows\n",
200 form, remaining, LINES );
201 if ( minimum > remaining )
202 return -ERANGE;
203 remaining -= minimum;
204
205 /* Insert blank row between controls, if space exists */
206 between = ( form->dynui->count - 1 );
207 if ( between <= remaining ) {
208 pad_control = 1;
209 remaining -= between;
210 DBGC ( form, "FORM %p padding between controls\n", form );
211 }
212
213 /* Insert blank row after label, if space exists */
214 if ( labels <= remaining ) {
215 pad_label = 1;
216 remaining -= labels;
217 DBGC ( form, "FORM %p padding after labels\n", form );
218 }
219
220 /* Centre on screen */
221 DBGC ( form, "FORM %p has %d spare rows\n", form, remaining );
222 row = ( START_ROW + ( remaining / 2 ) );
223
224 /* Position each control */
225 for ( i = 0 ; i < form->dynui->count ; i++ ) {
226 control = &form->controls[i];
227 item = control->item;
228 if ( item->text[0] ) {
229 control->row = row;
230 row++; /* Label text */
231 row += pad_label;
232 }
233 if ( item->name ) {
234 flags = ( ( item->flags & DYNUI_SECRET ) ?
235 WIDGET_SECRET : 0 );
236 init_editbox ( &control->editbox, row, INPUT_COL,
237 INPUT_WIDTH, flags, &control->value );
238 row++; /* Edit box */
239 row++; /* Error message (if any) */
240 }
241 row += pad_control;
242 }
243 assert ( row <= END_ROW );
244
245 return 0;
246}
#define DYNUI_DEFAULT
Dynamic user interface item is default selection.
Definition dynui.h:46
#define DYNUI_SECRET
Dynamic user interface item represents a secret.
Definition dynui.h:49
static void init_editbox(struct edit_box *box, unsigned int row, unsigned int col, unsigned int width, unsigned int flags, char **buf)
Initialise text box widget.
Definition editbox.h:40
uint8_t flags
Flags.
Definition ena.h:7
#define END_ROW
Ending control row.
Definition form_ui.c:50
#define INPUT_WIDTH
Input field width.
Definition form_ui.c:59
#define INPUT_COL
Input field column.
Definition form_ui.c:62
#define START_ROW
Starting control row.
Definition form_ui.c:47
#define DBGC(...)
Definition compiler.h:505
#define EINVAL
Invalid argument.
Definition errno.h:429
#define ERANGE
Result too large.
Definition errno.h:640
#define LINES(...)
Define inline lines.
const char * text
Text.
Definition dynui.h:36
unsigned int flags
Flags.
Definition dynui.h:40
struct jump_scroller scroll
Jump scroller.
Definition form_ui.c:69
unsigned int count
Total number of items.
Definition jumpscroll.h:20
unsigned int rows
Maximum number of visible rows.
Definition jumpscroll.h:18
unsigned int current
Currently selected item.
Definition jumpscroll.h:22
@ WIDGET_SECRET
Widget contains a secret.
Definition widget.h:35

References assert, control, form::controls, dynamic_ui::count, jump_scroller::count, jump_scroller::current, DBGC, form::dynui, DYNUI_DEFAULT, DYNUI_SECRET, EINVAL, END_ROW, ERANGE, dynamic_item::flags, flags, init_editbox(), INPUT_COL, INPUT_WIDTH, LINES, dynamic_item::name, jump_scroller::rows, form::scroll, START_ROW, dynamic_item::text, and WIDGET_SECRET.

Referenced by show_form().

◆ draw_form()

void draw_form ( struct form * form)
static

Draw form.

Parameters
formForm

Definition at line 253 of file form_ui.c.

253 {
254 struct form_control *control;
255 unsigned int i;
256
257 /* Clear screen */
259 erase();
260
261 /* Draw title, if any */
262 attron ( A_BOLD );
263 if ( form->dynui->title )
264 msg ( TITLE_ROW, "%s", form->dynui->title );
265 attroff ( A_BOLD );
266
267 /* Draw controls */
268 for ( i = 0 ; i < form->dynui->count ; i++ ) {
269 control = &form->controls[i];
270
271 /* Draw label, if any */
272 if ( control->row )
273 msg ( control->row, "%s", control->item->text );
274
275 /* Draw input, if any */
276 if ( control->name )
277 draw_widget ( &control->editbox.widget );
278 }
279
280 /* Draw instructions */
281 msg ( INSTRUCTION_ROW, "%s", "Ctrl-X - save changes"
282 INSTRUCTION_PAD "Ctrl-C - discard changes" );
283}
int erase(void)
Completely clear the screen.
Definition clear.c:98
#define A_BOLD
Definition curses.h:139
#define color_set(cpno, opts)
Definition curses.h:241
static int attroff(int attrs)
Definition curses.h:509
static int attron(int attrs)
Definition curses.h:513
#define INSTRUCTION_PAD
Padding between instructions.
Definition form_ui.c:56
#define INSTRUCTION_ROW
Instructions row.
Definition form_ui.c:53
#define TITLE_ROW
Form title row.
Definition form_ui.c:44
#define CPAIR_NORMAL
Normal text.
Definition ansicol.h:41
void msg(unsigned int row, const char *fmt,...)
Print message centred on specified row.
Definition message.c:62
const char * title
Title.
Definition dynui.h:22
static void draw_widget(struct widget *widget)
Draw text widget.
Definition widget.h:87

References A_BOLD, attroff(), attron(), color_set, control, form::controls, dynamic_ui::count, CPAIR_NORMAL, draw_widget(), form::dynui, erase(), INSTRUCTION_PAD, INSTRUCTION_ROW, msg(), NULL, dynamic_ui::title, and TITLE_ROW.

Referenced by show_form().

◆ draw_errors()

void draw_errors ( struct form * form)
static

Draw (or clear) error messages.

Parameters
formForm

Definition at line 290 of file form_ui.c.

290 {
291 struct form_control *control;
292 unsigned int row;
293 unsigned int i;
294
295 /* Draw (or clear) errors */
296 for ( i = 0 ; i < form->dynui->count ; i++ ) {
297 control = &form->controls[i];
298
299 /* Skip non-input controls */
300 if ( ! control->name )
301 continue;
302
303 /* Draw or clear error message as appropriate */
304 row = ( control->editbox.widget.row + 1 );
305 if ( control->rc != 0 ) {
307 msg ( row, " %s ", strerror ( control->rc ) );
309 } else {
310 clearmsg ( row );
311 }
312 }
313}
#define CPAIR_ALERT
Error text.
Definition ansicol.h:53
void clearmsg(unsigned int row)
Clear message on specified row.
Definition message.c:75
char * strerror(int errno)
Retrieve string representation of error number.
Definition strerror.c:79
unsigned int row
Label row.
Definition form_ui.c:83

References clearmsg(), color_set, control, form::controls, dynamic_ui::count, CPAIR_ALERT, CPAIR_NORMAL, form::dynui, msg(), NULL, form_control::row, and strerror().

Referenced by submit_form().

◆ parse_names()

int parse_names ( struct form * form)
static

Parse setting names.

Parameters
formForm
Return values
rcReturn status code

Definition at line 321 of file form_ui.c.

321 {
322 struct form_control *control;
323 unsigned int i;
324 int rc;
325
326 /* Parse all setting names */
327 for ( i = 0 ; i < form->dynui->count ; i++ ) {
328 control = &form->controls[i];
329
330 /* Skip labels */
331 if ( ! control->name ) {
332 DBGC ( form, "FORM %p item %d is a label\n", form, i );
333 continue;
334 }
335
336 /* Parse setting name */
337 DBGC ( form, "FORM %p item %d is for %s\n",
338 form, i, control->name );
339 if ( ( rc = parse_setting_name ( control->name,
341 &control->settings,
342 &control->setting ) ) != 0 )
343 return rc;
344
345 /* Apply default type if necessary */
346 if ( ! control->setting.type )
347 control->setting.type = &setting_type_string;
348 }
349
350 return 0;
351}
struct arbelprm_rc_send_wqe rc
Definition arbel.h:3
struct settings * autovivify_child_settings(struct settings *parent, const char *name)
Find or create child settings block.
Definition settings.c:307
int parse_setting_name(char *name, get_child_settings_t get_child, struct settings **settings, struct setting *setting)
Parse setting name.
Definition settings.c:1529

References autovivify_child_settings(), control, form::controls, dynamic_ui::count, DBGC, form::dynui, parse_setting_name(), and rc.

Referenced by show_form().

◆ load_values()

void load_values ( struct form * form)
static

Load current input values.

Parameters
formForm

Definition at line 358 of file form_ui.c.

358 {
359 struct form_control *control;
360 unsigned int i;
361
362 /* Fetch all current setting values */
363 for ( i = 0 ; i < form->dynui->count ; i++ ) {
364 control = &form->controls[i];
365 if ( ! control->name )
366 continue;
367 fetchf_setting_copy ( control->settings, &control->setting,
368 NULL, &control->setting,
369 &control->value );
370 }
371}
int fetchf_setting_copy(struct settings *settings, const struct setting *setting, struct settings **origin, struct setting *fetched, char **value)
Fetch copy of formatted value of setting.
Definition settings.c:1277

References control, form::controls, dynamic_ui::count, form::dynui, fetchf_setting_copy(), and NULL.

Referenced by show_form().

◆ save_values()

int save_values ( struct form * form)
static

Store current input values.

Parameters
formForm
Return values
rcReturn status code

Definition at line 379 of file form_ui.c.

379 {
380 struct form_control *control;
381 unsigned int i;
382 int rc = 0;
383
384 /* Store all current setting values */
385 for ( i = 0 ; i < form->dynui->count ; i++ ) {
386 control = &form->controls[i];
387 if ( ! control->name )
388 continue;
389 control->rc = storef_setting ( control->settings,
390 &control->setting,
391 control->value );
392 if ( control->rc != 0 )
393 rc = control->rc;
394 }
395
396 return rc;
397}
int storef_setting(struct settings *settings, const struct setting *setting, const char *value)
Store formatted value of setting.
Definition settings.c:1320

References control, form::controls, dynamic_ui::count, form::dynui, rc, and storef_setting().

Referenced by submit_form().

◆ submit_form()

int submit_form ( struct form * form)
static

Submit form.

Parameters
formForm
Return values
rcReturn status code

Definition at line 405 of file form_ui.c.

405 {
406 int rc;
407
408 /* Attempt to save values */
409 rc = save_values ( form );
410
411 /* Draw (or clear) errors */
412 draw_errors ( form );
413
414 return rc;
415}
static int save_values(struct form *form)
Store current input values.
Definition form_ui.c:379
static void draw_errors(struct form *form)
Draw (or clear) error messages.
Definition form_ui.c:290

References draw_errors(), rc, and save_values().

Referenced by form_loop().

◆ form_loop()

int form_loop ( struct form * form)
static

Form main loop.

Parameters
formForm
Return values
rcReturn status code

Definition at line 423 of file form_ui.c.

423 {
424 struct jump_scroller *scroll = &form->scroll;
425 struct form_control *control;
426 struct dynamic_item *item;
427 unsigned int move;
428 unsigned int i;
429 int key;
430 int rc;
431
432 /* Main loop */
433 while ( 1 ) {
434
435 /* Draw current input */
436 control = &form->controls[scroll->current];
437 draw_widget ( &control->editbox.widget );
438
439 /* Process keypress */
440 key = edit_widget ( &control->editbox.widget, getkey ( 0 ) );
441
442 /* Handle scroll keys */
444
445 /* Handle special keys */
446 switch ( key ) {
447 case CTRL_C:
448 case ESC:
449 /* Cancel form */
450 return -ECANCELED;
451 case KEY_ENTER:
452 /* Attempt to do the most intuitive thing when
453 * Enter is pressed. If we are on the last
454 * input, then submit the form. If we are
455 * editing an input which failed, then
456 * resubmit the form. Otherwise, move to the
457 * next input.
458 */
459 if ( ( control->rc == 0 ) &&
460 ( scroll->current < ( scroll->count - 1 ) ) ) {
462 break;
463 }
464 /* fall through */
465 case CTRL_X:
466 /* Submit form */
467 if ( ( rc = submit_form ( form ) ) == 0 )
468 return 0;
469 /* If current input is not the problem, move
470 * to the first input that needs fixing.
471 */
472 if ( control->rc == 0 ) {
473 for ( i = 0 ; i < form->dynui->count ; i++ ) {
474 if ( form->controls[i].rc != 0 ) {
475 scroll->current = i;
476 break;
477 }
478 }
479 }
480 break;
481 default:
482 /* Move to input with matching shortcut key, if any */
483 item = dynui_shortcut ( form->dynui, key );
484 if ( item ) {
485 scroll->current = item->index;
486 if ( ! item->name )
488 }
489 break;
490 }
491
492 /* Move selection, if applicable */
493 while ( move ) {
495 control = &form->controls[scroll->current];
496 if ( control->name )
497 break;
498 }
499 }
500}
union @162305117151260234136356364136041353210355154177 key
Sense key.
Definition scsi.h:3
#define ESC
Escape character.
Definition ansiesc.h:93
static int move(int y, int x)
Definition curses.h:594
struct dynamic_item * dynui_shortcut(struct dynamic_ui *dynui, int key)
Find dynamic user interface item by shortcut key.
Definition dynui.c:212
static int submit_form(struct form *form)
Submit form.
Definition form_ui.c:405
int getkey(unsigned long timeout)
Get single keypress.
Definition getkey.c:72
#define ECANCELED
Operation canceled.
Definition errno.h:344
unsigned int jump_scroll_move(struct jump_scroller *scroll, unsigned int move)
Move scroller.
Definition jumpscroll.c:93
unsigned int jump_scroll_key(struct jump_scroller *scroll, int key)
Jump scrolling.
Definition jumpscroll.c:43
#define SCROLL_DOWN
Scroll down by one line.
Definition jumpscroll.h:54
#define CTRL_X
Definition keys.h:42
#define CTRL_C
Definition keys.h:21
#define KEY_ENTER
Definition keys.h:129
unsigned int index
Index.
Definition dynui.h:38
int rc
Most recent error in saving.
Definition form_ui.c:91
A jump scroller.
Definition jumpscroll.h:16
static int edit_widget(struct widget *widget, int key)
Edit text widget.
Definition widget.h:104

References control, form::controls, dynamic_ui::count, jump_scroller::count, CTRL_C, CTRL_X, jump_scroller::current, draw_widget(), form::dynui, dynui_shortcut(), ECANCELED, edit_widget(), ESC, getkey(), dynamic_item::index, jump_scroll_key(), jump_scroll_move(), key, KEY_ENTER, move(), dynamic_item::name, form_control::rc, rc, form::scroll, SCROLL_DOWN, and submit_form().

Referenced by show_form().

◆ show_form()

int show_form ( struct dynamic_ui * dynui)

Show form.

Parameters
dynuiDynamic user interface
Return values
rcReturn status code

Definition at line 508 of file form_ui.c.

508 {
509 struct form *form;
510 int rc;
511
512 /* Allocate and initialise structure */
513 form = alloc_form ( dynui );
514 if ( ! form ) {
515 rc = -ENOMEM;
516 goto err_alloc;
517 }
518
519 /* Parse setting names and load current values */
520 if ( ( rc = parse_names ( form ) ) != 0 )
521 goto err_parse_names;
522 load_values ( form );
523
524 /* Lay out form on screen */
525 if ( ( rc = layout_form ( form ) ) != 0 )
526 goto err_layout;
527
528 /* Draw initial form */
529 initscr();
530 start_color();
531 draw_form ( form );
532
533 /* Run main loop */
534 if ( ( rc = form_loop ( form ) ) != 0 )
535 goto err_loop;
536
537 err_loop:
539 endwin();
540 err_layout:
541 err_parse_names:
542 free_form ( form );
543 err_alloc:
544 return rc;
545}
#define start_color()
Definition curses.h:397
static int form_loop(struct form *form)
Form main loop.
Definition form_ui.c:423
static int layout_form(struct form *form)
Assign form rows.
Definition form_ui.c:159
static void draw_form(struct form *form)
Draw form.
Definition form_ui.c:253
static struct form * alloc_form(struct dynamic_ui *dynui)
Allocate form.
Definition form_ui.c:100
static void free_form(struct form *form)
Free form.
Definition form_ui.c:142
static int parse_names(struct form *form)
Parse setting names.
Definition form_ui.c:321
static void load_values(struct form *form)
Load current input values.
Definition form_ui.c:358
#define ENOMEM
Not enough space.
Definition errno.h:535
WINDOW * initscr(void)
Initialise console environment.
Definition wininit.c:18
int endwin(void)
Finalise console environment.
Definition wininit.c:32

References alloc_form(), color_set, CPAIR_NORMAL, draw_form(), form::dynui, endwin(), ENOMEM, form_loop(), free_form(), initscr(), layout_form(), load_values(), NULL, parse_names(), rc, and start_color.

Referenced by login_ui(), and present_exec().