1 /*- 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Christos Zoulas of Cornell University. 7 * 8 * %sccs.include.redist.c% 9 * 10 * @(#)search.h 8.1 (Berkeley) 06/04/93 11 */ 12 13 /* 14 * el.search.h: Line and history searching utilities 15 */ 16 #ifndef _h_el_search 17 #define _h_el_search 18 19 #include "histedit.h" 20 21 typedef struct el_search_t { 22 char *patbuf; /* The pattern buffer */ 23 int patlen; /* Length of the pattern buffer */ 24 int patdir; /* Direction of the last search */ 25 int chadir; /* Character search direction */ 26 char chacha; /* Character we are looking for */ 27 } el_search_t; 28 29 30 protected int el_match __P((const char *, const char *)); 31 protected int search_init __P((EditLine *)); 32 protected void search_end __P((EditLine *)); 33 protected int c_hmatch __P((EditLine *, const char *)); 34 protected void c_setpat __P((EditLine *)); 35 protected el_action_t ce_inc_search __P((EditLine *, int)); 36 protected el_action_t cv_search __P((EditLine *, int)); 37 protected el_action_t ce_search_line __P((EditLine *, char *, int)); 38 protected el_action_t cv_repeat_srch __P((EditLine *, int)); 39 protected el_action_t cv_csearch_back __P((EditLine *, int, int, int)); 40 protected el_action_t cv_csearch_fwd __P((EditLine *, int, int, int)); 41 42 #endif /* _h_el_search */ 43