summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* Replace calloc(3) with malloc(3), and set the tail of thejmallett2002-05-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument list to NULL, to terminate the arguments passed to execvp(2). Thanks to: bde (for pointing out some missing parens) And with apologies to Ozzy Osbourne: On his way to dinner It took him by surprise When an email from bde Said his code was full of lies Style (indentation) And his bracing were all wrong He casted to size_t When he should have cast to long I don't mind Single letter identifiers Unwrapped Line Over 80 chars Far over 80 chars Who can we get to send diffs We need Bruce D. Evans Shows you comparason to his We need Bruce D. Evans again
* Rename `eqrelval' which was renamed from `eqrel' to quiet a shadow warningjmallett2002-05-031-3/+3
| | | | | | | to `op' as suggested by Bruce, as this is used to store the operator between vl and vr. Submitted by: bde
* Fix a bug whereby we were getting ~0 and comparing it to maxsize, i.e. ifjmallett2002-05-031-1/+1
| | | | | | | s1 was 0 length, and replstr was 0 length, etc., we would end up subtracting one from zero and seeing if it was greater than the size_t (unsigned) var maxsize... This would cause us to return a string consisting of essentially only match, which is not the right behaviour if we have 0 length inpline.
* Move substitution out to a function, prerun(), and replace use of run() withjmallett2002-05-031-85/+78
| | | | | | | it. It handles everything (right now) that needs done before run(), except the -J case, because while that would be easy, I don't quite understand -J. Reviewed by: src/tools/regression/usr.bin/xargs
* Get rid of bogus holder for realloc(3).jmallett2002-05-031-6/+5
|
* Rewrite the loop that handles substitution in the -I case, and try to makejmallett2002-05-031-15/+75
| | | | | | | | | it easier to understand. Making it easy to understand isn't all that easy, so litter the code with comments so some other poor soul can come along some day and work on this if they see fit to do so. Avoid calling strlen(3) to check for a nil-string, when we can just check for *str=='\0'. Approved by: src/tools/regression/usr.bin/xargs/
* Rename `lflag' to `Lflag' to match the option's case.jmallett2002-05-031-6/+6
|
* Revert revision 1.22. I incorrectly modified the Berkeley identifiers.jmallett2002-05-031-3/+12
| | | | Requested by: bde, mike
* Revert vendor identifiers, and #if 0 what is #if 0/#else for OpenBSD.jmallett2002-05-036-13/+52
| | | | | | Add __FBSDID() properly. Requested by: bde, mike
* Add the csplit(1) utility, which splits files based on context, as specifiedtjr2002-05-021-0/+5
| | | | | | | | | by SUSv3. This Makefile got left out of the previous commit. PR: 36191 Reviewed by: mike
* Add the csplit(1) utility, which splits files based on context, as specifiedtjr2002-05-023-0/+589
| | | | | | | by SUSv3. PR: 36191 Reviewed by: mike
* Remove redundant declarations of getopt(3) externals (since <unistd.h> doesjmallett2002-05-022-4/+2
| | | | | take care of them), and add __FreeBSD__ to the defined() checks for the _PATH_DIVNAME.
* __COPYRIGHT() and __SCCSID().jmallett2002-05-021-12/+3
|
* An explicit cast to size_t for an inline integer, since the two are not thejmallett2002-05-021-2/+2
| | | | | | | same on Alpha and lint(1) pointed that out. lint(1) on the same architecture pointed out how silly a cast to (u_int) to malloc(3)'s argument was. Change that to size_t.
* A markup fix, and document -R as non-standard.jmallett2002-05-021-3/+5
|
* Make -J a proper flag internal to the code (rather than just check forjmallett2002-05-022-10/+30
| | | | | | | | use of replstr and lack of Iflag), and add -R, which when given with -I controls the number of arguments on which replacement will be done. Some people happen to think it's idiotic to limit to 5 arguments, so let the user override it if they like.
* *str is spelled 's1' inside the body of the code.jmallett2002-05-021-4/+2
| | | | | Make 'this' not a local variable, since it isn't necessary or complex enough to warrant such.
* Rework some of the -I support so I can't find a way to make xargs(1) core orjmallett2002-05-022-15/+14
| | | | | | | | corrupt memory. Simplifies the code in one or two places, also removes some code that looks like it was bogus or incomplete. Update strnsubst to have one or two extra conditions which maybe would make it more efficient, or at least more versatile. This is likely a no-op.
* Add some spurious veritcal whitespace to reduce diffs to OpenBSD.jmallett2002-05-011-0/+2
|
* Merge local changes again, against ANSIfied m4(1).jmallett2002-05-018-245/+109
|
* Do not bother with #include <machine/psl.h> since it is just a stub filepeter2002-05-011-1/+0
| | | | that says something like "/* Not used on Alpha */".
* Build elf2aout for sparc64.jake2002-04-301-0/+4
|
* Don't use ISO_8859 when I should use ISO8859.dwmalone2002-04-297-2/+1057
|
* Do not override the `install' target.ru2002-04-291-1/+1
|
* Add a French calendar.dwmalone2002-04-284-3/+19
| | | | | | PR: 32265 Submitted by: Thierry Thomas <thierry@pompo.net> MFC after: 1 week
* Minor nit; return(foo) from main rather than exit(foo).markm2002-04-281-1/+1
|
* Very minor whitespace nit.markm2002-04-281-1/+0
|
* Remove GCC-specific flags.markm2002-04-281-1/+0
|
* Reorder for style.markm2002-04-281-3/+3
|
* Remove GCC-specific flags.markm2002-04-281-1/+0
|
* Fix VCS tags; ANSIfy functionsmarkm2002-04-281-14/+8
|
* Add some function prototypes to squash warnings.markm2002-04-281-0/+6
|
* Easy warns fixes; sort out some types and me them a bit more consistent;markm2002-04-281-8/+9
| | | | fix initialisers.
* Warnings fix; ANSIfy, constify, mark unused function parameter(s).markm2002-04-283-18/+13
|
* Warns; ANSIfy, constify and move declarations into a common header.markm2002-04-283-39/+68
|
* Remove GCC-specific flags.markm2002-04-281-1/+0
|
* Fix a const-char vs char issue.markm2002-04-281-1/+3
|
* Very minor whitespace nit.markm2002-04-281-0/+1
|
* Declarations cleanup; make sure externs are in a common header.markm2002-04-283-9/+72
| | | | Fix declarations, casts and return values.
* warns fixes; ANSIfy, deregister, constify.markm2002-04-281-29/+16
|
* Easy warns fixes; constify.markm2002-04-281-3/+3
|
* Style; line up columns, space things out more consistently.markm2002-04-281-6/+7
|
* Style fixes; whitespace and header order.markm2002-04-281-16/+30
|
* Fix VCS inclusion and tidy up #includes.markm2002-04-281-4/+8
|
* Cast to kill warnings. De-register.markm2002-04-281-3/+3
|
* fix warnings; change variable/argument names that mask global names.markm2002-04-281-4/+4
|
* Remove GCC-specific flags and commented out cruft.markm2002-04-281-3/+0
|
* Some easy const fixes.markm2002-04-281-3/+3
|
* ANSIfy, VCS inclusions and some very minor style.markm2002-04-283-55/+36
|
* Minor reorder for style.markm2002-04-281-1/+1
|
OpenPOWER on IntegriCloud