1148834Sstefanf/*-
2148834Sstefanf * Copyright (c) 2001 The NetBSD Foundation, Inc.
3148834Sstefanf * All rights reserved.
4148834Sstefanf *
5148834Sstefanf * This code is derived from software contributed to The NetBSD Foundation
6148834Sstefanf * by Anthony Mallet.
7148834Sstefanf *
8148834Sstefanf * Redistribution and use in source and binary forms, with or without
9148834Sstefanf * modification, are permitted provided that the following conditions
10148834Sstefanf * are met:
11148834Sstefanf * 1. Redistributions of source code must retain the above copyright
12148834Sstefanf *    notice, this list of conditions and the following disclaimer.
13148834Sstefanf * 2. Redistributions in binary form must reproduce the above copyright
14148834Sstefanf *    notice, this list of conditions and the following disclaimer in the
15148834Sstefanf *    documentation and/or other materials provided with the distribution.
16148834Sstefanf *
17148834Sstefanf * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
18148834Sstefanf * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19148834Sstefanf * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20148834Sstefanf * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
21148834Sstefanf * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22148834Sstefanf * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23148834Sstefanf * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24148834Sstefanf * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25148834Sstefanf * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26148834Sstefanf * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27148834Sstefanf * POSSIBILITY OF SUCH DAMAGE.
28148834Sstefanf *
29268782Spfg *	$NetBSD: read.h,v 1.6 2008/04/29 06:53:01 martin Exp $
30148834Sstefanf * $FreeBSD$
31148834Sstefanf */
32148834Sstefanf
33148834Sstefanf/*
34148834Sstefanf * el.read.h: Character reading functions
35148834Sstefanf */
36148834Sstefanf#ifndef	_h_el_read
37148834Sstefanf#define	_h_el_read
38148834Sstefanf
39148834Sstefanftypedef int (*el_rfunc_t)(EditLine *, char *);
40148834Sstefanf
41148834Sstefanftypedef struct el_read_t {
42148834Sstefanf	el_rfunc_t	read_char;	/* Function to read a character */
43148834Sstefanf} el_read_t;
44148834Sstefanf
45148834Sstefanfprotected int		read_init(EditLine *);
46148834Sstefanfprotected void		read_prepare(EditLine *);
47148834Sstefanfprotected void		read_finish(EditLine *);
48148834Sstefanfprotected int		el_read_setfn(EditLine *, el_rfunc_t);
49148834Sstefanfprotected el_rfunc_t	el_read_getfn(EditLine *);
50148834Sstefanf
51148834Sstefanf#endif /* _h_el_read */
52