summaryrefslogtreecommitdiffstats
path: root/usr.bin/sed
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Kill superfluous blank line.sobomax2002-06-171-1/+0
|
* Correct the handling of (for example) the N command by only zeroing thetjr2002-06-161-1/+2
| | | | input space in mf_fgets() if we reach the end of all input files.
* Exit with non-zero status if an input file can not be opened. This wastjr2002-06-141-0/+1
| | | | broken by rev. 1.22.
* Fix one serious bug and one potential problem with in-place editing code:sobomax2002-06-141-70/+60
| | | | | | | | | | | | | - original version of code worked incorrectly when more than one input files were specified - it was moving the last line from the 1st file to be the first line of the 2nd, last line of the 2nd to be the first line of the 3rd and so on; - use mmap()->write() to create temporary file instead of malloc()->read()->write(), which was not only slower, but also did not bother to free allocated memory once backup file was created, potentially leading to memory exhausting when regex is applied to a big file or a large number of small ones.
* Refer to environ(7) for description of COLUMNS instead of describing ittjr2002-06-101-10/+9
| | | | in-line. Document effects of locale environment variables in the same way.
* The 10 occurrence limit for the `s' command documented here has not existedtjr2002-06-101-3/+4
| | | | for a very long time (or never did exist).
* Newlines are not escaped anymore.tjr2002-06-101-2/+0
|
* Don't write escape newlines with `l' command (SUSv3)tjr2002-06-101-3/+3
|
* Correctly handle global substitutions where the pattern is only "$", thetjr2002-06-101-0/+3
| | | | | EOL anchor, when the last input line does not end in a newline character. Picked up by the GNU sed test suite.
* Wrap lines correctly for the `l' command.tjr2002-06-041-1/+1
|
* Document the fact that the `l' command uses the COLUMNS environmenttjr2002-06-041-0/+13
| | | | variable (SUSv3)
OpenPOWER on IntegriCloud