Commit | Line | Data |
---|---|---|
792d1bd5 | 1 | /*- |
d1b73048 KB |
2 | * Copyright (c) 1991, 1993 |
3 | * The Regents of the University of California. All rights reserved. | |
792d1bd5 KB |
4 | * |
5 | * This code is derived from software contributed to Berkeley by | |
6 | * Kenneth Almquist. | |
7 | * | |
8 | * %sccs.include.redist.c% | |
9 | * | |
d1b73048 | 10 | * @(#)expand.h 8.1 (Berkeley) %G% |
792d1bd5 KB |
11 | */ |
12 | ||
13 | struct strlist { | |
14 | struct strlist *next; | |
15 | char *text; | |
16 | }; | |
17 | ||
18 | ||
19 | struct arglist { | |
20 | struct strlist *list; | |
21 | struct strlist **lastp; | |
22 | }; | |
23 | ||
e2bf1cd5 MT |
24 | /* |
25 | * expandarg() flags | |
26 | */ | |
27 | #define EXP_FULL 0x1 /* perform word splitting & file globbing */ | |
28 | #define EXP_TILDE 0x2 /* do normal tilde expansion */ | |
29 | #define EXP_VARTILDE 0x4 /* expand tildes in an assignment */ | |
30 | #define EXP_REDIR 0x8 /* file glob for a redirection (1 match only) */ | |
0e7ccb32 | 31 | #define EXP_CASE 0x10 /* keeps quotes around for CASE pattern */ |
e2bf1cd5 MT |
32 | |
33 | ||
792d1bd5 KB |
34 | #ifdef __STDC__ |
35 | union node; | |
36 | void expandarg(union node *, struct arglist *, int); | |
37 | void expandhere(union node *, int); | |
38 | int patmatch(char *, char *); | |
39 | void rmescapes(char *); | |
40 | int casematch(union node *, char *); | |
41 | #else | |
42 | void expandarg(); | |
43 | void expandhere(); | |
44 | int patmatch(); | |
45 | void rmescapes(); | |
46 | int casematch(); | |
47 | #endif |