Age | Commit message (Collapse) | Author |
|
ok krw okan
|
|
issues regarding the replacement of zero-length strings.
This commit brings back rev. 1.16, but without the regression that
forced the backout: No NUL bytes will be output now, not even when
the input file lacks a trailing newline character and there is a
zero-length match at the end.
OK otto@ deraadt@;
and naddy@ (who originally found the regression) checked that
the regression is indeed fixed.
|
|
When the input does not end in a trailing newline character
and there is an empty match at the end, the new code adds
a spurious '\0' character.
I have a fix, but otto@ prefers backout and full re-evaluation
after release.
|
|
lines and simplifying it by removing the switch statement implementing
/g, /1, and /2 separately and repetitively.
The idea to make the loop control variable slen, i.e. the length of the
string remaining to be processed, signed, and stay in the loop even when
slen == 0 (i.e. at the end of the string), lifted from FreeBSD by otto@.
On i386, process.o shrinks by 440 bytes, and the sed binary by 23 bytes.
This fixes multiple aspects of the replacement of multiple (/g) or
specific (e.g. /2) instances of zero-length matches, both with BREs and
EREs, both with and without a trailing newline character on the input.
Feedback and OK otto@.
|
|
Now that we have dynamically sized buffers there may not be room
for the NUL until after realloc.
|
|
|
|
of the y (translate) command.
"If a backslash character is immediately followed by a backslash
character in string1 or string2, the two backslash characters shall
be counted as a single literal backslash character"
From FreeBSD; ok millert@ halex@
|
|
From FreeBSD; ok millert@ halex@
|
|
|
|
files. If any information found in these documents is worthwhile and you
miss it, please make the time to work it into the manual pages (which people
actually do read).
ok guenther
|
|
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms
|
|
the beginning of the lines since the addition is supposed to be "verbatim".
From NetBSD, also matches the bahaviour of GNU sed
ok millert@
|
|
|
|
syntax. The -E flag is compatible with the other BSDs and OSX. -r is
also provided as an alias for compatibility with GNU sed.
feedback from jmc@ and millert@
ok millert@ pyr@ henning@ marco@
|
|
updates to follow;
|
|
a distinction between len and size. OK deraadt@
|
|
xmalloc call that goes with it.
|
|
that is passed in may now be larger than _POSIX2_LINE_MAX.
Thanks to pedro@ for the test case. OK pedro@
|
|
From otto@
|
|
leak noticed in the process. Closes PR 5303. OK otto@ deraadt@
|
|
backspace is escaped as \b. OK phessler@ and jmc@
|
|
|
|
by a backslash, if the delimiter is not a slash;
adapted from freebsd -r1.47 from yar;
|
|
ok jmc@
|
|
|
|
- note which options are extensions to POSIX
|
|
OK deraadt@ and jmc@.
|
|
ok deraadt millert
|
|
|
|
- refer to latest posix revision
- note that -a and newline-separated multiple commands are non-portable
- note which commands do not permit being specified separated by semicolons
based around pr 5269, from tilo stritzky
much help/ok otto
|
|
|
|
an if without braces, or worse, into a return.
|
|
|
|
re_format.7 slightly more consistent w/ other pages;
|
|
|
|
work. From mycroft@netbsd.
ok millert@
|
|
character of the line buffer was a backslash.
ok deraadt@
|
|
|
|
- remove some macros that were causing formatting errors
|
|
version with millert@. Resolves PR 3677.
ok millert@
|
|
|
|
|
|
- mmultiple args do not need to be quoted
- uppercase .Sh args
- reference 15.sed usd
- some other tidy up
|
|
discussed with todd@
|
|
expressions, rather than regex(3);
from Greg A. Woods;
|
|
(mvme68k/mvme88k) vs.c and (vax) if_le.c ok miod@
isakmpd ones ok ho@
|
|
ok millert@ otto@
|
|
apparently an extension, but without it you cannot express longer labelled
sed scripts as one-liners. noted by seb@todesplanet.de apr 2002. also
noted by cerille lefevre a bit later. fixed by otto and myself, tested
on tree builds to be careful
|
|
ok deraadt@
|
|
ok mickey@
|