summaryrefslogtreecommitdiff
path: root/editors/sed.c
AgeCommit message (Collapse)Author
2015-10-13*: more BUILD_BUG_ON conversionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-04-17sed: implement ",+N" range endDenys Vlasenko
function old new delta add_cmd 1115 1173 +58 process_files 2226 2253 +27 sed_main 696 702 +6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 91/0) Total: 91 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-10-05sed: fix "sed CMD -i nonexistent_file". Closes 7484Denys Vlasenko
function old new delta sed_main 643 676 +33 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-09-16sed: fix a buglet in s///NUM handlingDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-12-18sed: accept s///i as a synonym for s///I ("ignore case")David A. Wheeler
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-28sed: code shrinkDenys Vlasenko
function old new delta get_next_line 246 250 +4 sed_main 671 662 -9 add_input_file 47 - -47 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/1 up/down: 4/-56) Total: -52 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-28sed: open input files sequentially to avoid EMFILEDenys Vlasenko
Currently, sed pre-opens all files, which may cause EMFILE errors on systems with low ulimit -n. Change sed to open one file at a time. function old new delta get_next_line 177 235 +58 sed_main 682 652 -30 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 58/-30) Total: 28 bytes Based on the patch by Daniel Borca <dborca@yahoo.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-13switch editors/* to embedded-in-source kbuild systemDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-10-30sed: fix "sed clusternewline" testcaseDenys Vlasenko
function old new delta process_files 2197 2226 +29 flush_append 47 54 +7 get_next_line 184 189 +5 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 41/0) Total: 41 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-10-30sed: document -E in help textDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-10-30sed: fix memory leak in 'r FILE' commandDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-10-29sed: accept -E as a synonym for -rDavid A. Wheeler
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-21sed: fix matching of newlines by $Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-08sed: remove now-redundant backslash-newline handlingDenys Vlasenko
4b0bb9e0fd9ec06e9e61b1a1527ace99ea9fe571 added this code in 2007, then in a2215b98f7d65bc613b9c8f008d79672402c6a07 more general fix was added. function old new delta add_cmd_block 98 58 -40 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-08sed: document where we are more liberal then GNUDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-15whitespace fixes. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-07-24sed: allow 'w' cmd to use two address formMimi Li
function old new delta add_cmd 1101 1094 -7 Signed-off-by: Mimi Li <felloak@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-21tweak help textsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-08sed: yet another fix on top of zero length match codeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-07sed: fix breakage added by zero length match codeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-04sed: code shrinkDenys Vlasenko
function old new delta process_files 2181 2173 -8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-04sed: fix zero chars match/replaceDenys Vlasenko
function old new delta process_files 2099 2181 +82 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-05-06sed: support long opts and -iSFXSimon B
function old new delta static.sed_longopts - 67 +67 sed_main 618 682 +64 packed_usage 29179 29236 +57 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/0 up/down: 188/0) Total: 188 bytes Signed-off-by: Simon B <sburnet@hotmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-24sed: slightly better fix for prev commit's problemDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-24sed: fix handling of s/// which has empty matchesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-15sed: fix possible case of signed char bug; expand debugging printoutsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-13sed: better help textDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-16sed: fix range handling for sed -i. Closes 4069Denys Vlasenko
function old new delta sed_main 606 618 +12 add_cmd 1099 1101 +2 process_files 2108 2099 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 14/-9) Total: 5 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05*: remove "Options:" string from help textsDenys Vlasenko
function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-05sed: shrink by 17 bytesPascal Bellard
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-03sed: support \r in s commandDenys Vlasenko
function old new delta copy_parsing_escapes 65 91 +26 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-03sed: code shrinkDenys Vlasenko
text data bss dec hex filename 876354 493 7584 884431 d7ecf busybox_old 876323 493 7584 884400 d7eb0 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-03move help text from include/usage.src.h to debianutils/*.c e2fsprogs/*.c ↵Pere Orga
editors/*.c loginutils/*.c mailutils/*.c Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-03whitespace fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-29whitespace cleanupDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-22*: introduce and use xmkstemp. -65 bytes.Alexander Shishkin
Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-08-16*: make GNU licensing statement forms more regularDenys Vlasenko
This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16sed: make N command behave as in GNU sedDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-01sed: fix sed -i: unlike without -i, it does not forget rangesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-19sed: trivial code shrink -18 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-19Revert "sed: trivial code shrink"Denys Vlasenko
This reverts commit c2c7aa4b0d16049322ca2ebc69ca1093f6944e3a.
2010-06-19sed: trivial code shrinkDenys Vlasenko
function old new delta sed_main 685 667 -18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-18add a comment about sed and suid bitsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-04typo fixDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-04sed: fix a case when one-line range matches past lines. Closes bug 1867.Denys Vlasenko
function old new delta process_files 2096 2107 +11 add_cmd 1142 1132 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 11/-10) Total: 1 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-12sed: fix a command with multible trailing backslashesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-20sed: fix nested {} caseDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-19sed: fix c cmdDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-04*: suppress ~60% of "aliased warnings" on gcc-4.4.1Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-08*: fix places where we were still using malloc/reallocDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>