summaryrefslogtreecommitdiffstats
path: root/usr.bin/sed
Commit message (Collapse)AuthorAgeFilesLines
* Add META_MODE support.sjg2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-275-10/+19
| |\ | |/ |/|
| * Merge from head@274682sjg2014-11-194-26/+87
| |\
| * \ Merge head from 7/28sjg2014-08-192-9/+16
| |\ \
| * | | Updated dependenciessjg2014-05-161-1/+0
| | | |
| * | | Updated dependenciessjg2014-05-101-0/+2
| | | |
| * | | Merge from headsjg2014-05-081-1/+1
| |\ \ \
| * \ \ \ Merge headsjg2014-04-28162-3/+5748
| |\ \ \ \
| * \ \ \ \ Merge from headsjg2013-09-051-8/+11
| |\ \ \ \ \
| * | | | | | Updated dependenciessjg2013-03-111-0/+1
| | | | | | |
| * | | | | | Updated dependenciessjg2013-02-161-2/+0
| | | | | | |
| * | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | | sed: fix pasto from previous r277802.pfg2015-01-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 3 days
* | | | | | | Fix resource leak and dereference after NULL.pfg2015-01-272-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | process.c: Protect access against NULL. main.c: Prevent outfile overwrite resource leak. CID: 271181 CID: 1006930 Obtained from: NetBSD MFC after: 3 days
* | | | | | | Replace __inline GNUism with the standard inline.pfg2015-01-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 1 week
* | | | | | | Add a regression test for PR 192108.jlh2015-01-102-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I won't go through the hassle of MFCing it since I expect all changes to go first through HEAD anyway. PR: 192108
* | | | | | | Partial revert of r276832:pfg2015-01-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not bump the warns level as it still breaks the gcc build on sparc64 Reported by: jenkins
* | | | | | | sed: Address warnings with clang and gcc48.pfg2015-01-083-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 2 weeks
* | | | | | | sed: Bounds check the file path used in the 'w' command.pfg2014-12-161-1/+4
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modified version of a diff from Sebastien Marie to prevent a crash found with the afl fuzzer. Obtained from: OpenBSD (CVS Rev. 1.37) MFC after: 1 week
* | | | | | sed(1): Don't force a newline on last line, if input stream doesn't have onedumbbell2014-08-084-8/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While here, change how we check if the current line is the last one. Before, we just checked if there were more files after the current one. Now, we check the actual content of those files: they files may not have a line at all. This matches the definition of the "last line" by the Open Group. The new behavior is closer to GNU sed. PR: 160745 Phabric: https://phabric.freebsd.org/D431 Reviewed by: jilles Approved by: jilles Exp-run by: antoine
* | | | | | Fix relative numerical addressing (addr,+N).jlh2014-07-301-18/+26
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a bonus the patch untangles a bit the logic and makes the code easier to grasp. PR: 192108 MFC after: 1 week
* | | | | More sed(1) usage fixing: the extension -i is not optional.pfg2014-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Pointed out by: jmallet MFC after: 3 days
* | | | | Fix sed(1) usage: the extension -i is not an optional.pfg2014-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | MFC after: 3 days
* | | | | use .Mt to mark up email addresses consistently (part3)bapt2014-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de>
* | | | | Drop ifdef nonsense: just use setvbuf(3).pfg2014-06-211-9/+3
| | | | | | | | | | | | | | | | | | | | Pointed out by: kib, bde
* | | | | Add -u (unbuffered output) after GNU sed.pfg2014-06-202-6/+19
| |_|_|/ |/| | | | | | | | | | | | | | | Obtained from: NetBSD MFC after: 1 week
* | | | Use src.opts.mk in preference to bsd.own.mk except where we need stuffimp2014-05-061-1/+1
| |_|/ |/| | | | | | | | from the latter.
* | | Mark multi_test as requiring /usr/share/dict/words.jmmv2014-03-191-0/+1
| | | | | | | | | | | | The file may not be present if MK_DICT=no. Pointed out by Casey Peel.
* | | Migrate most of tools/regression/usr.bin/ to the new tests layout.jmmv2014-03-16160-0/+5743
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm starting with the easy cases. The leftovers need to be looked at a bit more closely. Note that this change _does_ modify the code of the old tests. This is required in order to allow the code to locate the data files in the source directory instead of the current directory, because Kyua automatically changes the latter to a temporary directory. Also note that at least one test is known to be broken here. Actually, the test is not really broken: it's marked as a TODO but unfortunately Kyua's TAP parser currently does not understand that. Will have to be fixed separately.
* | | Per the resolution of POSIX bug 0000779 (note 0002050) add support for using 'i'eadler2013-12-092-3/+4
| |/ |/| | | | | | | | | | | | | as a case insensitive flag. PR: standards/184641 Requested by: David A. Wheeler <dwheeler@dwheeler.com> MFC After: 1 week
* | sed: use getline() instead of fgetln().pfg2013-06-261-8/+11
|/ | | | | | | | | | | | | | In BSD, fgetln() available in libc but in Illumos the Solaris port had to include it internally. It also seems to have caused problems [1]. Aid portability by using getline() instead. Reference: https://www.illumos.org/issues/3820 [1] Submitted by: Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.com> Reviewed by: dds MFC after: 2 weeks
* Remove trailing whitespace per mdoc lint warningeadler2012-03-291-2/+2
| | | | | | | Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days
* Reword '}' description to sound more clear.ache2011-10-291-1/+1
| | | | | Submitted by: dougb MFC after: 7 days
* Update '}' description to reflect reality (and POSIX)ache2011-10-281-1/+1
| | | | | | PR: 96236 Submitted by: "Andreas Kohn" <andreas@syndrom23.de> MFC after: 7 days
* sed: Try hard links to make -i target available continually.jilles2011-01-081-4/+21
| | | | | | | | | | | | | | | | | | | | | When creating a backup file, sed renamed the original before renaming the changed copy into place, leading to a short time when no file with the original name was present (usually only visible on SMP systems). Try creating the backup file using a hard link instead, avoiding this problem. If creating the hard link fails for any reason, fall back to the old rename method. When not creating a backup file, sed already renamed the changed copy onto the original. This remains unchanged. I am not adding the suppression of redundant fchown/fchmod to this commit, because FreeBSD appears to check this in the kernel (for msdosfs at least). PR: bin/153261 Submitted by: Pedro F. Giffuni Reviewed by: dds (older version) Obtained from: Illumos MFC after: 2 weeks
* Make -r mean exactly the same thing as -E for increased compatibilityimp2010-03-312-3/+8
| | | | | | with GNU sed. MFC after: 7 days
* Build usr.bin/ with WARNS=6 by default.ed2010-01-021-0/+2
| | | | Also add some missing $FreeBSD$ to keep svn happy.
* Revert most part of 200420 as requested, as more review and polish isdelphij2009-12-132-0/+8
| | | | needed.
* Remove unneeded header includes from usr.bin/ except contributed code.delphij2009-12-112-8/+0
| | | | Tested with: make universe
* IEEE Std 1003.1, 2004 Edition states:dds2009-09-201-2/+1
| | | | | | | | | | | | | "The escape sequence '\n' shall match a <newline> embedded in the pattern space." It is unclear whether this also applies to a \n embedded in a character class. Disable the existing handling of \n in a character class following Mac OS X, GNU sed version 4.1.5 with --posix, and SunOS 5.10 /usr/bin/sed. Pointed by: Marius Strobl Obtained from: Mac OS X
* Follow POSIX (IEEE Std 1003.1, 2004 Edition) in the implementationdds2009-09-201-9/+12
| | | | | | | | | | | 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" Pointed by: Marius Strobl Obtained from: Mac OS X
* Allow [ to be used as a delimiter.dds2009-09-201-1/+1
| | | | | Pointed by: Marius Strobl Obtained from: Apple
* Bump the document date to reflect the recent address range enhancements.brian2009-05-251-1/+1
| | | | Suggested by: throdes
* Implement "addr1,+N" ranges - not dissimilar to grep's -A switch.brian2009-05-254-18/+39
| | | | | PR: 134856 Submitted by: Jeremie Le Hen - jeremie at le-hen dot org
* Fix the code to conform to the "or more" part of the following POSIXdds2008-11-111-1/+1
| | | | | | | | | | specification and regression test regress:25. "A function can be preceded by one or more '!' characters, in which case the function shall be applied if the addresses do not select the pattern space." MFC after: 2 weeks
* Add workaround for a back reference when no correspondinghrs2008-11-091-0/+8
| | | | | | | | | | | parenthesized subexpression is defined. For example, the following command line caused unexpected behavior like segmentation fault: % echo test | sed -e 's/test/\1/' PR: bin/126682 MFC after: 1 week
* Correct a silly typo I introduced: withing -> within.yar2008-09-011-1/+1
| | | | Noticed by: das
* Explicitly tell that one needs to start a context address with ayar2008-08-241-4/+11
| | | | | | | | | | | | | backslash if he/she wants to use a non-traditional delimiter, i.e., anything other than a slash. That is, /abc/ works as is, but xabcx needs to be spelled as \xabcx. Add appropriate markup. Bump Dd. Checked with: IEEE Std 1003.1, 2004 Edition MFC after: 3 days
* WARNS fixes:dwmalone2008-02-094-10/+12
| | | | | | | | | | 1) Add missing parens around assignment that is compared to zero. 2) Make some variables that only take non-negative values unsigned. 3) Some casts/type changes to fix other constness warnings. 4) Make one variable a const char *. 5) Make sure termwidth is positive, it doesn't make sense for it to be negative. Approved by: dds
OpenPOWER on IntegriCloud