annotate readline/tilde.h @ 2870:3241d0057e78

[project @ 1997-04-19 01:21:29 by jwe]
author jwe
date Sat, 19 Apr 1997 01:23:06 +0000
parents 6548bc27329b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1432
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
1 /* tilde.h: Externally available variables and function in libtilde.a. */
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
2
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
3 #if !defined (__TILDE_H__)
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
4 # define __TILDE_H__
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
5
1464
6548bc27329b [project @ 1995-09-22 07:29:21 by jwe]
jwe
parents: 1432
diff changeset
6 #ifdef __cplusplus
6548bc27329b [project @ 1995-09-22 07:29:21 by jwe]
jwe
parents: 1432
diff changeset
7 extern "C" {
6548bc27329b [project @ 1995-09-22 07:29:21 by jwe]
jwe
parents: 1432
diff changeset
8 #endif
6548bc27329b [project @ 1995-09-22 07:29:21 by jwe]
jwe
parents: 1432
diff changeset
9
1432
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
10 /* Function pointers can be declared as (Function *)foo. */
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
11 #if !defined (__FUNCTION_DEF)
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
12 # define __FUNCTION_DEF
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
13 typedef int Function ();
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
14 typedef void VFunction ();
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
15 typedef char *CPFunction ();
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
16 typedef char **CPPFunction ();
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
17 #endif /* _FUNCTION_DEF */
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
18
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
19 /* If non-null, this contains the address of a function to call if the
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
20 standard meaning for expanding a tilde fails. The function is called
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
21 with the text (sans tilde, as in "foo"), and returns a malloc()'ed string
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
22 which is the expansion, or a NULL pointer if there is no expansion. */
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
23 extern CPFunction *tilde_expansion_failure_hook;
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
24
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
25 /* When non-null, this is a NULL terminated array of strings which
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
26 are duplicates for a tilde prefix. Bash uses this to expand
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
27 `=~' and `:~'. */
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
28 extern char **tilde_additional_prefixes;
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
29
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
30 /* When non-null, this is a NULL terminated array of strings which match
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
31 the end of a username, instead of just "/". Bash sets this to
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
32 `:' and `=~'. */
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
33 extern char **tilde_additional_suffixes;
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
34
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
35 /* Return a new string which is the result of tilde expanding STRING. */
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
36 extern char *tilde_expand ();
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
37
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
38 /* Do the work of tilde expansion on FILENAME. FILENAME starts with a
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
39 tilde. If there is no expansion, call tilde_expansion_failure_hook. */
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
40 extern char *tilde_expand_word ();
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
41
1464
6548bc27329b [project @ 1995-09-22 07:29:21 by jwe]
jwe
parents: 1432
diff changeset
42 #ifdef __cplusplus
6548bc27329b [project @ 1995-09-22 07:29:21 by jwe]
jwe
parents: 1432
diff changeset
43 }
6548bc27329b [project @ 1995-09-22 07:29:21 by jwe]
jwe
parents: 1432
diff changeset
44 #endif
6548bc27329b [project @ 1995-09-22 07:29:21 by jwe]
jwe
parents: 1432
diff changeset
45
1432
4c3d46b02f99 [project @ 1995-09-19 07:20:14 by jwe]
jwe
parents:
diff changeset
46 #endif /* __TILDE_H__ */