1 /* tilde.h: Externally available variables and function in libtilde.a. */
3 /* Function pointers can be declared as (Function *)foo. */
4 #if !defined (__FUNCTION_DEF)
5 # define __FUNCTION_DEF
6 typedef int Function ();
7 typedef void VFunction ();
8 typedef char *CPFunction ();
9 typedef char **CPPFunction ();
10 #endif /* _FUNCTION_DEF */
12 /* If non-null, this contains the address of a function to call if the
13 standard meaning for expanding a tilde fails. The function is called
14 with the text (sans tilde, as in "foo"), and returns a malloc()'ed string
15 which is the expansion, or a NULL pointer if there is no expansion. */
16 extern Function *tilde_expansion_failure_hook;
18 /* When non-null, this is a NULL terminated array of strings which
19 are duplicates for a tilde prefix. Bash uses this to expand
21 extern char **tilde_additional_prefixes;
23 /* When non-null, this is a NULL terminated array of strings which match
24 the end of a username, instead of just "/". Bash sets this to
26 extern char **tilde_additional_suffixes;
28 /* Return a new string which is the result of tilde expanding STRING. */
29 extern char *tilde_expand ();
31 /* Do the work of tilde expansion on FILENAME. FILENAME starts with a
32 tilde. If there is no expansion, call tilde_expansion_failure_hook. */
33 extern char *tilde_expand_word ();