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