Changeset View
Changeset View
Standalone View
Standalone View
lib/libedit/search.h
/* $NetBSD: search.h,v 1.12 2016/02/16 15:53:48 christos Exp $ */ | /* $NetBSD: search.h,v 1.14 2016/05/09 21:46:56 christos Exp $ */ | ||||
/*- | /*- | ||||
* Copyright (c) 1992, 1993 | * Copyright (c) 1992, 1993 | ||||
* The Regents of the University of California. All rights reserved. | * The Regents of the University of California. All rights reserved. | ||||
* | * | ||||
* This code is derived from software contributed to Berkeley by | * This code is derived from software contributed to Berkeley by | ||||
* Christos Zoulas of Cornell University. | * Christos Zoulas of Cornell University. | ||||
* | * | ||||
Show All 27 Lines | |||||
/* | /* | ||||
* el.search.h: Line and history searching utilities | * el.search.h: Line and history searching utilities | ||||
*/ | */ | ||||
#ifndef _h_el_search | #ifndef _h_el_search | ||||
#define _h_el_search | #define _h_el_search | ||||
typedef struct el_search_t { | typedef struct el_search_t { | ||||
Char *patbuf; /* The pattern buffer */ | wchar_t *patbuf; /* The pattern buffer */ | ||||
size_t patlen; /* Length of the pattern buffer */ | size_t patlen; /* Length of the pattern buffer */ | ||||
int patdir; /* Direction of the last search */ | int patdir; /* Direction of the last search */ | ||||
int chadir; /* Character search direction */ | int chadir; /* Character search direction */ | ||||
Char chacha; /* Character we are looking for */ | wchar_t chacha; /* Character we are looking for */ | ||||
char chatflg; /* 0 if f, 1 if t */ | char chatflg; /* 0 if f, 1 if t */ | ||||
} el_search_t; | } el_search_t; | ||||
protected int el_match(const Char *, const Char *); | libedit_private int el_match(const wchar_t *, const wchar_t *); | ||||
protected int search_init(EditLine *); | libedit_private int search_init(EditLine *); | ||||
protected void search_end(EditLine *); | libedit_private void search_end(EditLine *); | ||||
protected int c_hmatch(EditLine *, const Char *); | libedit_private int c_hmatch(EditLine *, const wchar_t *); | ||||
protected void c_setpat(EditLine *); | libedit_private void c_setpat(EditLine *); | ||||
protected el_action_t ce_inc_search(EditLine *, int); | libedit_private el_action_t ce_inc_search(EditLine *, int); | ||||
protected el_action_t cv_search(EditLine *, int); | libedit_private el_action_t cv_search(EditLine *, int); | ||||
protected el_action_t ce_search_line(EditLine *, int); | libedit_private el_action_t ce_search_line(EditLine *, int); | ||||
protected el_action_t cv_repeat_srch(EditLine *, wint_t); | libedit_private el_action_t cv_repeat_srch(EditLine *, wint_t); | ||||
protected el_action_t cv_csearch(EditLine *, int, wint_t, int, int); | libedit_private el_action_t cv_csearch(EditLine *, int, wint_t, int, int); | ||||
#endif /* _h_el_search */ | #endif /* _h_el_search */ |