34c4e5f0b3
silly space saving in sed
2007-01-30 22:25:16 +00:00
54767db8c7
micro optimization
2007-01-30 01:11:36 +00:00
9356b5022c
preparatory patch for -Wwrite-strings #7 : sed
...
remaining: shell (rather scary mess in msh.c)
2007-01-29 23:44:38 +00:00
b6aae0f381
preparatory patch for -Wwrite-strings #2
2007-01-29 22:51:25 +00:00
86811803e3
add to testsuite and fix yet another sed corner case
2007-01-29 17:10:19 +00:00
c562bb7487
disable -Wold-style-definition for gcc 3.x
2007-01-29 17:08:51 +00:00
fe7a9f1277
sed: fix 2 bugs (one testsuite entry + one newly found)
...
but more importantly make code more understandable
2007-01-29 14:31:47 +00:00
826c85f382
fix all known regressions with sed and also make it simpler
2007-01-28 23:26:15 +00:00
4ebaf10742
strdup -> xstrdup
...
sed: de-obfuscate piece of code
2007-01-19 21:33:19 +00:00
ef44d9d9f2
sed,get_line_from_file: improve comments
2007-01-17 23:16:16 +00:00
666da5e2c6
merge post-1.3.0 fixes
2006-12-26 18:17:42 +00:00
b95636c52f
remove casts from xmalloc()
2006-12-19 23:36:04 +00:00
9f739445cd
inline strcmp(s, "-") [actually macro-ize it for now - gcc is too stupid]
2006-12-16 23:49:13 +00:00
2ea630f9a5
bb_makedev: fix for glibc 2.3.2
...
sed: fix C++ style declaration
2006-12-10 02:52:19 +00:00
2f8f71b20d
sed: style fixes
2006-12-10 02:09:12 +00:00
1375bc7b67
sed: fix handling of files not ending in '\n'
2006-12-02 20:12:12 +00:00
8b22b07bc5
sed: improve handling of NULs
2006-12-02 17:58:10 +00:00
d3d004dd35
last nail into error_msg() (de)capitalization
2006-10-27 09:02:31 +00:00
ddec5af6b0
rename functions to more understandable names
2006-10-26 23:25:17 +00:00
8077850330
sed: mostly style fixes, very small changes in actual code
2006-10-25 12:46:46 +00:00
d18a3a20db
use skip_whitespace where appropriate
2006-10-25 12:46:03 +00:00
2d5ca60bfb
bb_get_[chomped]line_from_file wasn't descriptive enough.
...
Renaming...
2006-10-12 22:43:20 +00:00
67b23e6043
getopt_ulflags -> getopt32.
...
It is impossible to formulate sane ABI based on
size of ulong because it can be 32-bit or 64-bit.
Basically it means that you cannot portably use
more that 32 option chars in one call anyway...
Make it explicit.
2006-10-03 21:00:06 +00:00
40920825d5
rename bb_default_error_retval -> xfunc_error_retval
2006-10-03 20:28:06 +00:00
9275814a9e
lots of silly indent fixes
2006-10-03 19:56:34 +00:00
e2016e145b
sed: -e options were handled in reverse order. fix that.
2006-10-01 21:37:40 +00:00
b97c9842a5
sed: unbreak multiple -e, -f option handling (my fault)
2006-10-01 21:05:12 +00:00
750fc6d7bb
sed: getopt_ulflags'isation
2006-09-22 08:56:03 +00:00
e9a7a6212b
Change license statements (and clean up headers) on some of the files that
...
Erik or I are primary copyright holders on.
2006-09-22 02:52:41 +00:00
9213a9e0f2
whitespace cleanup
2006-09-17 16:28:10 +00:00
d35c0efddb
Bugfix for: echo '123456789' | sed 's/./|&/5'
2006-09-08 00:01:02 +00:00
6d655be5df
removed a lot of trailing \n in bb_msg() calls. It is added
...
automatically by function itself.
2006-09-06 19:02:46 +00:00
d921b2ecc0
Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
...
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes... General cleanup pass. What I've
been doing for the last couple days.
And it conflicts! I've removed httpd.c from this checkin due to somebody else
touching that file. It builds for me. I have to catch a bus. (Now you know
why I'm looking forward to Mercurial.)
2006-08-03 15:41:12 +00:00
4795e4e011
Rich Filker spotted that sed -e 's/xxx/[/' didn't work right. Did a smaller
...
fix than his, and shrank the code a bit on top of that so the net size is
smaller, and added a test to the test suite for this case. Plus I cleaned up
the #includes and removed unnecessary "const"s while I was there.
2006-07-26 17:25:08 +00:00
ea7c18514b
Fix http://bugs.busybox.net/view.php?id=826 in which "(echo; echo) | sed x"
...
crashes because the empty state of the hold space is NULL but the empty
state of the pattern space is "".
2006-06-28 13:50:59 +00:00
19008b8373
- reuse strings and messages. Saves about 600B
2006-06-07 20:17:41 +00:00
12d87550a3
Confirming it's not needed.
2006-06-05 17:32:44 +00:00
a3d4bf38b0
- use bb functions instead of handrolling stuff.
...
- add XXX question about supposedly superfluous else clause
text data bss dec hex filename
5918 0 0 5918 171e editors/sed.o.orig
5901 0 0 5901 170d editors/sed.o
2006-06-03 21:40:11 +00:00
8bb50782a5
Change llist_add_* to take the address of the list rather than returning the new
...
head, and change all the callers.
2006-05-26 23:44:51 +00:00
5fc467e758
Yann Morin spotted some leftover flotsam from halfway through the recent
...
llist.c interface change that accidentally got checked in. My bad.
2006-05-24 17:45:47 +00:00
9ffd42317b
Minor cleanups: Convert a few calloc() calls to xzalloc, remove unnecessary
...
memset, collate variable declarations...
2006-05-21 18:30:35 +00:00
e3f5a3fd82
Convert sed's static variables to a single global structure.
2006-05-09 03:53:55 +00:00
0b65628395
Move sed over to the generic llist_t for append. Saves about 90 bytes.
2006-05-08 22:17:23 +00:00
1f305dc0fd
Portability patch from rfelker. The bb_asprintf.c thing needs an eventual
...
follow up in platform.h to set the #ifdef, but the workaround works for
everybody, so...
2006-03-09 22:21:20 +00:00
dfba741457
Robert P. Day removed 8 gazillion occurrences of "extern" on function
...
definitions. (That should only be on prototypes.)
2006-03-06 20:47:33 +00:00
c0bb308389
- silence warning about "'free_and_close_stuff' used but never defined"
2006-03-02 10:06:22 +00:00
b7f39732f8
- fix compilation of sed.
...
error: static declaration of 'free_and_close_stuff' follows non-static declaration
Tiny whitespace cleanup while at it,
also make sure that we don't use CONFIG_ anymore.
Rob, hope this is ok w/ you..
2006-03-01 20:14:16 +00:00
e7c43b66d7
Cleanup patch from Denis Vlasenko. Mostly variants of removing the if(x)
...
from before "if(x) free(x)".
2006-03-01 16:39:45 +00:00
2b26fd5570
A few changes falling out from the effort to make sed handle embedded NUL bytes.
...
Checking in to reduce the diff between my tree and svn...
2006-02-24 02:30:39 +00:00
c1ef7bdd8d
just whitespace
2006-01-25 00:08:53 +00:00