xref: /netbsd-src/usr.bin/mail/complete.h (revision ca13337dfe83da9cab62c16d8080547fac7cc218)
1*ca13337dSchristos /*	$NetBSD: complete.h,v 1.6 2009/04/10 13:08:24 christos Exp $	*/
28207b28aSchristos 
38207b28aSchristos /*-
48207b28aSchristos  * Copyright (c) 2006 The NetBSD Foundation, Inc.
58207b28aSchristos  * All rights reserved.
68207b28aSchristos  *
78207b28aSchristos  * This code is derived from software contributed to The NetBSD Foundation
88207b28aSchristos  * by Anon Ymous.
98207b28aSchristos  *
108207b28aSchristos  * Redistribution and use in source and binary forms, with or without
118207b28aSchristos  * modification, are permitted provided that the following conditions
128207b28aSchristos  * are met:
138207b28aSchristos  * 1. Redistributions of source code must retain the above copyright
148207b28aSchristos  *    notice, this list of conditions and the following disclaimer.
158207b28aSchristos  * 2. Redistributions in binary form must reproduce the above copyright
168207b28aSchristos  *    notice, this list of conditions and the following disclaimer in the
178207b28aSchristos  *    documentation and/or other materials provided with the distribution.
188207b28aSchristos  *
198207b28aSchristos  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
208207b28aSchristos  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
218207b28aSchristos  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
228207b28aSchristos  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
238207b28aSchristos  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
248207b28aSchristos  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
258207b28aSchristos  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
268207b28aSchristos  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
278207b28aSchristos  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
288207b28aSchristos  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
298207b28aSchristos  * POSSIBILITY OF SUCH DAMAGE.
308207b28aSchristos  */
318207b28aSchristos 
3243c97412Schristos 
33798fbc60Schristos #ifndef __COMPLETE_H__
34798fbc60Schristos #define __COMPLETE_H__
3543c97412Schristos 
368207b28aSchristos #include <histedit.h>
378207b28aSchristos 
388207b28aSchristos typedef struct {
398207b28aSchristos 	EditLine	*el;			/* editline(3) editline structure */
408207b28aSchristos 	History		*hist;			/* editline(3) history structure */
418207b28aSchristos } el_mode_t;
428207b28aSchristos 
438207b28aSchristos struct el_modes_s {
448207b28aSchristos 	el_mode_t command;
458207b28aSchristos 	el_mode_t string;
468207b28aSchristos 	el_mode_t filec;
478207b28aSchristos 	el_mode_t mime_enc;
488207b28aSchristos };
498207b28aSchristos 
508207b28aSchristos extern struct el_modes_s elm;
518207b28aSchristos 
528207b28aSchristos char *my_gets(el_mode_t *, const char *, char *);
538207b28aSchristos void init_editline(void);
548207b28aSchristos 
558207b28aSchristos /*
568207b28aSchristos  * User knobs: environment names used by this module.
578207b28aSchristos  */
588207b28aSchristos #define ENAME_EL_COMPLETION_KEYS	"el-completion-keys"
598207b28aSchristos #define ENAME_EL_EDITOR			"el-editor"
608207b28aSchristos #define ENAME_EL_HISTORY_SIZE		"el-history-size"
6143c97412Schristos 
62798fbc60Schristos #endif /* __COMPLETE_H__ */
63