147117Sbostic /*- 260698Sbostic * Copyright (c) 1991, 1993 360698Sbostic * The Regents of the University of California. All rights reserved. 447117Sbostic * 547117Sbostic * This code is derived from software contributed to Berkeley by 647117Sbostic * Kenneth Almquist. 747117Sbostic * 847117Sbostic * %sccs.include.redist.c% 947117Sbostic * 10*69272Schristos * @(#)expand.h 8.2 (Berkeley) 05/04/95 1147117Sbostic */ 1247117Sbostic 1347117Sbostic struct strlist { 1447117Sbostic struct strlist *next; 1547117Sbostic char *text; 1647117Sbostic }; 1747117Sbostic 1847117Sbostic 1947117Sbostic struct arglist { 2047117Sbostic struct strlist *list; 2147117Sbostic struct strlist **lastp; 2247117Sbostic }; 2347117Sbostic 2453300Smarc /* 2553300Smarc * expandarg() flags 2653300Smarc */ 2753300Smarc #define EXP_FULL 0x1 /* perform word splitting & file globbing */ 2853300Smarc #define EXP_TILDE 0x2 /* do normal tilde expansion */ 2953300Smarc #define EXP_VARTILDE 0x4 /* expand tildes in an assignment */ 3053300Smarc #define EXP_REDIR 0x8 /* file glob for a redirection (1 match only) */ 3155787Smarc #define EXP_CASE 0x10 /* keeps quotes around for CASE pattern */ 3253300Smarc 3353300Smarc 3447117Sbostic union node; 35*69272Schristos void expandhere __P((union node *, int)); 36*69272Schristos void expandarg __P((union node *, struct arglist *, int)); 37*69272Schristos void expari __P((int)); 38*69272Schristos int patmatch __P((char *, char *)); 39*69272Schristos void rmescapes __P((char *)); 40*69272Schristos int casematch __P((union node *, char *)); 41