summaryrefslogtreecommitdiff
path: root/sys/src/cmd/rc/simple.c
AgeCommit message (Collapse)Author
2016-06-30rc: write /dev/wdir after printing the prompt, not after executing "cd" commandcinap_lenrek
2016-05-15rc: fix shift regresison, sorrycinap_lenrek
2016-05-15rc: remove pointless Memcpy(),Malloc(),Realloc() and efree() wrapperscinap_lenrek
2016-05-15rc: fix inband globbing bugs, cleanupcinap_lenrek
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().
2016-02-22rc: terminate rc when exec fails, cleanupcinap_lenrek
The execexec() function should never return, as it irreversably changes the filedescriptor table for the new program. This means rc's internal filedesciptors for reading the script get implicitely closed and we cannot continue the rc interpreter when Execute() fails. So Execute() now sets the error status, and execexec() runs Xexit() in case Execute() returns.
2014-07-23rc: fix slow Xqdol(), avoid recursion in conclist(), estrdup(), avoid copyingcinap_lenrek
Xqdol() used to take quadratic time because of strcat(), the code isnt really needed as list2str() aready does the same thing in linear time without the strcat(). add estrdup() which uses emalloc() so allocation error are catched. move strdups() of name from callers into newvar(). avoid recursion of conclist(), and avoid copying of word strings by providing Newword() function which doesnt copy the word string.
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen