1 /* ----------------------------------------------------------------------------
2 Copyright (c) 2021, Daan Leijen
3 This is free software; you can redistribute it and/or modify it
4 under the terms of the MIT License. A copy of the license can be
5 found in the "LICENSE" file at the root of this distribution.
6 -----------------------------------------------------------------------------*/
13 //-------------------------------------------------------------
15 //-------------------------------------------------------------
17 typedef struct editstate_s editstate_t
;
19 ic_private
void editstate_init( editstate_t
** es
);
20 ic_private
void editstate_done( alloc_t
* mem
, editstate_t
** es
);
21 ic_private
void editstate_capture( alloc_t
* mem
, editstate_t
** es
, const char* input
, ssize_t pos
);
22 ic_private
bool editstate_restore( alloc_t
* mem
, editstate_t
** es
, const char** input
, ssize_t
* pos
); // caller needs to free input