aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Converted option parsing to using getopt(). Also managed to remove anMark Whitley2000-07-202-34/+34
| | | | | | extraneous logic loop that existed only for the purpose of the special case of only one file. I replaced it with a variable to keep track of the number of files read.
* Whoops. Forgot to #include <getopt.h>.Mark Whitley2000-07-202-0/+2
|
* Converted option parsing to getopt() and made some minor formatting changes.Mark Whitley2000-07-192-36/+42
|
* Centralize handling of --help.Matt Kraai2000-07-1932-312/+221
|
* Added some missing declarations and fixed some typos. I have toMatt Kraai2000-07-193-1/+13
| | | | remember to compile *before* committing.
* Add usage messages for applets without them.Matt Kraai2000-07-1919-0/+232
|
* Avoid trying to free NULL ptrs. Comment on malloc usages.Eric Andersen2000-07-192-8/+12
| | | | -Erik
* Use FatalError()Eric Andersen2000-07-192-8/+4
| | | | -Erik
* Moved some code and add a coupld #defines to support use of dmalloc.Eric Andersen2000-07-194-27/+26
| | | | -Erik
* Funny. Head was getting installed to the wrong spot.Eric Andersen2000-07-192-2/+2
| | | | -Erik
* Updated to add support for dmalloc, and adjusted for better crossEric Andersen2000-07-191-10/+27
| | | | | compiler support. -Erik
* Consolodated some common code into print_matched_line to make 'grep_file' aMark Whitley2000-07-182-20/+22
| | | | little more terse & clean. Also made a few minor formatting changes.
* Removed now incorrect message about NFS not working withEric Andersen2000-07-181-2/+1
| | | | | Linux 2.[34].x kernels. It does work now, -Erik
* Added support for the -c (count matches) option. Made it so it works just likeMark Whitley2000-07-182-6/+44
| | | | GNU grep.
* Sigh -- can't sleep. Clean up some mem leaks, fixed some bugs.Eric Andersen2000-07-183-117/+129
| | | | -Erik
* New message added to messages.c: full_versionPavel Roskin2000-07-1711-19/+53
| | | | Used where possible
* Moved functions used by "lsmod" from cat.c to utility.cPavel Roskin2000-07-176-40/+37
| | | | | Adjusted to make lsmod and sh compilable as standalone apps. Comment fixes
* - Added support for backreferences in substitution expressions up to nineMark Whitley2000-07-172-36/+152
| | | | | | | | | | | | | | | (\1, \2...\9). This touched a lot of places in this file and I added a new function 'print_subst_w_backrefs' in order to keep 'do_subst_command' a little more tidy. * I tested this good 'n hard, but will always appreciate more testing from other, willing folks. - Noticed that the index_of_next_unescaped_slash was subtly wrong so I changed both the functionality and behavior (it used to skip over the first char in the string you passed it, assuming it was a leading '/'--this assumption is no longer made) this necessitated changing the lines that call this function just slightly.
* Now it's possible to compile Busybox with only one app definedPavel Roskin2000-07-172-15/+21
| | | | (unless it's lsmod, to be fixed by the next commit)
* Backtick support to infinite (memory limited) levels of nesting isEric Andersen2000-07-173-90/+255
| | | | | | | | | | | | 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
* It is now possible to select in busybox.def.h whether minixfs version 2Pavel Roskin2000-07-175-72/+63
| | | | is to be supported.
* The result of getopt() is "int" and should be treated as suchPavel Roskin2000-07-178-10/+12
|
* Extract usage information into a separate file.Matt Kraai2000-07-16175-2050/+2529
|
* Don't use strings directly in calls to usage(). This is in preparationMatt Kraai2000-07-1431-289/+321
| | | | for their extraction to a separate file.
* Fixed a couple of buglets:Mark Whitley2000-07-142-12/+58
| | | | | | | | | | | | | | | | - add_cmd_str: segv's were being generated if there was a '# comment' line (and probably other kinds of lines, too) that was not followed by a semi-colon or whitespace - parse_edit_cmd: was returning a wrong number (too low) for the index; it was not accounting for backslashes eaten, for the fact that we start at the 3rd index in the string, or for the fact that we add an extra newline. - parse_cmd_str: was returning a wrong number (again, too low) for the index in the case of single-letter commands (p,d). There was some over-compensation for this in the 'return' stmt at the end which also needed some help. - load_cmd_file: was not eating trailing newlines off the line read from the command file. This had the deleterious effect of printing an extra newlines after text displayed from edit (i,a,c) commands.
* - Added support for semicolon delimited command lines. (woo-hoo!)Mark Whitley2000-07-142-62/+144
| | | | | | | | | - Obsoleted the trim_str function (#if 0'ed out -- maybedelete later) in favor of strrspn. - Obsoleted the strrspn function (#if 0'ed out as well) as soon as I discovered that it wasn't needed either. - Fixed a subtle bug in parse_subst_cmd where it would choke with an error if there was any trailing space after the s/match/replace/ expression.
* Getopt'ed by Marc Nijdam <marc_nijdam@hp.com>Eric Andersen2000-07-146-174/+128
| | | | -Erik
* Getopt'rd by Marc Nijdam <marc_nijdam@hp.com>Eric Andersen2000-07-142-42/+22
| | | | -Erik
* More fixes for "signed vs. unsigned" warnings.Pavel Roskin2000-07-144-6/+8
|
* Reduced the number of "signed vs. unsigned" warnings.Pavel Roskin2000-07-142-12/+12
| | | | Sometimes such warnings matter (esp. on PPC with char default to unsigned)
* More fixes for "missing initializers"Pavel Roskin2000-07-144-4/+4
|
* Fixed a warning about missing initializerPavel Roskin2000-07-142-2/+2
|
* The result of getopt() should not be converted to "char" - it breaks on PPCPavel Roskin2000-07-141-1/+1
|
* More cleanups.Eric Andersen2000-07-1415-69/+69
| | | | -Erik
* Fix argument parsing.Matt Kraai2000-07-142-2/+2
|
* Be more pedantic aboutthe terminating null applet.Eric Andersen2000-07-142-2/+2
| | | | -Erik
* uid and gid were unsigned, but were compared vs signed values (-1)Eric Andersen2000-07-141-2/+2
| | | | -Erik
* A couple of minor warning cleanups.Eric Andersen2000-07-146-7/+13
| | | | -Erik
* Use errorMsg rather than fprintf.Matt Kraai2000-07-1481-473/+391
|
* Fix some stupid memory bugs.Eric Andersen2000-07-142-4/+2
| | | | -Erik
* Add in redimentary backtick suport (doesn't work properly yet, but isEric Andersen2000-07-143-120/+219
| | | | | close). -Erik
* It dawned on me that I would need to grow a char buffer one extra char biggerMark Whitley2000-07-142-2/+8
| | | | | | to accomodate a trailing '\n'ewline that I append to it later one. This is only necessary for the case of one inserted, appended, or changed line, but it's still necessary.
* Added error checking for edit commands; only a beginning address can beMark Whitley2000-07-142-2/+8
| | | | specified.
* Added support for (a)ppend, (i)nsert, and (c)hange commands to sed.Mark Whitley2000-07-142-14/+176
|
* Fixed bug where sed '/foo/p' was printing "invalid command".Mark Whitley2000-07-132-4/+2
|
* (Something I should have done in the previous checkin...) Also broke outMark Whitley2000-07-132-74/+86
| | | | | substitution command execution from do_sed_command() and put it in it's own do_subst_command() function.
* Minor code reorg: Changed the interface to index_of_next_unescaped_slash to anMark Whitley2000-07-132-96/+116
| | | | | interface that seems a little more sensible to me. Also broke out s/// expression parsing into it's own subroutine.
* Fix uninitialized variable.Eric Andersen2000-07-132-2/+2
| | | | -Erik
* Patch from Marc Nijdam <marc_nijdam@hp.com>Eric Andersen2000-07-131-11/+9
| | | | | | | | > First (of many more) patch of cp_mv to getopt use. I'm using the most > simplistic approach, just get getopt used, then worry about a cleaner > option parsing style using getopt later. > > Marc
* Added a smallish TODO comment.Mark Whitley2000-07-132-0/+10
|