summaryrefslogtreecommitdiff
path: root/sys/src/cmd/rc/exec.h
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2016-05-15 19:10:37 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2016-05-15 19:10:37 +0200
commit7717051e3ce062fbdb8415e4befa5205d25e80bb (patch)
tree029df0be93da100936c772c5f6a83f0874930cef /sys/src/cmd/rc/exec.h
parent81f867f4fb3d7fd495be3282a01d2e4a9b1a56fd (diff)
rc: fix inband globbing bugs, cleanup
add glob information to the word structure so we wont accidently deglob quoted strings containing the GLOB. we store Globsize(word) in in word->glob which avoids recalculating that values and the check if a word should be globbed quick. globlist() now substitutes the word inplace avoiding the copying when all words are literals and avoids recursion. minor cleanups: use list2str() in execeval(), move octal() to unix.c, remove the (char*) casts to efree().
Diffstat (limited to 'sys/src/cmd/rc/exec.h')
-rw-r--r--sys/src/cmd/rc/exec.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/cmd/rc/exec.h b/sys/src/cmd/rc/exec.h
index 06d2991f5..f7fefed17 100644
--- a/sys/src/cmd/rc/exec.h
+++ b/sys/src/cmd/rc/exec.h
@@ -7,7 +7,7 @@ extern void Xexit(void), Xfalse(void), Xfn(void), Xfor(void), Xglob(void);
extern void Xjump(void), Xmark(void), Xmatch(void), Xpipe(void), Xread(void);
extern void Xrdwr(void);
extern void Xrdfn(void), Xunredir(void), Xstar(void), Xreturn(void), Xsubshell(void);
-extern void Xtrue(void), Xword(void), Xwrite(void), Xpipefd(void), Xcase(void);
+extern void Xtrue(void), Xword(void), Xglobs(void), Xwrite(void), Xpipefd(void), Xcase(void);
extern void Xlocal(void), Xunlocal(void), Xassign(void), Xsimple(void), Xpopm(void);
extern void Xrdcmds(void), Xwastrue(void), Xif(void), Xifnot(void), Xpipewait(void);
extern void Xdelhere(void), Xpopredir(void), Xsub(void), Xeflag(void), Xsettrue(void);
@@ -20,6 +20,7 @@ extern void Xerror1(char*);
struct word{
char *word;
word *next;
+ int glob; /* Globsize(word) */
};
struct list{
word *words;