You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031
  1. #ifndef _GPXE_EDITSTRING_H
  2. #define _GPXE_EDITSTRING_H
  3. /** @file
  4. *
  5. * Editable strings
  6. *
  7. */
  8. /** An editable string */
  9. struct edit_string {
  10. /** Buffer for string */
  11. char *buf;
  12. /** Size of buffer (including terminating NUL) */
  13. size_t len;
  14. /** Cursor position */
  15. unsigned int cursor;
  16. /* The following items are the edit history */
  17. /** Last cursor position */
  18. unsigned int last_cursor;
  19. /** Start of modified portion of string */
  20. unsigned int mod_start;
  21. /** End of modified portion of string */
  22. unsigned int mod_end;
  23. };
  24. extern int edit_string ( struct edit_string *string, int key );
  25. #endif /* _GPXE_EDITSTRING_H */