#include <sys/types.h>
#include <stdio.h>
Go to the source code of this file.
Classes | |
struct | LineInfo_t |
struct | HistEvent_t |
Defines | |
#define | CC_NORM 0 |
#define | CC_NEWLINE 1 |
#define | CC_EOF 2 |
#define | CC_ARGHACK 3 |
#define | CC_REFRESH 4 |
#define | CC_CURSOR 5 |
#define | CC_ERROR 6 |
#define | CC_FATAL 7 |
#define | CC_REDISPLAY 8 |
#define | CC_REFRESH_BEEP 9 |
#define | EL_PROMPT 0 |
#define | EL_TERMINAL 1 |
#define | EL_EDITOR 2 |
#define | EL_SIGNAL 3 |
#define | EL_BIND 4 |
#define | EL_TELLTC 5 |
#define | EL_SETTC 6 |
#define | EL_ECHOTC 7 |
#define | EL_SETTY 8 |
#define | EL_ADDFN 9 |
#define | EL_HIST 10 |
#define | EL_EDITMODE 11 |
#define | EL_RPROMPT 12 |
#define | H_FUNC 0 |
#define | H_SETSIZE 1 |
#define | H_GETSIZE 2 |
#define | H_FIRST 3 |
#define | H_LAST 4 |
#define | H_PREV 5 |
#define | H_NEXT 6 |
#define | H_CURR 8 |
#define | H_SET 7 |
#define | H_ADD 9 |
#define | H_ENTER 10 |
#define | H_APPEND 11 |
#define | H_END 12 |
#define | H_NEXT_STR 13 |
#define | H_PREV_STR 14 |
#define | H_NEXT_EVENT 15 |
#define | H_PREV_EVENT 16 |
#define | H_LOAD 17 |
#define | H_SAVE 18 |
#define | H_CLEAR 19 |
Functions | |
EditLine_t * | el_init (const char *, FILE *, FILE *, FILE *) |
void | el_reset (EditLine_t *) |
void | el_end (EditLine_t *) |
const char * | el_gets (EditLine_t *, int *) |
const char * | el_gets_newline (EditLine_t *, int *) |
bool | el_eof (EditLine_t *) |
int | el_getc (EditLine_t *, char *) |
void | el_push (EditLine_t *, const char *) |
void | el_beep (EditLine_t *) |
int | el_parse (EditLine_t *, int, const char **) |
int | el_set (EditLine_t *, int,...) |
int | el_get (EditLine_t *, int, void *) |
int | el_source (EditLine_t *, const char *) |
void | el_resize (EditLine_t *) |
const LineInfo_t * | el_line (EditLine_t *) |
int | el_insertstr (EditLine_t *, const char *) |
void | el_deletestr (EditLine_t *, int) |
HistoryFcns_t * | history_init (void) |
void | history_end (HistoryFcns_t *) |
int | history (HistoryFcns_t *, HistEvent_t *, int,...) |
#define CC_ARGHACK 3 |
Definition at line 77 of file histedit.h.
Referenced by ed_argument_digit(), ed_digit(), el_gets(), em_meta_next(), and em_universal_argument().
#define CC_CURSOR 5 |
Definition at line 79 of file histedit.h.
Referenced by ed_move_to_beg(), ed_move_to_end(), ed_next_char(), ed_next_line(), ed_prev_char(), ed_prev_word(), el_gets(), em_exchange_mark(), and em_next_word().
#define CC_EOF 2 |
Definition at line 76 of file histedit.h.
Referenced by ed_delete_next_char(), ed_end_of_file(), el_gets(), and em_delete_or_list().
#define CC_ERROR 6 |
Definition at line 80 of file histedit.h.
Referenced by ce_inc_search(), ce_search_line(), cv_csearch_back(), cv_csearch_fwd(), cv_repeat_srch(), cv_search(), ed_argument_digit(), ed_command(), ed_delete_next_char(), ed_delete_prev_char(), ed_delete_prev_word(), ed_digit(), ed_insert(), ed_next_char(), ed_next_history(), ed_next_line(), ed_prev_char(), ed_prev_history(), ed_prev_word(), ed_search_next_history(), ed_search_prev_history(), ed_transpose_chars(), el_gets(), em_copy_prev_word(), em_copy_region(), em_delete_next_word(), em_delete_or_list(), em_gosmacs_traspose(), em_kill_region(), em_next_word(), em_undo(), em_universal_argument(), em_yank(), and hist_get().
#define CC_FATAL 7 |
#define CC_NEWLINE 1 |
#define CC_NORM 0 |
Definition at line 74 of file histedit.h.
Referenced by ce_inc_search(), ce_search_line(), cv_csearch_back(), cv_csearch_fwd(), ed_digit(), ed_insert(), ed_prev_history(), ed_sequence_lead_in(), ed_tty_dsusp(), ed_tty_flush_output(), ed_tty_sigint(), ed_tty_sigquit(), ed_tty_sigtstp(), ed_tty_start_output(), ed_tty_stop_output(), ed_unassigned(), el_gets(), em_copy_region(), em_set_mark(), em_toggle_overwrite(), em_undo(), and rl_complete_internal().
#define CC_REDISPLAY 8 |
Definition at line 82 of file histedit.h.
Referenced by ed_redisplay(), el_gets(), and rl_complete_internal().
#define CC_REFRESH 4 |
Definition at line 78 of file histedit.h.
Referenced by c_gets(), ce_inc_search(), cv_csearch_back(), cv_csearch_fwd(), cv_search(), ed_clear_screen(), ed_command(), ed_delete_next_char(), ed_delete_prev_char(), ed_delete_prev_word(), ed_kill_line(), ed_move_to_beg(), ed_move_to_end(), ed_next_char(), ed_prev_char(), ed_prev_word(), ed_start_over(), ed_transpose_chars(), el_gets(), em_copy_prev_word(), em_delete_next_word(), em_delete_or_list(), em_gosmacs_traspose(), em_kill_line(), em_kill_region(), em_lower_case(), em_next_word(), em_upper_case(), em_yank(), hist_get(), rl_complete(), and rl_complete_internal().
#define CC_REFRESH_BEEP 9 |
#define EL_ADDFN 9 |
#define EL_BIND 4 |
#define EL_ECHOTC 7 |
#define EL_EDITMODE 11 |
#define EL_EDITOR 2 |
#define EL_HIST 10 |
#define EL_PROMPT 0 |
Definition at line 126 of file histedit.h.
Referenced by el_get(), el_set(), prompt_get(), prompt_print(), prompt_set(), re_refresh(), and rl_initialize().
#define EL_RPROMPT 12 |
#define EL_SETTC 6 |
#define EL_SETTY 8 |
#define EL_SIGNAL 3 |
#define EL_TELLTC 5 |
#define EL_TERMINAL 1 |
#define H_ADD 9 |
#define H_APPEND 11 |
#define H_CLEAR 19 |
#define H_CURR 8 |
Definition at line 187 of file histedit.h.
Referenced by _history_search_gen(), current_history(), history(), history_get(), history_search_pos(), history_set_pos(), history_total_bytes(), and where_history().
#define H_END 12 |
#define H_ENTER 10 |
#define H_FIRST 3 |
Definition at line 183 of file histedit.h.
Referenced by history(), history_get(), history_set_pos(), history_total_bytes(), and where_history().
#define H_FUNC 0 |
#define H_GETSIZE 2 |
#define H_LAST 4 |
#define H_LOAD 17 |
#define H_NEXT 6 |
Definition at line 186 of file histedit.h.
Referenced by _history_search_gen(), history(), history_search_pos(), history_set_pos(), history_total_bytes(), next_history(), and where_history().
#define H_NEXT_EVENT 15 |
Definition at line 195 of file histedit.h.
Referenced by history(), history_get(), and history_set_pos().
#define H_NEXT_STR 13 |
#define H_PREV 5 |
Definition at line 185 of file histedit.h.
Referenced by _history_search_gen(), history(), history_get(), history_search_pos(), and previous_history().
#define H_PREV_EVENT 16 |
#define H_PREV_STR 14 |
#define H_SAVE 18 |
#define H_SET 7 |
#define H_SETSIZE 1 |
Definition at line 181 of file histedit.h.
Referenced by history(), rl_initialize(), stifle_history(), and unstifle_history().
void el_beep | ( | EditLine_t * | ) |
Definition at line 487 of file el.cxx.
References term_beep().
Referenced by rl_complete_internal().
void el_deletestr | ( | EditLine_t * | , | |
int | ||||
) |
Definition at line 682 of file chared.cxx.
References c_delbefore(), ElLine_t::fBuffer, ElLine_t::fCursor, and EditLine_t::fLine.
Referenced by rl_complete_internal().
void el_end | ( | EditLine_t * | ) |
Definition at line 114 of file el.cxx.
References ch_end(), el_free, el_reset(), EditLine_t::fProg, hist_end(), key_end(), map_end(), NULL, prompt_end(), search_end(), sig_end(), term_end(), and tty_end().
Referenced by rl_cleanup_after_signal(), and rl_initialize().
bool el_eof | ( | EditLine_t * | ) |
Definition at line 711 of file read.cxx.
References ElLine_t::fBuffer, and EditLine_t::fLine.
Referenced by rl_eof().
int el_get | ( | EditLine_t * | , | |
int | , | |||
void * | ||||
) |
Definition at line 278 of file el.cxx.
References EDIT_DISABLED, EL_ABORT, EL_ADDFN, EL_BIND, EL_ECHOTC, EL_EDITMODE, EL_EDITOR, EL_HIST, EL_PROMPT, EL_RPROMPT, EL_SETTC, EL_SETTY, EL_SIGNAL, EL_TELLTC, EL_TERMINAL, EditLine_t::fFlags, func(), HANDLE_SIGNALS, help(), hist_set(), i, map_addfunc(), map_bind(), map_get_editor(), name, NULL, prompt_get(), ptr, str, term_echotc(), term_settc(), term_telltc(), and tty_stty().
int el_getc | ( | EditLine_t * | , | |
char * | ||||
) |
Definition at line 330 of file read.cxx.
References EditLine_t::fCharEd, CMacro_t::fLevel, ElCharEd_t::fMacro, if(), read_preread(), and term__flush().
Referenced by c_gets(), ce_inc_search(), ed_quoted_insert(), node_trav(), read_getcmd(), and rl_read_key().
const char* el_gets | ( | EditLine_t * | , | |
int * | ||||
) |
Definition at line 399 of file read.cxx.
References b, CC_ARGHACK, CC_CURSOR, CC_EOF, CC_ERROR, CC_FATAL, CC_NEWLINE, CC_NORM, CC_REDISPLAY, CC_REFRESH, CC_REFRESH_BEEP, ch_enlargebufs(), ch_reset(), ed_replay_hist(), EDIT_DISABLED, el_gets(), ElState_t::fArgument, ElLine_t::fBuffer, EditLine_t::fCharEd, ElLine_t::fCursor, ElState_t::fDoingArg, EditLine_t::fErrFile, EditLine_t::fFlags, ElMap_t::fFunc, ElMap_t::fHelp, ElLine_t::fLastChar, ElState_t::fLastCmd, CMacro_t::fLevel, ElLine_t::fLimit, EditLine_t::fLine, ElCharEd_t::fMacro, CMacro_t::fMacro, EditLine_t::fMap, ElMap_t::fNFunc, fprintf(), ElState_t::fReplayHist, EditLine_t::fState, highlightKeywords(), matchParentheses(), NO_TTY, NULL, num, OKCMD, re_clear_display(), re_clear_lines(), re_refresh(), re_refresh_cursor(), read_char(), read_getcmd(), retval, size_t, strcpy(), term__flush(), term_beep(), and void.
Referenced by el_gets(), and readline().
const char* el_gets_newline | ( | EditLine_t * | , | |
int * | ||||
) |
Definition at line 677 of file read.cxx.
References ch_reset(), ed_prev_history(), ElHistory_t::fEventNo, EditLine_t::fFlags, EditLine_t::fHistory, ElLine_t::fLastChar, EditLine_t::fLine, ElState_t::fReplayHist, EditLine_t::fState, HANDLE_SIGNALS, NO_TTY, NULL, re_clear_display(), re_refresh(), sig_set(), and term__flush().
Referenced by readline().
EditLine_t* el_init | ( | const char * | , | |
FILE * | , | |||
FILE * | , | |||
FILE * | ||||
) |
Definition at line 67 of file el.cxx.
References ch_init(), el_malloc, EditLine_t::fErrFile, EditLine_t::fFlags, EditLine_t::fIn, EditLine_t::fInFD, EditLine_t::fOutFile, EditLine_t::fProg, hist_init(), key_init(), map_init(), NO_TTY, NULL, prompt_init(), search_init(), sig_init(), term_init(), tty_init(), and void.
Referenced by rl_initialize().
int el_insertstr | ( | EditLine_t * | , | |
const char * | ||||
) |
Definition at line 653 of file chared.cxx.
References c_insert(), ch_enlargebufs(), ElLine_t::fBufColor, ElLine_t::fBuffer, ElLine_t::fCursor, ElLine_t::fLastChar, ElLine_t::fLimit, EditLine_t::fLine, len, and size_t.
Referenced by rl_complete_internal().
const LineInfo_t* el_line | ( | EditLine_t * | ) |
Definition at line 398 of file el.cxx.
References EditLine_t::fLine.
Referenced by rl_complete_internal().
int el_parse | ( | EditLine_t * | , | |
int | , | |||
const char ** | ||||
) |
Referenced by parse_line().
void el_push | ( | EditLine_t * | , | |
const char * | ||||
) |
Definition at line 207 of file read.cxx.
References EL_MAXMACRO, EditLine_t::fCharEd, CMacro_t::fLevel, ElCharEd_t::fMacro, CMacro_t::fMacro, NULL, term__flush(), and term_beep().
Referenced by ce_inc_search(), ed_replay_hist(), read_getcmd(), read_preread(), and rl_insert().
void el_reset | ( | EditLine_t * | ) |
Definition at line 140 of file el.cxx.
References ch_reset(), and tty_cookedmode().
Referenced by el_end(), and rl_reset_terminal().
void el_resize | ( | EditLine_t * | ) |
Definition at line 444 of file el.cxx.
References ElLine_t::fBuffer, EditLine_t::fCursor, ElCoord_t::fH, ElLine_t::fLastChar, EditLine_t::fLine, ElPrompt_t::fPos, EditLine_t::fPrompt, EditLine_t::fRefresh, ElTerm_t::fSize, EditLine_t::fTerm, ElCoord_t::fV, nlines, NULL, ElRefresh_t::r_oldcv, re_clear_lines(), re_refresh(), SIG_BLOCK, SIG_SETMASK, term__flush(), term_change_size(), term_get_size(), and void.
Referenced by sig_handler(), and termResize().
int el_set | ( | EditLine_t * | , | |
int | , | |||
... | ||||
) |
Definition at line 150 of file el.cxx.
References EDIT_DISABLED, EL_ABORT, EL_ADDFN, EL_BIND, EL_ECHOTC, EL_EDITMODE, EL_EDITOR, EL_HIST, EL_PROMPT, EL_RPROMPT, EL_SETTC, EL_SETTY, EL_SIGNAL, EL_TELLTC, EL_TERMINAL, EditLine_t::fErrFile, EditLine_t::fFlags, func(), HANDLE_SIGNALS, help(), hist_set(), i, map_addfunc(), map_bind(), map_set_editor(), name, NULL, prompt_set(), ptr, term_echotc(), term_set(), term_settc(), term_telltc(), and tty_stty().
Referenced by rl_initialize().
int el_source | ( | EditLine_t * | , | |
const char * | ||||
) |
int history | ( | HistoryFcns_t * | , | |
HistEvent_t * | , | |||
int | , | |||
... | ||||
) |
Definition at line 716 of file history.cxx.
References _HE_HIST_READ, _HE_HIST_WRITE, _HE_OK, _HE_PARAM_MISSING, _HE_UNKNOWN, HistoryFcns_t::fAdd, HistoryFcns_t::fClear, HistoryFcns_t::fCurr, HistoryFcns_t::fEnter, HistoryFcns_t::fFirst, HistoryFcns_t::fLast, HistoryFcns_t::fNext, HistEvent_t::fNum, HistoryFcns_t::fPrev, HistoryFcns_t::fRef, HistoryFcns_t::fSet, h, H_ADD, H_APPEND, H_CLEAR, H_CURR, H_END, H_ENTER, H_FIRST, H_FUNC, H_GETSIZE, H_LAST, H_LOAD, H_NEXT, H_NEXT_EVENT, H_NEXT_STR, H_PREV, H_PREV_EVENT, H_PREV_STR, H_SAVE, H_SET, H_SETSIZE, HADD, HCLEAR, HCURR, he_seterrev, HENTER, HFIRST, history_end(), history_getsize(), history_load(), history_next_event(), history_next_string(), history_prev_event(), history_prev_string(), history_save(), history_set_fun(), history_setsize(), HLAST, HNEXT, HPREV, HSET, retval, and str.
Referenced by _history_search_gen(), _move_history(), add_history(), clear_history(), history_get(), history_search_pos(), history_set_pos(), history_total_bytes(), read_history(), readline(), rl_initialize(), stifle_history(), unstifle_history(), where_history(), and write_history().
void history_end | ( | HistoryFcns_t * | ) |
Definition at line 491 of file history.cxx.
References h, history_def_clear(), and history_def_next().
Referenced by history(), rl_cleanup_after_signal(), and rl_initialize().
HistoryFcns_t* history_init | ( | void | ) |
Definition at line 467 of file history.cxx.
References h, h_malloc, history_def_add(), history_def_clear(), history_def_curr(), history_def_enter(), history_def_first(), history_def_init(), history_def_last(), history_def_next(), history_def_prev(), and history_def_set().
Referenced by rl_initialize().