summaryrefslogtreecommitdiffstats
path: root/usr.bin/sed
Commit message (Collapse)AuthorAgeFilesLines
* Fix using "P" command on empty pattern space. If the "P" command iskrion2006-05-271-2/+1
| | | | | | | | | | used once on a non-empty pattern space and then again on an empty pattern space, the second usage restores the pattern space length to the length that it had when the first "P" was used. PR: bin/96052 Submitted by: Andrey Zholos <aaz@althenia.net> MFC after: 7 days
* The function inplace_edit() doesn't exist anymore, remove the prototype.stefanf2005-09-241-1/+0
| | | | Submitted by: Leonardo Chiquitto Filho
* Bug fix: a numeric flag specification in the substitute command woulddds2005-08-041-2/+8
| | | | | | | | cause the next substitute flag to be ignored. While working at it, detect and report overflows. Reported by: Jingsong Liu MFC after: 1 week
* Markup and wording fixes.ru2005-06-141-1/+1
| | | | Approved by: re (blanket)
* Add option -l, to make output line buffered.glebius2005-05-102-5/+11
| | | | | | PR: bin/78692 Submitted by: Eugene Grosbein MFC after: 2 weeks
* Remove unused variables.stefanf2005-04-091-2/+1
|
* Fix dubious C code construct.stefanf2005-03-091-1/+1
|
* Expand *n't contractions.ru2005-02-131-1/+1
|
* Include missing headers.stefanf2005-02-091-0/+1
|
* Added the EXIT STATUS section where appropriate.ru2005-01-171-1/+1
|
* Scheduled mdoc(7) sweep.ru2005-01-111-5/+3
|
* Per letter dated July 22, 1999 remove 3rd clause of Berkeley deriveddds2004-08-098-32/+0
| | | | | | software (original contributor). Reviewed by: imp
* Document the limitation that multibyte characters cannot be used astjr2004-07-171-1/+6
| | | | delimiters with the 's' and 'y' commands.
* Document the -E and -a options as being extensions.tjr2004-07-141-2/+5
|
* Update BUGS section to reflect current state of multibyte character support.tjr2004-07-141-4/+11
|
* Make the 'y' (translate) command aware of multibyte characters.tjr2004-07-145-17/+145
|
* Overhaul lputs() to deal with multibyte characters, characters that taketjr2004-07-131-24/+53
| | | | up more than one column position, and null bytes.
* Document missing multibyte character support in utilities specifiedtjr2004-07-031-1/+5
| | | | by POSIX.
* Mechanically kill hard sentence breaks.ru2004-07-021-7/+14
|
* Removed trailing whitespace.ru2004-07-021-1/+1
|
* Plug a file descriptor leak.brian2004-06-031-7/+13
| | | | | | | When sed is asked to inline-edit files, it forgets to close the temporary file and runs out of descriptors for long command lines (assuming you reset kern.maxfilesperproc to something sane that's less than the number of files passed to sed).
* A new version that does exponents and lots of other neat things. Updatesmkelly2004-05-011-59/+335
| | | | | | from the original author of math.sed. Submitted by: K S Braunsdorf <sed@ksb.npcguild.org>
* Avoid using .Nm at the start of the sentence.charnier2004-01-041-3/+2
|
* Fix the case where the file is not in the current directory.des2003-11-041-1/+2
| | | | | Discovered by: Vladimir Kravchenko <jimson@mostcom.ru> Pointy hat to: des
* Reimplement in-place editing in a slightly less disgusting manner. Also,des2003-11-043-91/+84
| | | | | | | make an effort to preserve the ownership and mode of the file we are editing. Sponsored by: Registrar AS
* Whitespace cleanupdes2003-11-042-21/+21
|
* ANSIfydes2003-11-044-78/+33
|
* Correct style bugs in the in-place editing code.des2003-11-041-2/+2
|
* Change the buffer length test in NEEDSP() so that it does nottjr2003-11-021-1/+2
| | | | | | | | subtract one unsigned number from another potentially smaller one, leading to wraparound (and heap corruption, eventually). PR: 58813 MFC after: 2 weeks
* Fixed .Nm element, updated HISTORY section, added AUTHORS section.dds2003-07-221-2/+6
| | | | | Reviewed by: schweikh (mentor) MFC after: 2 weeks
* Test 8.16 in sed.test tests the ability of a sed to handle an emptydds2003-07-221-11/+19
| | | | | | | | | | | | | | | | | regular expression as the first argument to a substitute command. If used to test a sed which (erroneously) evaluates this at translation time rather than at execution time, the bugged sed is put into an infinite loop. This mode of failure seems excessive. Such a failing sed is the Free Software Foundation's sed 3.02. The specific test was also not being executed for the BSD sed. Both problems are now fixed. PR: misc/25585 Submitted by: Walter Briscoe <w.briscoe@ponl.com> Approved by: schweikh (mentor) MFC after: 2 weeks
* Do not dribble zero bytes into the output, by replacing an obfuscated iffanf2003-06-051-4/+1
| | | | | | | | whose true and false clauses were equivalent with a check that we are not about to stumble off the end of the line. Reported by: peter Pointy hat to: fanf
* Fix substitution when the regex matches the zero-length string.fanf2003-06-041-5/+6
| | | | | | | | | There are two bugs: in the s///g case, the substitution didn't occur at the end of the line; in the s///N case, the code didn't count forwards along the line properly. See the sg, s3, s4, and s5 tests in src/tools/regression/usr.bin/sed/. Reviewed by: tjr
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-1/+1
| | | | especially in troff files.
* mdoc(7) police: markup polishing.ru2002-11-261-6/+3
| | | | Approved by: re
* Initialize a variable in order to fix when faced with picky compilers.eric2002-09-201-0/+2
| | | | Sponsored by: Apple
* Correct boundary condition error in `D' and `P' commands when the lasttjr2002-08-111-6/+3
| | | | | | | | line of the pattern space is empty. Don't emit spurious newline when EOF is reached with the `N' command. Pointed out by: Oleg Osyka MFC after: 1 week
* Fix some bugs in in-place editing:fanf2002-07-301-28/+26
| | | | | | | | (1) errors from freopen were not reported correctly (2) large files were not handled correctly (3) read-only files broke things MFC after: 1 week
* Ignore leading semicolons on commands; required by SUSv3.tjr2002-07-301-2/+8
| | | | Obtained from: NetBSD (kleink, Aymeric Vincent)
* s/inline/__inline/markm2002-07-191-4/+4
|
* Make cspace()'s second argument const. Make `escapes' in lputs() const.tjr2002-07-082-3/+4
|
* Silence WARNS=4 by passing a non-const buffer to regerror(). Since ittjr2002-07-081-1/+1
| | | | doesn't actually use the buffer when errbuf_size == 0, pass NULL.
* Update another mention of <CR><CR> I missed the first time around (rev 1.2)tjr2002-07-041-1/+1
|
* Note that two carriage returns aren't required after entering thetjr2002-07-031-2/+3
| | | | | | initial setup anymore (since process.c rev. 1.25). Add $FreeBSD$. MFC after: 2 weeks
* Avoid checking whether each line is the last line of the file when we don'ttjr2002-07-033-25/+29
| | | | | | | | | need to know. Instead, check when we are trying to match a "$" address. This does not change the way sed processes regular files, but makes it behave more sensibly when used interactively. PR: 40101 MFC after: 2 weeks
* Don't let the pattern space become null if the `x' command is used when thetjr2002-07-031-0/+2
| | | | | | hold space is null; some functions assume it's never null. MFC after: 3 days
* Sort sections, and refer to sed as a utility, not a function.tjr2002-06-251-6/+6
|
* Fix off by one in `y' (transliterate) command which caused the last charactertjr2002-06-241-1/+1
| | | | | | of the pattern space not to be examined. Noticed by: Motoyuki Konno <motoyuki@bsdclub.org>
* Now that the pattern space contains no trailing newline, modify the `l'tjr2002-06-221-1/+5
| | | | command's output so it's the same as what SUSv3 specifies.
* Don't store newlines at the end of each line in the hold/pattern spaces,tjr2002-06-222-11/+12
| | | | | | | | instead add the newline when the pattern space is printed. Make the `G' and `H' commands add a newline to the space before the data, remove bogus addition of newline from `x' command. PR: 29790, 38195
OpenPOWER on IntegriCloud