3 /* tilde.h: Externally available variables and function in libtilde.a.
4 Id: tilde.h,v 1.3 2004/04/11 17:56:46 karl Exp
6 This file has appeared in prior works by the Free Software Foundation;
7 thus it carries copyright dates from 1988 through 1993.
9 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 2004 Free Software
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2, or (at your option)
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 Written by Brian Fox (bfox@ai.mit.edu). */
33 /* If non-null, this contains the address of a function to call if the
34 standard meaning for expanding a tilde fails. The function is called
35 with the text (sans tilde, as in "foo"), and returns a malloc()'ed string
36 which is the expansion, or a NULL pointer if there is no expansion. */
37 extern CFunction
*tilde_expansion_failure_hook
;
39 /* When non-null, this is a NULL terminated array of strings which
40 are duplicates for a tilde prefix. Bash uses this to expand
42 extern char **tilde_additional_prefixes
;
44 /* When non-null, this is a NULL terminated array of strings which match
45 the end of a username, instead of just "/". Bash sets this to
47 extern char **tilde_additional_suffixes
;
49 /* Return a new string which is the result of tilde expanding STRING. */
50 extern char *tilde_expand (char *string
);
52 /* Do the work of tilde expansion on FILENAME. FILENAME starts with a
53 tilde. If there is no expansion, call tilde_expansion_failure_hook. */
54 extern char *tilde_expand_word (char *filename
);
56 #endif /* not TILDE_H */