search.cxx File Reference

#include "compat.h"
#include "sys.h"
#include <stdlib.h>
#include <sys/types.h>
#include <regex.h>
#include "el.h"
#include "enhance.h"

Go to the source code of this file.

Defines

#define ANCHOR_SEARCHES   1
#define EL_CURSOR(el)
#define LEN   2

Functions

el_protected int search_init (EditLine_t *el)
el_protected void search_end (EditLine_t *el)
el_protected int el_match (const char *str, const char *pat)
el_protected int c_hmatch (EditLine_t *el, const char *str)
el_protected void c_setpat (EditLine_t *el)
el_protected ElAction_t ce_inc_search (EditLine_t *el, int dir)
el_protected ElAction_t cv_search (EditLine_t *el, int dir)
el_protected ElAction_t ce_search_line (EditLine_t *el, char *pattern, int dir)
el_protected ElAction_t cv_repeat_srch (EditLine_t *el, int c)
el_protected ElAction_t cv_csearch_back (EditLine_t *el, int ch, int count, int tflag)
el_protected ElAction_t cv_csearch_fwd (EditLine_t *el, int ch, int count, int tflag)


Define Documentation

#define ANCHOR_SEARCHES   1

Definition at line 64 of file search.cxx.

Referenced by ce_inc_search().

#define EL_CURSOR ( el   ) 

Value:

((el)->fLine.fCursor + (((el)->fMap.fType == MAP_VI) && \
                            ((el)->fMap.fCurrent == (el)->fMap.fAlt)))

Definition at line 70 of file search.cxx.

Referenced by c_setpat().

#define LEN   2

Referenced by cv_search(), and inflate_codes().


Function Documentation

el_protected int c_hmatch ( EditLine_t el,
const char *  str 
)

Definition at line 169 of file search.cxx.

References el_match(), EditLine_t::fErrFile, ElSearch_t::fPatBuf, fprintf(), EditLine_t::fSearch, and void.

Referenced by ed_search_next_history(), and ed_search_prev_history().

el_protected void c_setpat ( EditLine_t el  ) 

Definition at line 183 of file search.cxx.

References ED_SEARCH_NEXT_HISTORY, ED_SEARCH_PREV_HISTORY, EL_BUFSIZ, EL_CURSOR, ElLine_t::fBuffer, EditLine_t::fErrFile, ElHistory_t::fEventNo, EditLine_t::fHistory, ElLine_t::fLastChar, ElState_t::fLastCmd, EditLine_t::fLine, ElSearch_t::fPatBuf, ElSearch_t::fPatLen, fprintf(), EditLine_t::fSearch, EditLine_t::fState, and void.

Referenced by ed_search_next_history(), and ed_search_prev_history().

el_protected ElAction_t ce_inc_search ( EditLine_t el,
int  dir 
)

Definition at line 217 of file search.cxx.

References ANCHOR_SEARCHES, c__next_word(), CC_ERROR, CC_NORM, CC_REFRESH, ce__isword(), ce_inc_search(), ce_search_line(), ED_DELETE_PREV_CHAR, ED_DIGIT, ed_end_of_file(), ED_INSERT, ed_search_next_history(), ED_SEARCH_NEXT_HISTORY, ED_SEARCH_PREV_HISTORY, ed_search_prev_history(), EL_BUFSIZ, el_getc(), el_push(), EM_INC_SEARCH_NEXT, EM_INC_SEARCH_PREV, ElLine_t::fBufColor, ElLine_t::fBuffer, ElMap_t::fCurrent, ElLine_t::fCursor, ElHistory_t::fEventNo, EditLine_t::fHistory, ElLine_t::fLastChar, ElState_t::fLastCmd, ElLine_t::fLimit, EditLine_t::fLine, EditLine_t::fMap, ElSearch_t::fPatBuf, ElSearch_t::fPatLen, EditLine_t::fSearch, EditLine_t::fState, hist_get(), isglob, re_refresh(), term_beep(), and void.

Referenced by ce_inc_search(), em_inc_search_next(), and em_inc_search_prev().

el_protected ElAction_t ce_search_line ( EditLine_t el,
char *  pattern,
int  dir 
)

Definition at line 603 of file search.cxx.

References CC_ERROR, CC_NORM, ED_SEARCH_PREV_HISTORY, el_match(), ElLine_t::fBuffer, ElLine_t::fCursor, and EditLine_t::fLine.

Referenced by ce_inc_search().

el_protected ElAction_t cv_csearch_back ( EditLine_t el,
int  ch,
int  count,
int  tflag 
)

Definition at line 655 of file search.cxx.

References CC_ERROR, CC_NORM, CC_REFRESH, cv_delfini(), DELETE, CVCmd_t::fAction, ElLine_t::fBuffer, EditLine_t::fCharEd, ElLine_t::fCursor, EditLine_t::fLine, ElCharEd_t::fVCmd, and re_refresh_cursor().

el_protected ElAction_t cv_csearch_fwd ( EditLine_t el,
int  ch,
int  count,
int  tflag 
)

Definition at line 693 of file search.cxx.

References CC_ERROR, CC_NORM, CC_REFRESH, cv_delfini(), DELETE, CVCmd_t::fAction, EditLine_t::fCharEd, ElLine_t::fCursor, ElLine_t::fLastChar, EditLine_t::fLine, ElCharEd_t::fVCmd, and re_refresh_cursor().

el_protected ElAction_t cv_repeat_srch ( EditLine_t el,
int  c 
)

Definition at line 631 of file search.cxx.

References CC_ERROR, ed_search_next_history(), ED_SEARCH_NEXT_HISTORY, ED_SEARCH_PREV_HISTORY, ed_search_prev_history(), ElLine_t::fBuffer, EditLine_t::fErrFile, ElLine_t::fLastChar, ElState_t::fLastCmd, EditLine_t::fLine, ElSearch_t::fPatBuf, ElSearch_t::fPatLen, fprintf(), EditLine_t::fSearch, EditLine_t::fState, and void.

el_protected ElAction_t cv_search ( EditLine_t el,
int  dir 
)

Definition at line 511 of file search.cxx.

References c_gets(), c_insert(), CC_ERROR, CC_NEWLINE, CC_REFRESH, ed_search_next_history(), ED_SEARCH_PREV_HISTORY, ed_search_prev_history(), EL_BUFSIZ, ElLine_t::fBuffer, ElLine_t::fCursor, ElLine_t::fLastChar, ElState_t::fLastCmd, EditLine_t::fLine, ElSearch_t::fPatBuf, ElSearch_t::fPatDir, ElSearch_t::fPatLen, EditLine_t::fSearch, EditLine_t::fState, LEN, re_goto_bottom(), re_refresh(), and void.

el_protected int el_match ( const char *  str,
const char *  pat 
)

Definition at line 120 of file search.cxx.

References free(), NULL, regcomp(), regexec(), regexp(), and regfree().

Referenced by c_hmatch(), ce_search_line(), and el_parse().

el_protected void search_end ( EditLine_t el  ) 

Definition at line 96 of file search.cxx.

References el_free, ElSearch_t::fPatBuf, EditLine_t::fSearch, and NULL.

Referenced by el_end().

el_protected int search_init ( EditLine_t el  ) 

Definition at line 78 of file search.cxx.

References EL_BUFSIZ, el_malloc, ElSearch_t::fChaCha, ElSearch_t::fChaDir, ElSearch_t::fPatBuf, ElSearch_t::fPatDir, ElSearch_t::fPatLen, EditLine_t::fSearch, and NULL.

Referenced by el_init().


Generated on Tue Jul 5 15:57:25 2011 for ROOT_528-00b_version by  doxygen 1.5.1