summaryrefslogtreecommitdiff
path: root/sys/src/cmd/rc/fns.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/fns.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/fns.h')
-rw-r--r--sys/src/cmd/rc/fns.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/src/cmd/rc/fns.h b/sys/src/cmd/rc/fns.h
index 1559d9176..5d5be42e8 100644
--- a/sys/src/cmd/rc/fns.h
+++ b/sys/src/cmd/rc/fns.h
@@ -30,19 +30,18 @@ void codefree(code*);
int compile(tree*);
char * list2str(word*);
int count(word*);
-void deglob(void*);
+char* deglob(char*);
void delwaitpid(int);
void dotrap(void);
void freenodes(void);
void freewords(word*);
-void globlist(void);
+word* globlist(word*);
int havewaitpid(int);
int idchr(int);
void inttoascii(char*, long);
void kinit(void);
int mapfd(int);
-int match(void*, void*, int);
-int matchfn(void*, void*);
+int match(char*, char*, int);
char** mkargv(word*);
void clearwaitpids(void);
void panic(char*, int);
@@ -52,7 +51,7 @@ void popword(void);
void pprompt(void);
void pushlist(void);
void pushredir(int, int, int);
-void pushword(char*);
+word* pushword(char*);
void readhere(void);
word* searchpath(char*);
void setstatus(char*);