#include "shell.h"#include "main.h"#include "nodes.h"#include "eval.h"#include "expand.h"#include "syntax.h"#include "parser.h"#include "jobs.h"#include "options.h"#include "var.h"#include "input.h"#include "output.h"#include "memalloc.h"#include "error.h"#include "mystring.h"#include <sys/types.h>#include <sys/stat.h>#include <errno.h>#include <dirent.h>Include dependency graph for expand.c:

Go to the source code of this file.
Data Structures | |
| struct | ifsregion |
Defines | |
| #define | MAXLOGNAME 32 |
| #define | MAXPWLINE 128 |
Functions | |
| STATIC void | argstr () |
| STATIC void | expbackq () |
| STATIC char * | evalvar () |
| STATIC int | varisset () |
| STATIC void | varvalue () |
| STATIC void | recordregion () |
| STATIC void | ifsbreakup () |
| STATIC void | expandmeta () |
| STATIC void | expmeta () |
| STATIC void | addfname () |
| STATIC struct strlist * | expsort () |
| STATIC struct strlist * | msort () |
| STATIC int | pmatch () |
| STATIC char * | expudir () |
| void | expandhere (union node *arg, int fd) |
| void | expandarg (union node *arg, struct arglist *arglist, full) |
| STATIC void | argstr (char *p, full) |
| STATIC void | expbackq (union node *cmd, quoted, full) |
| STATIC char * | evalvar (char *p, full) |
| STATIC int | varisset (char name) |
| STATIC void | varvalue (char name, quoted, allow_split) |
| STATIC void | recordregion (start, end, nulonly) |
| STATIC void | ifsbreakup (char *string, struct arglist *arglist) |
| STATIC void | expandmeta (struct strlist *str) |
| char * | pfgets () |
| STATIC char * | expudir (char *path) |
| STATIC void | expmeta (char *enddir, char *name) |
| STATIC void | addfname (char *name) |
| STATIC struct strlist * | expsort (struct strlist *str) |
| STATIC struct strlist * | msort (struct strlist *list, len) |
| int | patmatch (char *pattern, char *string) |
| STATIC int | pmatch (char *pattern, char *string) |
| void | rmescapes (char *str) |
| int | casematch (union node *pattern, char *val) |
Variables | |
| static char | sccsid [] = "@(#)expand.c 5.1 (Berkeley) 3/7/91" |
| char * | expdest |
| nodelist * | argbackq |
| ifsregion | ifsfirst |
| ifsregion * | ifslastp |
| arglist | exparg |
| int | didudir |
| char * | expdir |
|
|
Definition at line 711 of file expand.c. Referenced by expudir(). |
|
|
Definition at line 712 of file expand.c. Referenced by expudir(). |
|
|
Definition at line 921 of file expand.c. References exparg, arglist::lastp, strlist::next, scopy, sp, stalloc(), and strlen(). |
|
|
|
|
||||||||||||
|
Definition at line 212 of file expand.c. References argbackq, c, CTLBACKQ, CTLENDVAR, CTLESC, CTLQUOTE, CTLVAR, evalvar(), expbackq(), expdest, and STPUTC. |
|
|
Referenced by casematch(), evalvar(), and expandarg(). |
|
||||||||||||
|
Definition at line 1139 of file expand.c. References argbackq, argstr(), expdest, grabstackstr, ifslastp, NULL, patmatch(), popstackmark(), result, setstackmark(), STARTSTACKSTR, and STPUTC. Referenced by evalcase(). |
|
||||||||||||
|
Definition at line 325 of file expand.c. References argbackq, argstr(), c, CTLBACKQ, CTLENDVAR, CTLESC, CTLQUOTE, error, errout, expdest, flags, herefd, lookupvar(), shparam::nparam, NULL, nullstr, outfmt(), recordregion(), set(), setvar(), shellparam, special(), stackblock, STACKSTRNUL, STADJUST, STPUTC, strchr, syntax, val, varisset(), varvalue(), VSASSIGN, VSMINUS, VSNORMAL, VSNUL, VSPLUS, VSQUOTE, and VSTYPE. |
|
|
Referenced by argstr(). |
|
||||||||||||||||
|
Definition at line 157 of file expand.c. References argbackq, argstr(), ckfree, didudir, expandmeta(), exparg, expdest, grabstackstr, ifsbreakup(), ifsfirst, ifslastp, INTOFF, INTON, arglist::lastp, arglist::list, ifsregion::next, NULL, p, sp, stalloc(), STARTSTACKSTR, and STPUTC. Referenced by evalcase(), evalcommand(), evalfor(), expandhere(), and expredir(). |
|
||||||||||||
|
Definition at line 139 of file expand.c. References expandarg(), expdest, herefd, NULL, stackblock, and xwrite(). Referenced by openhere(). |
|
|
Definition at line 646 of file expand.c. References c, ckmalloc(), exparg, expudir(), fflag, i, INTOFF, arglist::lastp, NULL, sp, and strlen(). |
|
|
Referenced by expandarg(). |
|
||||||||||||||||
|
Definition at line 249 of file expand.c. References argbackq, EINTR, errno, evalbackcmd(), expdest, grabstackstr, herefd, i, if(), ifsfirst, ifslastp, in, INTOFF, p, read, stackblock, syntax, TRACE, and ungrabstackstr(). |
|
|
Referenced by argstr(). |
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 718 of file expand.c. References didudir, endpwent(), getpwnam(), i, lookupvar(), MAXLOGNAME, MAXPWLINE, NULL, pfgets(), popfile(), prefix, passwd::pw_dir, r, scopy, setinputfile(), stalloc(), strlen(), and TRACE. |
|
|
Referenced by expandmeta(). |
|
||||||||||||
|
Definition at line 575 of file expand.c. References ifsregion::begoff, CTLESC, ifsregion::endoff, if(), ifs, ifsfirst, ifslastp, ifsval, arglist::lastp, strlist::next, NULL, nullstr, ifsregion::nulonly, sp, stalloc(), start, and strchr. |
|
|
Referenced by expandarg(). |
|
||||||||||||
|
|
|
|
Referenced by expsort(). |
|
||||||||||||
|
Definition at line 1004 of file expand.c. References pmatch(). Referenced by casematch(). |
|
|
Referenced by expudir(). |
|
||||||||||||
|
|
|
|
Referenced by matcher(), patmatch(), and regexec(). |
|
||||||||||||||||
|
Definition at line 550 of file expand.c. References ifsregion::begoff, ckmalloc(), ifsregion::endoff, ifsfirst, ifslastp, ifsregion::next, NULL, ifsregion::nulonly, and start. |
|
|
Referenced by evalvar(). |
|
|
Definition at line 1113 of file expand.c. References CTLESC. Referenced by parsefname(). |
|
|
Definition at line 431 of file expand.c. References backgndpid, NULL, shparam::p, and shellparam. |
|
|
Referenced by evalvar(). |
|
||||||||||||||||
|
Definition at line 459 of file expand.c. References backgndpid, expdest, i, shparam::nparam, num(), oexitstatus, optchar, optval, p, rootpid, sep, shellparam, STPUTC, and syntax. |
|
|
Referenced by evalvar(). |
|
|
Definition at line 83 of file expand.c. Referenced by argstr(), casematch(), evalvar(), expandarg(), and expbackq(). |
|
|
Definition at line 92 of file expand.c. Referenced by docd(), expandarg(), and expudir(). |
|
|
Definition at line 86 of file expand.c. Referenced by addfname(), expandarg(), and expandmeta(). |
|
|
Definition at line 82 of file expand.c. Referenced by argstr(), casematch(), evalvar(), expandarg(), expandhere(), expbackq(), and varvalue(). |
|
|
|
|
|
Definition at line 84 of file expand.c. Referenced by expandarg(), expbackq(), ifsbreakup(), and recordregion(). |
|
|
Definition at line 85 of file expand.c. Referenced by casematch(), expandarg(), expbackq(), ifsbreakup(), and recordregion(). |
|
|
|
1.4.6