-/**
- * boot_editor_move_cursor - Move the cursor, setting correct attributes.
- * @req: An ncurses request or char to send to form_driver().
- */
-
-static int boot_editor_move_cursor(struct boot_editor *boot_editor, int req)
-{
- int result;
-
- wchgat(boot_editor->scr.sub_ncw, 1,
- boot_editor_attr_field_selected, 0, 0);
- result = form_driver(boot_editor->ncf, req);
- wchgat(boot_editor->scr.sub_ncw, 1, boot_editor->attr_cursor, 0, 0);
- wrefresh(boot_editor->scr.main_ncw);
- return result;
-}
-
-/**
- * boot_editor_insert_mode_set - Set the insert mode.
- */
-
-static void boot_editor_insert_mode_set(struct boot_editor *boot_editor,
- int req)
-{
- switch (req) {
- case REQ_INS_MODE:
- boot_editor->attr_cursor = boot_editor_attr_cursor_ins;
- break;
- case REQ_OVL_MODE:
- boot_editor->attr_cursor = boot_editor_attr_cursor_ovl;
- break;
- default:
- assert(0 && "bad req");
- break;
- }
- boot_editor_move_cursor(boot_editor, req);
-}
-
-/**
- * boot_editor_insert_mode_tog - Toggle the insert mode.
- */
-
-static void boot_editor_insert_mode_tog(struct boot_editor *boot_editor)
-{
- if (boot_editor->attr_cursor == boot_editor_attr_cursor_ins)
- boot_editor_insert_mode_set(boot_editor, REQ_OVL_MODE);
- else
- boot_editor_insert_mode_set(boot_editor, REQ_INS_MODE);
-}
-
-/**
- * boot_editor_move_field - Move selected field, setting correct attributes.
- * @req: An ncurses request to send to form_driver().
- */
-
-static int boot_editor_move_field(struct boot_editor *boot_editor, int req)
-{
- int result;
-
- set_field_back(current_field(boot_editor->ncf),
- boot_editor_attr_field_normal);
-
- result = form_driver(boot_editor->ncf, req);
-
- set_field_back(current_field(boot_editor->ncf),
- boot_editor_attr_field_selected);
-
- boot_editor_move_cursor(boot_editor, REQ_END_FIELD);
- return result;
-}
-