]>
Commit | Line | Data |
---|---|---|
5e98bbab PB |
1 | /* tilde.h: Externally available variables and function in libtilde.a. */ |
2 | ||
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 */ | |
11 | ||
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; | |
17 | ||
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 | |
20 | `=~' and `:~'. */ | |
21 | extern char **tilde_additional_prefixes; | |
22 | ||
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 | |
25 | `:' and `=~'. */ | |
26 | extern char **tilde_additional_suffixes; | |
27 | ||
28 | /* Return a new string which is the result of tilde expanding STRING. */ | |
29 | extern char *tilde_expand (); | |
30 | ||
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 (); |