Commit Graph

307 Commits

Author SHA1 Message Date
Rob Landley
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
"Robert P. J. Day"
63fc1a9e08 Standardize on the vi editing directives being on the first line. 2006-07-02 19:47:05 +00:00
"Robert P. J. Day"
68229837ff Remove all usage of the "register" storage class specifier. 2006-07-01 13:08:46 +00:00
Rob Landley
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
Rob Landley
768945b762 A few patches from Erik Hovland, turning strncpy() into safe_strncpy() and
removing some unnecessary code.
2006-06-25 00:34:52 +00:00
Rob Landley
e5e1a10cd3 Remove pointless "inline" wrapper around get_terminal_width_height(). 2006-06-21 01:15:36 +00:00
Rob Landley
2d6af16035 Zubicaray reported a bug in vi that causes it to eat 100% cpu when you close
an xterm it's running in.  The vi signal behavior would catch and restarts lots
of signals, like SIGHUP, that should just kill the thing.  (Leftover behavior
from when it would segfault all the time.)  Filtered out the more obviously
bad ones.  If it segfaults, we should find and fix the problem.
2006-06-21 00:52:31 +00:00
Bernhard Reutner-Fischer
1e23b6fdb5 - make sure that we see string_insert only if we need it. 2006-06-09 07:12:27 +00:00
Bernhard Reutner-Fischer
19008b8373 - reuse strings and messages. Saves about 600B 2006-06-07 20:17:41 +00:00
Rob Landley
12d87550a3 Confirming it's not needed. 2006-06-05 17:32:44 +00:00
Bernhard Reutner-Fischer
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
Rob Landley
299a6b4d7b Consolidate #include <sys/time.h> so libbb.h does it. 2006-05-27 21:42:58 +00:00
Rob Landley
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
Rob Landley
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
Rob Landley
9ffd42317b Minor cleanups: Convert a few calloc() calls to xzalloc, remove unnecessary
memset, collate variable declarations...
2006-05-21 18:30:35 +00:00
Bernhard Reutner-Fischer
a254065e63 - remove SIGIOT as suggested by landley. 2006-05-19 17:54:05 +00:00
Bernhard Reutner-Fischer
4009ed91f7 - Rich Felker writes:
SIGIOT is not defined in any standard i can find and it seems to be
useless (alias for SIGABRT) on linux. i put it in #ifdef but it's
probably best just to remove it and cut down the size a bit.
2006-05-19 12:41:13 +00:00
Bernhard Reutner-Fischer
d9ed35c8b9 - remove superfluous legacy includes.
This applet should be converted to use llist; __NEED_DLLIST
2006-05-19 12:38:30 +00:00
Bernhard Reutner-Fischer
a2a647dfc1 - include strings.h
Thanks to Rich Felker for pointing this out.
2006-05-19 12:30:00 +00:00
Mike Frysinger
39440e520c pull Rules.mak from top_srcdir as pointed out by Robert P. J. Day on the mailing list 2006-05-13 02:33:09 +00:00
Rob Landley
e3f5a3fd82 Convert sed's static variables to a single global structure. 2006-05-09 03:53:55 +00:00
Rob Landley
0b65628395 Move sed over to the generic llist_t for append. Saves about 90 bytes. 2006-05-08 22:17:23 +00:00
Rob Landley
baa89b398d Patch to fix bug 868, and some related cleanup while I was in the area.
A tab is now taken as the end of filename if it's there, but if it isn't
(because the timestamp isn't there) we continue with the existing untruncated
line as the filename.
2006-05-07 21:10:06 +00:00
Rob Landley
a389651115 Remove bb_strlen() in favor of -fno-builtin-strlen. Saves as many bytes
as the old optimization did (actually does slightly better under gcc 4.0), and
simplifies the code.
2006-05-07 20:20:34 +00:00
Rob Landley
3b89039c25 It was sitting there, in the patches directory, for years. It was delete it
or apply it.  It's small, simple, evil, part of SUSv3, and we can switch it
off.
2006-05-04 20:56:43 +00:00
Mike Frysinger
4b7b8a58a1 touchup comment 2006-04-16 05:55:15 +00:00
Rob Landley
2ec922eed5 Patch from Robert P Day: let menuconfig indent stuff for us, we don't have
to do it in Config.in.
2006-04-13 23:22:16 +00:00
Paul Fox
b7b24d61e0 adjust ifdefs for inclusion of string_insert() routine 2006-04-05 14:17:24 +00:00
Paul Fox
f0305b7f75 fix behavior of ZZ, with respect to readonly mode(s). original
patch and report from Alexander Griesser.
2006-03-28 14:18:21 +00:00
Paul Fox
9360f42d32 add support for :wn (initial patch from Alexander Griesser) 2006-03-27 21:51:16 +00:00
Paul Fox
dbf935dae6 drop obsolete version string in favor of actual BB version (from
Bernhard Fischer)
2006-03-27 20:29:33 +00:00
Bernhard Reutner-Fischer
df10094870 - revert back to r14406 2006-03-13 19:04:00 +00:00
Rob Landley
bc68cd14cc Patch from Denis Vlasenko turning static const int (which gets emitted into
the busybox binary) into enums (which don't).
2006-03-10 19:22:06 +00:00
Rob Landley
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
Bernhard Reutner-Fischer
07a79e75f5 - backout using features which are not available with the previous stable
version of make (3.71.1).
2006-03-09 09:03:37 +00:00
Rob Landley
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
Bernhard Reutner-Fischer
022eb311d5 - use absolute path for top_builddir and top_srcdir.
Fixes make trying to include the very same file in an endless loop.
2006-03-02 17:33:25 +00:00
Bernhard Reutner-Fischer
c0bb308389 - silence warning about "'free_and_close_stuff' used but never defined" 2006-03-02 10:06:22 +00:00
Bernhard Reutner-Fischer
5d26126b9e - fixes parallel builds (make -j)
- use less resources for the buildsystem itself
2006-03-01 22:54:48 +00:00
Bernhard Reutner-Fischer
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
Rob Landley
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
Rob Landley
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
Rob Landley
d6e14d8bee Don't build directory libraries unless we're building an applet that needs it.
Cherry-picked from Devin Bayer's big MacOS X patch.
2006-02-21 19:11:35 +00:00
Rob Landley
46e351d478 Patch from awk maintainer (Dmitry Zakhrov) to fix bugs 642, 663, and 667. 2006-02-14 16:05:32 +00:00
Mike Frysinger
b38673fb9f make the build system puuuuuuuuuuurty 2006-02-02 01:41:53 +00:00
"Vladimir N. Oleynik"
dfe6e74157 changed strange mix signed<->unsigned 2006-01-31 09:44:04 +00:00
Eric Andersen
a68ea1cb93 fix up yet more annoying signed/unsigned and mixed type errors 2006-01-30 22:48:39 +00:00
Eric Andersen
5e678873f9 clean up yet more annoying signed/unsigned mismatches and fixup
yet more incorrect types
2006-01-30 19:48:23 +00:00
"Vladimir N. Oleynik"
cd473dd0c1 removed warning "comparison between signed and unsigned". Added ATTRIBUTE_UNUSED. Whitespace 2006-01-30 13:41:53 +00:00
Tim Riker
c1ef7bdd8d just whitespace 2006-01-25 00:08:53 +00:00