Age | Commit message (Collapse) | Author | |
---|---|---|---|
2014-11-26 | Prefer setvbuf() to setlinebuf() for portability; ok deraadt@ | Todd C. Miller | |
2014-10-22 | make the description of the syntax of function lists agree | Ingo Schwarze | |
with our actual implementation, which also agrees with POSIX; triggered by guenther@'s answer to a question from chrisz@; ok chrisz@ guenther@ | |||
2014-10-08 | add a xreallocarray() like the existing fatal xmalloc(), and use it to | Theo de Raadt | |
detect potential integer. ok doug | |||
2014-05-27 | paste in an EXAMPLES section, from posix spec; | Jason McIntyre | |
2014-05-27 | there is no need to xref regex(3) and setbuf(3) in SEE ALSO - re_format(7) | Jason McIntyre | |
is enough; | |||
2014-05-26 | tweak the text for -a and function lists; | Jason McIntyre | |
2014-05-26 | rework the SED FUNCTIONS text; | Jason McIntyre | |
2014-05-26 | the `P' function was crying out for a comma; | Jason McIntyre | |
2014-05-26 | posix does not count `!' as a separate function, and neither should we; | Jason McIntyre | |
instead, move the description of this mechanism into the general SED FUNCTIONS section; | |||
2014-05-26 | remove the ugly hack that saw two It macros used to render one item; replace | Jason McIntyre | |
with other ugly hack (.br): at least this way we can whack a ton of Pp, and it feels not quite as wrong; while here, fix Em abuse by using Ic for functions and Ar for argument names; i also fixed up the text of "s" a little to make it read better; | |||
2013-11-28 | unsigned char for ctype | Theo de Raadt | |
ok krw okan | |||
2011-09-17 | Rewrite the main loop of the "sed s/..." command, to fix multiple | Ingo Schwarze | |
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. | |||
2011-07-26 | Backout previous, naddy@ found the following regression: | Ingo Schwarze | |
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. | |||
2011-07-24 | Rewrite the main loop of the "sed s/..." command, shortening it by ten | Ingo Schwarze | |
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@. | |||
2010-11-15 | NUL-terminate buffer in compiler_text() after realloc, not before. | Todd C. Miller | |
Now that we have dynamically sized buffers there may not be room for the NUL until after realloc. | |||
2010-09-03 | add an EXIT STATUS section for /usr/bin; | Jason McIntyre | |
2010-07-01 | Follow POSIX (IEEE Std 1003.1, 2004 Edition) in the implementation | Christian Weisgerber | |
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@ | |||
2010-07-01 | Allow [ to be used as a delimiter. | Christian Weisgerber | |
From FreeBSD; ok millert@ halex@ | |||
2010-01-10 | remove references to docs we no longer install; | Jason McIntyre | |
2010-01-04 | Stop installing many of the incredibly dated and un-authoritative share/doc | Theo de Raadt | |
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 | |||
2009-10-28 | rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and | Theo de Raadt | |
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 | |||
2009-10-23 | When adding text due to an a, c, or i command, don't eat the space(s) at | Reyk Floeter | |
the beginning of the lines since the addition is supposed to be "verbatim". From NetBSD, also matches the bahaviour of GNU sed ok millert@ | |||
2009-08-07 | tweak previous; | Jason McIntyre | |
2009-08-07 | add -E flag to compile regular expressions using the extended POSIX | Damien Miller | |
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@ | |||
2009-02-08 | bump the posix reference in STANDARDS to IEEE Std 1003.1-2008, with a few | Jason McIntyre | |
updates to follow; | |||
2008-10-16 | Move memory allocation closer to where it is needed. Also make | Todd C. Miller | |
a distinction between len and size. OK deraadt@ | |||
2008-10-09 | Now that len is set later in compile_subst() we need to move the | Todd C. Miller | |
xmalloc call that goes with it. | |||
2008-10-09 | In compile_subst(), adjust for the fact that the initial buffer | Todd C. Miller | |
that is passed in may now be larger than _POSIX2_LINE_MAX. Thanks to pedro@ for the test case. OK pedro@ | |||
2008-10-09 | Don't strip newline when reading lines; matches the original behavior. | Todd C. Miller | |
From otto@ | |||
2008-10-08 | Allow sed to handle arbitrarily long lines. Also plug a memory | Todd C. Miller | |
leak noticed in the process. Closes PR 5303. OK otto@ deraadt@ | |||
2008-10-07 | The 'l' command should not encode newlines. Also document that | Todd C. Miller | |
backspace is escaped as \b. OK phessler@ and jmc@ | |||
2008-10-07 | There is no /usr/old/bin/sed so compare test results against /usr/bin/sed | Todd C. Miller | |
2008-09-01 | note that the opening delimiter of a context address should be preceded | Jason McIntyre | |
by a backslash, if the delimiter is not a slash; adapted from freebsd -r1.47 from yar; | |||
2007-10-16 | sync the synopsis and usage of commands | Igor Sobrado | |
ok jmc@ | |||
2007-05-31 | convert to new .Dd format; | Jason McIntyre | |
2007-05-30 | - use a consistent text for STANDARDS | Jason McIntyre | |
- note which options are extensions to POSIX | |||
2007-03-20 | Add line-buffering flag (-u). | Ray Lai | |
OK deraadt@ and jmc@. | |||
2007-03-20 | remove some bogus *p tests from charles longeau | Ted Unangst | |
ok deraadt millert | |||
2007-01-09 | Accept empty command, from Matthew R. Dempsky; ok deraadt@ millert@ | Otto Moerbeek | |
2006-10-26 | - document that multiple commands may be newline or semicolon separated | Jason McIntyre | |
- 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 | |||
2006-10-24 | +.Ex -std sed | Jason McIntyre | |
2006-10-09 | pretty. the comma operator should not be used to cram two statements into | Ted Unangst | |
an if without braces, or worse, into a return. | |||
2005-04-11 | spacing | Theo de Raadt | |
2004-10-04 | remove some incorrect apostrophes, and make the text referring to | Jason McIntyre | |
re_format.7 slightly more consistent w/ other pages; | |||
2004-07-20 | ansi; khalek@linuxgamers.net | Theo de Raadt | |
2004-07-10 | xmalloc()->xrealloc() so that patterns larger than _POSIX2_LINE_MAX*2-1 | Otto Moerbeek | |
work. From mycroft@netbsd. ok millert@ | |||
2004-07-09 | From the other BSDs: fix a bug that made sed(1) fail if the last | Otto Moerbeek | |
character of the line buffer was a backslash. ok deraadt@ | |||
2004-06-13 | 1-byte overflow; ryo@nerv.org, otto ok | Theo de Raadt | |
2004-04-06 | - add margins when formatting w/ -Tascii | Jason McIntyre | |
- remove some macros that were causing formatting errors | |||
2004-02-17 | Unbreak numeric flag parsing. Based on a fix from Jared Yanovich; this | Otto Moerbeek | |
version with millert@. Resolves PR 3677. ok millert@ |