Deleted Added
full compact
search.h (8870) search.h (84260)
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 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)search.h 8.1 (Berkeley) 6/4/93
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 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)search.h 8.1 (Berkeley) 6/4/93
37 * $NetBSD: search.h,v 1.4 1999/07/02 15:21:27 simonb Exp $
38 * $FreeBSD: head/lib/libedit/search.h 84260 2001-10-01 08:41:27Z obrien $
37 */
38
39/*
40 * el.search.h: Line and history searching utilities
41 */
42#ifndef _h_el_search
39 */
40
41/*
42 * el.search.h: Line and history searching utilities
43 */
44#ifndef _h_el_search
43#define _h_el_search
45#define _h_el_search
44
45#include "histedit.h"
46
47typedef struct el_search_t {
46
47#include "histedit.h"
48
49typedef struct el_search_t {
48 char *patbuf; /* The pattern buffer */
49 int patlen; /* Length of the pattern buffer */
50 int patdir; /* Direction of the last search */
51 int chadir; /* Character search direction */
52 char chacha; /* Character we are looking for */
50 char *patbuf; /* The pattern buffer */
51 size_t patlen; /* Length of the pattern buffer */
52 int patdir; /* Direction of the last search */
53 int chadir; /* Character search direction */
54 char chacha; /* Character we are looking for */
53} el_search_t;
54
55
55} el_search_t;
56
57
56protected int el_match __P((const char *, const char *));
57protected int search_init __P((EditLine *));
58protected void search_end __P((EditLine *));
59protected int c_hmatch __P((EditLine *, const char *));
60protected void c_setpat __P((EditLine *));
61protected el_action_t ce_inc_search __P((EditLine *, int));
62protected el_action_t cv_search __P((EditLine *, int));
63protected el_action_t ce_search_line __P((EditLine *, char *, int));
64protected el_action_t cv_repeat_srch __P((EditLine *, int));
65protected el_action_t cv_csearch_back __P((EditLine *, int, int, int));
66protected el_action_t cv_csearch_fwd __P((EditLine *, int, int, int));
58protected int el_match(const char *, const char *);
59protected int search_init(EditLine *);
60protected void search_end(EditLine *);
61protected int c_hmatch(EditLine *, const char *);
62protected void c_setpat(EditLine *);
63protected el_action_t ce_inc_search(EditLine *, int);
64protected el_action_t cv_search(EditLine *, int);
65protected el_action_t ce_search_line(EditLine *, char *, int);
66protected el_action_t cv_repeat_srch(EditLine *, int);
67protected el_action_t cv_csearch_back(EditLine *, int, int, int);
68protected el_action_t cv_csearch_fwd(EditLine *, int, int, int);
67
68#endif /* _h_el_search */
69
70#endif /* _h_el_search */