#include <ctype.h>
#include <string.h>
#include "histedit.h"
#include "common.h"
#include "emacs.h"
#include "search.h"
#include "fcns.h"
Go to the source code of this file.
Classes | |
struct | CMacro_t |
struct | CUndo_t |
struct | CVCmd_t |
struct | CKill_t |
struct | ElCharEd_t |
Defines | |
#define | EL_MAXMACRO 10 |
#define | VI_MOVE |
#define | STReof "^D\b\b" |
#define | STRQQ "\"\"" |
#define | isglob(a) (strchr("*[]?", (a)) != NULL) |
#define | isword(a) (isprint(a)) |
#define | NOP 0x00 |
#define | DELETE 0x01 |
#define | INSERT 0x02 |
#define | CHANGE 0x04 |
#define | CHAR_FWD 0 |
#define | CHAR_BACK 1 |
#define | MODE_INSERT 0 |
#define | MODE_REPLACE 1 |
#define | MODE_REPLACE_1 2 |
Functions | |
el_protected int | cv__isword (int) |
el_protected void | cv_delfini (EditLine_t *) |
el_protected char * | cv__endword (char *, char *, int) |
el_protected int | ce__isword (int) |
el_protected void | cv_undo (EditLine_t *, int, size_t, char *) |
el_protected char * | cv_next_word (EditLine_t *, char *, char *, int, int(*)(int)) |
el_protected char * | cv_prev_word (EditLine_t *, char *, char *, int, int(*)(int)) |
el_protected char * | c__next_word (char *, char *, int, int(*)(int)) |
el_protected char * | c__prev_word (char *, char *, int, int(*)(int)) |
el_protected void | c_insert (EditLine_t *, int) |
el_protected void | c_delbefore (EditLine_t *, int) |
el_protected void | c_delafter (EditLine_t *, int) |
el_protected int | c_gets (EditLine_t *, char *) |
el_protected int | c_hpos (EditLine_t *) |
el_protected int | ch_init (EditLine_t *) |
el_protected void | ch_reset (EditLine_t *) |
el_protected int | ch_enlargebufs (EditLine_t *, size_t) |
el_protected void | ch_end (EditLine_t *) |
#define DELETE 0x01 |
Definition at line 126 of file chared.h.
Referenced by cv_csearch_back(), cv_csearch_fwd(), cv_delfini(), cv_next_word(), cv_prev_word(), ed_move_to_beg(), ed_move_to_end(), ed_next_char(), ed_prev_char(), ed_prev_word(), em_next_word(), and em_undo().
#define EL_MAXMACRO 10 |
#define INSERT 0x02 |
Definition at line 127 of file chared.h.
Referenced by c_delafter(), c_delbefore(), cv_delfini(), cv_next_word(), cv_prev_word(), and em_undo().
#define isglob | ( | a | ) | (strchr("*[]?", (a)) != NULL) |
#define MODE_INSERT 0 |
Definition at line 133 of file chared.h.
Referenced by ch_init(), ch_reset(), ed_digit(), ed_insert(), and em_toggle_overwrite().
#define MODE_REPLACE 1 |
#define NOP 0x00 |
Definition at line 125 of file chared.h.
Referenced by ch_init(), ch_reset(), cv_delfini(), ed_next_history(), ed_prev_history(), ed_search_next_history(), and ed_search_prev_history().
Definition at line 119 of file chared.h.
Referenced by ed_delete_next_char(), and em_delete_or_list().
#define STRQQ "\"\"" |
el_protected char* c__next_word | ( | char * | , | |
char * | , | |||
int | , | |||
int(*)(int) | ||||
) |
Definition at line 208 of file chared.cxx.
Referenced by ce_inc_search(), em_capitol_case(), em_delete_next_word(), em_lower_case(), em_next_word(), and em_upper_case().
el_protected char* c__prev_word | ( | char * | , | |
char * | , | |||
int | , | |||
int(*)(int) | ||||
) |
Definition at line 182 of file chared.cxx.
Referenced by ed_delete_prev_word(), ed_prev_word(), and em_copy_prev_word().
el_protected void c_delafter | ( | EditLine_t * | , | |
int | ||||
) |
Definition at line 111 of file chared.cxx.
References cv_undo(), ElMap_t::fCurrent, ElLine_t::fCursor, ElMap_t::fEmacs, ElLine_t::fLastChar, EditLine_t::fLine, EditLine_t::fMap, INSERT, and size_t.
Referenced by cv_delfini(), ed_delete_next_char(), ed_digit(), ed_insert(), em_delete_next_word(), em_delete_or_list(), and em_kill_region().
el_protected void c_delbefore | ( | EditLine_t * | , | |
int | ||||
) |
Definition at line 136 of file chared.cxx.
References cv_undo(), ElLine_t::fBuffer, ElMap_t::fCurrent, ElLine_t::fCursor, ElMap_t::fEmacs, ElLine_t::fLastChar, EditLine_t::fLine, EditLine_t::fMap, INSERT, and size_t.
Referenced by cv_delfini(), ed_delete_prev_char(), ed_delete_prev_word(), el_deletestr(), and em_kill_region().
el_protected int c_gets | ( | EditLine_t * | , | |
char * | ||||
) |
Definition at line 704 of file chared.cxx.
References CC_REFRESH, ed_end_of_file(), EL_BUFSIZ, el_getc(), len, re_refresh(), and term_beep().
Referenced by cv_search(), and ed_command().
el_protected int c_hpos | ( | EditLine_t * | ) |
Definition at line 762 of file chared.cxx.
References ElLine_t::fBuffer, ElLine_t::fCursor, EditLine_t::fLine, and ptr.
Referenced by ed_next_line(), and ed_prev_line().
el_protected void c_insert | ( | EditLine_t * | , | |
int | ||||
) |
Definition at line 79 of file chared.cxx.
References ElLine_t::fBufColor, ElLine_t::fBuffer, ElLine_t::fCursor, ElLine_t::fLastChar, ElLine_t::fLimit, EditLine_t::fLine, and i.
Referenced by cv_search(), ed_command(), ed_digit(), ed_insert(), el_insertstr(), em_copy_prev_word(), em_undo(), and em_yank().
el_protected int ce__isword | ( | int | ) |
Definition at line 164 of file chared.cxx.
References NULL.
Referenced by ce_inc_search(), ed_delete_prev_word(), ed_prev_word(), em_capitol_case(), em_copy_prev_word(), em_delete_next_word(), em_lower_case(), em_next_word(), and em_upper_case().
el_protected void ch_end | ( | EditLine_t * | ) |
Definition at line 633 of file chared.cxx.
References ch_reset(), el_free, CUndo_t::fBuf, CKill_t::fBuf, ElLine_t::fBufColor, ElLine_t::fBuffer, EditLine_t::fCharEd, ElCharEd_t::fKill, ElLine_t::fLimit, EditLine_t::fLine, ElCharEd_t::fMacro, CMacro_t::fMacro, ElCharEd_t::fUndo, and NULL.
Referenced by el_end().
el_protected int ch_enlargebufs | ( | EditLine_t * | , | |
size_t | ||||
) |
Definition at line 537 of file chared.cxx.
References el_free, EL_LEAVE, el_realloc, CUndo_t::fBuf, CKill_t::fBuf, ElLine_t::fBufColor, ElLine_t::fBuffer, EditLine_t::fCharEd, ElLine_t::fCursor, ElCharEd_t::fKill, CKill_t::fLast, ElLine_t::fLastChar, ElLine_t::fLimit, EditLine_t::fLine, CKill_t::fMark, CUndo_t::fPtr, ElCharEd_t::fUndo, hist_enlargebuf(), size_t, and void.
Referenced by ed_digit(), ed_insert(), el_gets(), el_insertstr(), and em_yank().
el_protected int ch_init | ( | EditLine_t * | ) |
Definition at line 439 of file chared.cxx.
References ED_UNASSIGNED, EL_BUFSIZ, el_malloc, EL_MAXMACRO, CUndo_t::fAction, CVCmd_t::fAction, ElState_t::fArgument, CUndo_t::fBuf, CKill_t::fBuf, ElLine_t::fBufColor, ElLine_t::fBuffer, EditLine_t::fCharEd, ElMap_t::fCurrent, ElLine_t::fCursor, ElState_t::fDoingArg, CUndo_t::fDSize, ElState_t::fInputMode, CVCmd_t::fIns, CUndo_t::fISize, ElMap_t::fKey, ElCharEd_t::fKill, CKill_t::fLast, ElLine_t::fLastChar, ElState_t::fLastCmd, CMacro_t::fLevel, ElLine_t::fLimit, EditLine_t::fLine, ElCharEd_t::fMacro, CMacro_t::fMacro, EditLine_t::fMap, CKill_t::fMark, ElState_t::fMetaNext, CMacro_t::fNLine, CVCmd_t::fPos, CUndo_t::fPtr, ElState_t::fReplayHist, EditLine_t::fState, ElCharEd_t::fUndo, ElCharEd_t::fVCmd, MODE_INSERT, NOP, NULL, and void.
Referenced by el_init().
el_protected void ch_reset | ( | EditLine_t * | ) |
Definition at line 502 of file chared.cxx.
References ED_UNASSIGNED, CUndo_t::fAction, CVCmd_t::fAction, ElState_t::fArgument, ElLine_t::fBuffer, EditLine_t::fCharEd, ElMap_t::fCurrent, ElLine_t::fCursor, ElState_t::fDoingArg, CUndo_t::fDSize, ElHistory_t::fEventNo, EditLine_t::fHistory, ElState_t::fInputMode, CVCmd_t::fIns, CUndo_t::fISize, ElMap_t::fKey, ElCharEd_t::fKill, ElLine_t::fLastChar, ElState_t::fLastCmd, CMacro_t::fLevel, EditLine_t::fLine, ElCharEd_t::fMacro, EditLine_t::fMap, CKill_t::fMark, ElState_t::fMetaNext, CVCmd_t::fPos, CUndo_t::fPtr, EditLine_t::fState, ElCharEd_t::fUndo, ElCharEd_t::fVCmd, MODE_INSERT, and NOP.
Referenced by ch_end(), ed_start_over(), el_gets(), el_gets_newline(), and el_reset().
el_protected char* cv__endword | ( | char * | , | |
char * | , | |||
int | ||||
) |
Definition at line 414 of file chared.cxx.
el_protected int cv__isword | ( | int | ) |
Definition at line 173 of file chared.cxx.
el_protected void cv_delfini | ( | EditLine_t * | ) |
Definition at line 337 of file chared.cxx.
References c_delafter(), c_delbefore(), DELETE, EL_ABORT, CUndo_t::fAction, CVCmd_t::fAction, EditLine_t::fCharEd, ElMap_t::fCurrent, ElLine_t::fCursor, CUndo_t::fDSize, EditLine_t::fErrFile, ElMap_t::fKey, EditLine_t::fLine, EditLine_t::fMap, CVCmd_t::fPos, CUndo_t::fPtr, ElCharEd_t::fUndo, ElCharEd_t::fVCmd, INSERT, int, NOP, re_refresh_cursor(), and size.
Referenced by cv_csearch_back(), cv_csearch_fwd(), ed_move_to_beg(), ed_move_to_end(), ed_next_char(), ed_prev_char(), ed_prev_word(), and em_next_word().
el_protected char* cv_next_word | ( | EditLine_t * | , | |
char * | , | |||
char * | , | |||
int | , | |||
int(*)(int) | ||||
) |
Definition at line 229 of file chared.cxx.
References DELETE, CVCmd_t::fAction, EditLine_t::fCharEd, ElCharEd_t::fVCmd, INSERT, and test().
el_protected char* cv_prev_word | ( | EditLine_t * | , | |
char * | , | |||
char * | , | |||
int | , | |||
int(*)(int) | ||||
) |
Definition at line 261 of file chared.cxx.
References DELETE, CVCmd_t::fAction, EditLine_t::fCharEd, ElCharEd_t::fVCmd, INSERT, and test().
el_protected void cv_undo | ( | EditLine_t * | , | |
int | , | |||
size_t | , | |||
char * | ||||
) |
Definition at line 62 of file chared.cxx.
References CUndo_t::fAction, CUndo_t::fBuf, EditLine_t::fCharEd, CUndo_t::fDSize, EditLine_t::fErrFile, CUndo_t::fISize, fprintf(), CUndo_t::fPtr, ElCharEd_t::fUndo, and void.
Referenced by c_delafter(), and c_delbefore().