82 |
const char *extension(const char *filename); |
const char *extension(const char *filename); |
83 |
char *pathname(char *buf, int buf_size, const char *filename); |
char *pathname(char *buf, int buf_size, const char *filename); |
84 |
char *makepath(char *buf, int buf_size, const char *path, const char *filename); |
char *makepath(char *buf, int buf_size, const char *path, const char *filename); |
85 |
|
void splitpath(char *dirname, int dirname_size, |
86 |
|
char *filename, int filename_size, const char *pathname); |
87 |
|
|
88 |
int find_resource_file(char *path, int path_size, const char *pattern); |
int find_resource_file(char *path, int path_size, const char *pattern); |
89 |
int strfind(const char *keytable, const char *str, int casefold); |
int strfind(const char *keytable, const char *str, int casefold); |
176 |
|
|
177 |
typedef struct CmdOptionDef { |
typedef struct CmdOptionDef { |
178 |
const char *name; |
const char *name; |
179 |
|
const char *shortname; |
180 |
const char *argname; |
const char *argname; |
181 |
int flags; |
int flags; |
182 |
const char *help; |
const char *help; |
325 |
#define KEY_SPECIAL(c) (((c) >= 0xe000 && (c) < 0xf000) || ((c) >= 0 && (c) < 32)) |
#define KEY_SPECIAL(c) (((c) >= 0xe000 && (c) < 0xf000) || ((c) >= 0 && (c) < 32)) |
326 |
|
|
327 |
#define KEY_NONE 0xffff |
#define KEY_NONE 0xffff |
328 |
|
#define KEY_DEFAULT 0xe401 /* to handle all non special keys */ |
329 |
|
|
330 |
#define KEY_TAB KEY_CTRL('i') |
#define KEY_TAB KEY_CTRL('i') |
331 |
#define KEY_RET KEY_CTRL('m') |
#define KEY_RET KEY_CTRL('m') |
|
#define KEY_REFRESH KEY_CTRL('l') |
|
332 |
#define KEY_ESC KEY_CTRL('[') |
#define KEY_ESC KEY_CTRL('[') |
333 |
#define KEY_SPC 0x0020 |
#define KEY_SPC 0x0020 |
334 |
#define KEY_DEL 127 // kbs |
#define KEY_DEL 127 // kbs |
335 |
#define KEY_BS KEY_CTRL('h') // kbs |
#define KEY_BS KEY_CTRL('h') // kbs |
336 |
|
|
|
#define KEY_DEFAULT 0xe401 /* to handle all non special keys */ |
|
337 |
#define KEY_UP KEY_ESC1('A') // kcuu1 |
#define KEY_UP KEY_ESC1('A') // kcuu1 |
338 |
#define KEY_DOWN KEY_ESC1('B') // kcud1 |
#define KEY_DOWN KEY_ESC1('B') // kcud1 |
339 |
#define KEY_RIGHT KEY_ESC1('C') // kcuf1 |
#define KEY_RIGHT KEY_ESC1('C') // kcuf1 |
1168 |
void text_move_bol(EditState *s); |
void text_move_bol(EditState *s); |
1169 |
void text_move_eol(EditState *s); |
void text_move_eol(EditState *s); |
1170 |
void do_load(EditState *s, const char *filename); |
void do_load(EditState *s, const char *filename); |
1171 |
|
void do_load_from_path(EditState *s, const char *filename); |
1172 |
void do_goto_line(EditState *s, int line); |
void do_goto_line(EditState *s, int line); |
1173 |
void switch_to_buffer(EditState *s, EditBuffer *b); |
void switch_to_buffer(EditState *s, EditBuffer *b); |
1174 |
void do_up_down(EditState *s, int dir); |
void do_up_down(EditState *s, int dir); |