1*4ee54736Schristos /* $NetBSD: filecomplete.h,v 1.15 2023/04/25 17:51:32 christos Exp $ */ 241a59814Sdsl 341a59814Sdsl /*- 441a59814Sdsl * Copyright (c) 1997 The NetBSD Foundation, Inc. 541a59814Sdsl * All rights reserved. 641a59814Sdsl * 741a59814Sdsl * This code is derived from software contributed to The NetBSD Foundation 841a59814Sdsl * by Jaromir Dolecek. 941a59814Sdsl * 1041a59814Sdsl * Redistribution and use in source and binary forms, with or without 1141a59814Sdsl * modification, are permitted provided that the following conditions 1241a59814Sdsl * are met: 1341a59814Sdsl * 1. Redistributions of source code must retain the above copyright 1441a59814Sdsl * notice, this list of conditions and the following disclaimer. 1541a59814Sdsl * 2. Redistributions in binary form must reproduce the above copyright 1641a59814Sdsl * notice, this list of conditions and the following disclaimer in the 1741a59814Sdsl * documentation and/or other materials provided with the distribution. 1841a59814Sdsl * 1941a59814Sdsl * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 2041a59814Sdsl * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2141a59814Sdsl * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2241a59814Sdsl * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2341a59814Sdsl * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2441a59814Sdsl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2541a59814Sdsl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2641a59814Sdsl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2741a59814Sdsl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2841a59814Sdsl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2941a59814Sdsl * POSSIBILITY OF SUCH DAMAGE. 3041a59814Sdsl */ 3141a59814Sdsl #ifndef _FILECOMPLETE_H_ 3241a59814Sdsl #define _FILECOMPLETE_H_ 3341a59814Sdsl 3441a59814Sdsl int fn_complete(EditLine *, 3541a59814Sdsl char *(*)(const char *, int), 3641a59814Sdsl char **(*)(const char *, int, int), 370594af80Schristos const wchar_t *, const wchar_t *, const char *(*)(const char *), size_t, 3841a59814Sdsl int *, int *, int *, int *); 3965371df8Schristos int fn_complete2(EditLine *, 4065371df8Schristos char *(*)(const char *, int), 4165371df8Schristos char **(*)(const char *, int, int), 4265371df8Schristos const wchar_t *, const wchar_t *, const char *(*)(const char *), size_t, 4365371df8Schristos int *, int *, int *, int *, unsigned int); 4402a0eff7Schristos #define FN_QUOTE_MATCH 1U /* Quote the returned match */ 4541a59814Sdsl 463a89c576Sabhinav void fn_display_match_list(EditLine *, char **, size_t, size_t, 473a89c576Sabhinav const char *(*)(const char *)); 4819c38590Schristos char *fn_tilde_expand(const char *); 4919c38590Schristos char *fn_filename_completion_function(const char *, int); 5041a59814Sdsl 51*4ee54736Schristos /* XXX: readline */ 52*4ee54736Schristos char **completion_matches(const char *, char *(*)(const char *, int)); 53*4ee54736Schristos 5441a59814Sdsl #endif 55