]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - include/mbsedit.h
1 #ifndef UTIL_LINUX_MBSEDIT_H
2 # define UTIL_LINUX_MBSEDIT_H
8 char *buf
; /* buffer */
9 size_t max_bytes
; /* size of the buffer */
10 size_t max_cells
; /* maximal allowed number of cells */
11 size_t cur_cells
; /* number of cells to print the buffer */
12 size_t cur_bytes
; /* number of chars in bytes */
13 size_t cursor
; /* cursor position in bytes */
14 size_t cursor_cells
; /* cursor position in cells */
24 struct mbs_editor
*mbs_new_edit(char *buf
, size_t bufsz
, size_t ncells
);
25 char *mbs_free_edit(struct mbs_editor
*edit
);
27 int mbs_edit_goto(struct mbs_editor
*edit
, int where
);
28 int mbs_edit_delete(struct mbs_editor
*edit
);
29 int mbs_edit_backspace(struct mbs_editor
*edit
);
30 int mbs_edit_insert(struct mbs_editor
*edit
, wint_t c
);
32 #endif /* UTIL_LINUX_MBSEDIT_H */