[contrib] Allow Network Protocol header to display in rom-o-matic
[gpxe.git] / src / include / gpxe / editstring.h
blob48c1baa0dd325c2baaaee02404000b073d409f3c
1 #ifndef _GPXE_EDITSTRING_H
2 #define _GPXE_EDITSTRING_H
4 /** @file
6 * Editable strings
8 */
10 FILE_LICENCE ( GPL2_OR_LATER );
12 /** An editable string */
13 struct edit_string {
14 /** Buffer for string */
15 char *buf;
16 /** Size of buffer (including terminating NUL) */
17 size_t len;
18 /** Cursor position */
19 unsigned int cursor;
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 */
28 unsigned int mod_end;
31 extern int edit_string ( struct edit_string *string, int key ) __nonnull;
33 #endif /* _GPXE_EDITSTRING_H */