1 #ifndef _IPXE_EDITSTRING_H
2 #define _IPXE_EDITSTRING_H
10 FILE_LICENCE ( GPL2_OR_LATER );
12 /** An editable string */
14 /** Buffer for string */
16 /** Size of buffer (including terminating NUL) */
18 /** Cursor position */
21 /* The following items are the edit history */
23 /** Last cursor position */
24 unsigned int last_cursor;
25 /** Start of modified portion of string */
26 unsigned int mod_start;
27 /** End of modified portion of string */
32 * Initialise editable string
34 * @v string Editable string
35 * @v buf Buffer for string
36 * @v len Length of buffer
38 static inline void init_editstring ( struct edit_string *string, char *buf,
44 extern void replace_string ( struct edit_string *string,
45 const char *replacement ) __nonnull;
46 extern int edit_string ( struct edit_string *string, int key ) __nonnull;
48 #endif /* _IPXE_EDITSTRING_H */