aboutsummaryrefslogtreecommitdiff
path: root/shell (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Ok, this is a pretty major update to sh.c. I renamed all the variables andandersen2000-12-182-475/+631
| | | | | | | | | | | | | | | function names to conform with the style guide. I also did a lot of work on the if-then-alse-fi logic and added prototype (i.e. it segfaults when enabled) line continuation support. Furthermore, this patch includes Larry Doolittle's work on restructuring some of the data structures that represent the job and child_program, allowing several simplifications and fixing several bugs. -Erik git-svn-id: svn://busybox.net/trunk/busybox@1467 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Mem leak fix from Matt Kraaiandersen2000-12-121-5/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@1441 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Matt Kraai to fox sh.c escape problem such thatandersen2000-12-111-1/+3
| | | | | | | | running things like 'echo "\n\tHi\n\t\!"' and 'echo -e "\n\tHi\n\t\!"' behave as under bash. git-svn-id: svn://busybox.net/trunk/busybox@1423 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Put in i to getopt, so i will work...andersen2000-12-081-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@1405 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Changed names of functions in utility.c and all affected files, to makemarkw2000-12-072-18/+18
| | | | | | | compliant with the style guide. Everybody rebuild your tags file! git-svn-id: svn://busybox.net/trunk/busybox@1398 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Bettwr document the hidden internal sh.c #defines, and which folksandersen2000-12-061-2/+10
| | | | | | | might want to use... git-svn-id: svn://busybox.net/trunk/busybox@1390 69ca8d6d-28ef-0310-b511-8ec308f3f277
* patch from Larry Doolittle to rename BB_FEATURE_SH_BUILTINS_ALWAYS_WINandersen2000-12-061-2/+2
| | | | | | | to the more pedantically correct BB_FEATURE_SH_APPLETS_ALWAYS_WIN. git-svn-id: svn://busybox.net/trunk/busybox@1386 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove #ifdef __STDC__ junk. We don't do K&R round these parts,andersen2000-12-011-14/+2
| | | | | | | so no point acting like we do. git-svn-id: svn://busybox.net/trunk/busybox@1361 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Stop using TRUE and FALSE for exit status.kraai2000-12-012-22/+22
| | | | git-svn-id: svn://busybox.net/trunk/busybox@1360 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Apply some patches from Gennady Feldman <gfeldman@mail.com> toandersen2000-11-301-39/+65
| | | | | | | | . /etc/profile, and to emulate bash prompt. I've cleaned up his patches a bit and all looks good now... git-svn-id: svn://busybox.net/trunk/busybox@1359 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Larry Doolittle (with minor touchups from me so everything compilesandersen2000-11-301-0/+1
| | | | | | | | and works) to use the applet definitions in applets.h to autogenerate the applet function and usage prototypes. git-svn-id: svn://busybox.net/trunk/busybox@1354 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix escape char problem.andersen2000-11-301-4/+13
| | | | git-svn-id: svn://busybox.net/trunk/busybox@1353 69ca8d6d-28ef-0310-b511-8ec308f3f277
* "I will always compile before I commit."andersen2000-11-171-1/+1
| | | | | | | | | "I will always compile before I commit." "I will always compile before I commit." -Erik git-svn-id: svn://busybox.net/trunk/busybox@1324 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix up builtin overrides, and hack in the binary search for findingandersen2000-11-171-28/+32
| | | | | | | matching applets into the shell. git-svn-id: svn://busybox.net/trunk/busybox@1323 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Add in a new FEATURE (off by default) BB_FEATURE_SH_BUILTINS_ALWAYS_WIN.andersen2000-11-171-1/+18
| | | | | | | Make the sh default to using external commands when a path is provided. git-svn-id: svn://busybox.net/trunk/busybox@1321 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from Gennady Feldman <gfeldman@tradeline.net> to:andersen2000-11-141-23/+34
| | | | | | | | | 1. Opens redirections w/ the right access. 2. Doesn't do globbing for every single parameter (so it doesn't stat every parameter). git-svn-id: svn://busybox.net/trunk/busybox@1299 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Cleanup of duplicated symbols -- found by compiling withandersen2000-11-071-1/+1
| | | | | | | LDFLAGS += -Wl,-warn-common git-svn-id: svn://busybox.net/trunk/busybox@1292 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Warning cleanup from Gennady Feldmanandersen2000-11-021-9/+10
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@1281 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Consolidate handling of some fopen failures.kraai2000-09-271-4/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@1136 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Renamed "internal.h" to the more sensible "busybox.h".andersen2000-09-252-2/+2
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@1119 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Add in exec support (patch from Torbj?rn Axelsson <torax@cendio.se>)andersen2000-09-211-1/+16
| | | | | | | | and disable backticks (since they are still wierdly broken in some cases. git-svn-id: svn://busybox.net/trunk/busybox@1085 69ca8d6d-28ef-0310-b511-8ec308f3f277
* I think these featires are fairly safe...andersen2000-09-191-2/+2
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@1070 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Avoid segfaults by not using snprintf to copy strings.kraai2000-09-191-1/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@1069 69ca8d6d-28ef-0310-b511-8ec308f3f277
* "exit NUMBER" should exit, not returnproski2000-09-151-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@1054 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Backslashes shouldn't be treated as backticks.kraai2000-09-141-10/+11
| | | | git-svn-id: svn://busybox.net/trunk/busybox@1048 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Copy the string terminator.kraai2000-09-141-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@1047 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Don't fork for the . (source) command so that environment settings arekraai2000-09-131-1/+2
| | | | | | | preserved. git-svn-id: svn://busybox.net/trunk/busybox@1040 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix calls to {m,c,re}alloc so that they use x{m,c,re}alloc instead ofkraai2000-09-131-7/+7
| | | | | | | segfaulting or handling errors the same way themselves. git-svn-id: svn://busybox.net/trunk/busybox@1039 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix unchecked calls to {m,c,re}alloc so that they print an error andkraai2000-09-131-16/+15
| | | | | | | exit rather than segfaulting (what an improvement). git-svn-id: svn://busybox.net/trunk/busybox@1038 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Reset optind so that getopt works in busybox applets called directly by sh.kraai2000-09-061-17/+7
| | | | | | | Change the behavior of -c to correctly handle $1..$9. git-svn-id: svn://busybox.net/trunk/busybox@1014 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Turn off some debug noise.andersen2000-08-211-2/+2
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@969 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Clean up the nasty blunder I'd made of how different behaviors happen.andersen2000-07-281-14/+16
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@918 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Oops. Forgot an ifdefandersen2000-07-281-0/+2
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@915 69ca8d6d-28ef-0310-b511-8ec308f3f277
* More sh updates (with related changes to everything else). Switchedandersen2000-07-283-62/+143
| | | | | | | | | to using getopt and cleaned up the resulting mess. if-then-else-fi is now basically working (given a bunch of constraints). -Erik git-svn-id: svn://busybox.net/trunk/busybox@913 69ca8d6d-28ef-0310-b511-8ec308f3f277
* More shell features.... if-then-else-fi is now basically usable (disableandersen2000-07-271-113/+239
| | | | | | | | | by default pending further debugging). Added in some basic shell environment support (i.e. $?, $0-$9, $$, $!, $#). -Erik git-svn-id: svn://busybox.net/trunk/busybox@912 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Minor style cleanups.andersen2000-07-261-8/+9
| | | | git-svn-id: svn://busybox.net/trunk/busybox@910 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Finish off fixing up the memleaks (I think). Added the beginnings ofandersen2000-07-251-38/+123
| | | | | | | | some if-then-else-fi support (nonfunctional and turned off) -Erik git-svn-id: svn://busybox.net/trunk/busybox@905 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Use BB_FEATURE_CLEAN_UP where appropriateandersen2000-07-251-0/+12
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@904 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Avoid trying to free NULL ptrs. Comment on malloc usages.andersen2000-07-191-4/+6
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@880 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Sigh -- can't sleep. Clean up some mem leaks, fixed some bugs.andersen2000-07-181-39/+43
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@872 69ca8d6d-28ef-0310-b511-8ec308f3f277
* New message added to messages.c: full_versionproski2000-07-171-1/+5
| | | | | | | Used where possible git-svn-id: svn://busybox.net/trunk/busybox@871 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Backtick support to infinite (memory limited) levels of nesting isandersen2000-07-171-30/+85
| | | | | | | | | | | | | | | now implemented... So now busybox shell can do cool stuff like: /home/andersen/CVS/busybox # echo foo `wc README` bar foo 71 422 2951 README bar I love writing cool new features.... Muhahahaha... (I think this is leaking a little bit of memory every time it expands a backtick process, so I still needs to do a bit of cleanup...) -Erik git-svn-id: svn://busybox.net/trunk/busybox@867 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Extract usage information into a separate file.kraai2000-07-161-8/+0
| | | | git-svn-id: svn://busybox.net/trunk/busybox@864 69ca8d6d-28ef-0310-b511-8ec308f3f277
* More cleanups.andersen2000-07-141-3/+3
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@853 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Use errorMsg rather than fprintf.kraai2000-07-141-10/+10
| | | | git-svn-id: svn://busybox.net/trunk/busybox@848 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix some stupid memory bugs.andersen2000-07-141-2/+1
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@847 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Add in redimentary backtick suport (doesn't work properly yet, but isandersen2000-07-141-40/+73
| | | | | | | | close). -Erik git-svn-id: svn://busybox.net/trunk/busybox@846 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Added a smallish TODO comment.markw2000-07-131-0/+5
| | | | git-svn-id: svn://busybox.net/trunk/busybox@837 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Added some smallish comments to help folks understand why we have two tablesmarkw2000-07-121-2/+5
| | | | | | | of builtins and the reasoning behind it. git-svn-id: svn://busybox.net/trunk/busybox@834 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Always report the applet name when doing error reporting.kraai2000-07-121-5/+5
| | | | git-svn-id: svn://busybox.net/trunk/busybox@831 69ca8d6d-28ef-0310-b511-8ec308f3f277