| 32 |
}; |
}; |
| 33 |
typedef struct editor_data_t EDITOR_DATA; |
typedef struct editor_data_t EDITOR_DATA; |
| 34 |
|
|
| 35 |
|
struct editor_ctx_t |
| 36 |
|
{ |
| 37 |
|
int reach_begin; |
| 38 |
|
int reach_end; |
| 39 |
|
long line_cursor; |
| 40 |
|
char msg[MSG_EXT_MAX_LEN]; |
| 41 |
|
}; |
| 42 |
|
typedef struct editor_ctx_t EDITOR_CTX; |
| 43 |
|
|
| 44 |
extern EDITOR_DATA *editor_data_load(const char *p_data); |
extern EDITOR_DATA *editor_data_load(const char *p_data); |
| 45 |
extern long editor_data_save(const EDITOR_DATA *p_editor_data, char *p_data, size_t buf_len); |
extern long editor_data_save(const EDITOR_DATA *p_editor_data, char *p_data, size_t buf_len); |
| 46 |
extern void editor_data_cleanup(EDITOR_DATA *p_editor_data); |
extern void editor_data_cleanup(EDITOR_DATA *p_editor_data); |
| 47 |
|
|
| 48 |
extern int editor_display(EDITOR_DATA *p_editor_data); |
extern int editor_display(EDITOR_DATA *p_editor_data); |
| 49 |
|
|
| 50 |
|
extern int editor_data_insert(EDITOR_DATA *p_editor_data, long *p_display_line, long *p_offset, |
| 51 |
|
const char *str, int str_len, long *p_last_updated_line); |
| 52 |
|
|
| 53 |
|
extern int editor_data_delete(EDITOR_DATA *p_editor_data, long display_line, long offset, |
| 54 |
|
long *p_last_updated_line); |
| 55 |
|
|
| 56 |
#endif //_EDITOR_H_ |
#endif //_EDITOR_H_ |