mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 01:22:37 +03:00
[readline] Add init_editstring() wrapper function
Standardise on using init_editstring() to initialise an embedded editable string, to match the coding style used by other embedded objects. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -46,8 +46,7 @@ void init_editbox ( struct edit_box *box, char *buf, size_t len,
|
||||
WINDOW *win, unsigned int row, unsigned int col,
|
||||
unsigned int width, unsigned int flags ) {
|
||||
memset ( box, 0, sizeof ( *box ) );
|
||||
box->string.buf = buf;
|
||||
box->string.len = len;
|
||||
init_editstring ( &box->string, buf, len );
|
||||
box->string.cursor = strlen ( buf );
|
||||
box->win = ( win ? win : stdscr );
|
||||
box->row = row;
|
||||
|
||||
Reference in New Issue
Block a user