History log of /freebsd/usr.bin/sed/process.c (Results 26 – 50 of 138)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 51dd214c 19-Jan-2015 Enji Cooper <ngie@FreeBSD.org>

MFhead @ r277403


# d899be7d 19-Jan-2015 Glen Barber <gjb@FreeBSD.org>

Reintegrate head: r274132-r277384

Sponsored by: The FreeBSD Foundation


# 8f0ea33f 13-Jan-2015 Glen Barber <gjb@FreeBSD.org>

Reintegrate head revisions r273096-r277147

Sponsored by: The FreeBSD Foundation


# a161398a 13-Jan-2015 Pedro F. Giffuni <pfg@FreeBSD.org>

Replace __inline GNUism with the standard inline.

MFC after: 1 week


# 707c9cc5 08-Jan-2015 Pedro F. Giffuni <pfg@FreeBSD.org>

sed: Address warnings with clang and gcc48.

MFC after: 2 weeks


# 9268022b 19-Nov-2014 Simon J. Gerraty <sjg@FreeBSD.org>

Merge from head@274682


Revision tags: release/10.1.0
# 246e7a2b 02-Sep-2014 Neel Natu <neel@FreeBSD.org>

IFC @r269962

Submitted by: Anish Gupta (akgupt3@gmail.com)


# 1b833d53 13-Aug-2014 Alexander V. Chernikov <melifaro@FreeBSD.org>

Sync to HEAD@r269943.


# 96d68291 08-Aug-2014 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

sed(1): Don't force a newline on last line, if input stream doesn't have one

While here, change how we check if the current line is the last one.
Before, we just checked if there were more files aft

sed(1): Don't force a newline on last line, if input stream doesn't have one

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

show more ...


# b38ebc05 30-Jul-2014 Jeremie Le Hen <jlh@FreeBSD.org>

Fix relative numerical addressing (addr,+N).

As a bonus the patch untangles a bit the logic and makes the code
easier to grasp.

PR: 192108
MFC after: 1 week


Revision tags: release/9.3.0, release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0, release/8.3.0_cvs, release/8.3.0, release/9.0.0, release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0
# 10b3b545 17-Sep-2009 Dag-Erling Smørgrav <des@FreeBSD.org>

Merge from head


# 2e370a5c 26-May-2009 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

Merge from HEAD


# f879e8d9 25-May-2009 Brian Somers <brian@FreeBSD.org>

Implement "addr1,+N" ranges - not dissimilar to grep's -A switch.

PR: 134856
Submitted by: Jeremie Le Hen - jeremie at le-hen dot org


Revision tags: release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0
# d3e5e11c 09-Feb-2008 David Malone <dwmalone@FreeBSD.org>

WARNS fixes:
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 wa

WARNS fixes:
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

show more ...


Revision tags: release/6.3.0_cvs, release/6.3.0
# 85ae5d2f 12-Jun-2007 Yaroslav Tykhiy <ytykhiy@gmail.com>

Drop the argument to the OUT macro because it can't emit
anything but the pattern space anyway. Apply style(9)
to the macro.

Tested with: md5(1)


# 26a5710c 12-Jun-2007 Yaroslav Tykhiy <ytykhiy@gmail.com>

Don't forget to clear out the hold space for each subsequent file
when in -i mode so that each file gets a clean context of its own.

Add a regression test for the bug.

Tested with: regression tests


# bebfe2ad 12-Jun-2007 Yaroslav Tykhiy <ytykhiy@gmail.com>

There is a symbolic antonym for REPLACE as a flag to cspace()
and mf_fgets(): APPEND. So use it instead of a 0 constant for
clarity.

Tested with: md5(1)


# f6703c9c 21-Apr-2007 Yaroslav Tykhiy <ytykhiy@gmail.com>

Change the semantics of -i (in-place editing) so that it treats
each file independently from other files. The new semantics are
desired in the most of practical cases, e.g.: delete lines 5-9
from ea

Change the semantics of -i (in-place editing) so that it treats
each file independently from other files. The new semantics are
desired in the most of practical cases, e.g.: delete lines 5-9
from each file.

Keep the previous semantics of -i under a new option, -I, which
uses a single continuous address space covering all files to edit
in-place -- they are too cool to just drop them.

Add regression tests for -i and -I.

Approved by: dds
Compared with: GNU sed
Discussed on: -hackers
MFC after: 2 weeks

show more ...


# e9a0eed4 02-Apr-2007 Yaroslav Tykhiy <ytykhiy@gmail.com>

Don't forget to close the range if we branched over its end
and had no chance to match it by the 2nd address precisely.
Otherwise the unclosed range would bogusly extend to the end
of stream.

Add a

Don't forget to close the range if we branched over its end
and had no chance to match it by the 2nd address precisely.
Otherwise the unclosed range would bogusly extend to the end
of stream.

Add a basic regression test for the bug fixed. (This change
also fixes the more complex case 5.3 from `multitest.t'.)

Compared with: SUN and GNU seds
Tested by: regression tests
MFC after: 1 week

show more ...


# b1b46280 02-Apr-2007 Yaroslav Tykhiy <ytykhiy@gmail.com>

Prevent foot-shooting in advance: Put the MATCH() macro's value
in parentheses. The ?: operator has a remarkably low precedence, so
expressions like (MATCH(foo) && bar) would have an unexpected mea

Prevent foot-shooting in advance: Put the MATCH() macro's value
in parentheses. The ?: operator has a remarkably low precedence, so
expressions like (MATCH(foo) && bar) would have an unexpected meaning
w/o the parentheses around MATCH().

Tested with: md5(1)

show more ...


# 6b8ef681 01-Apr-2007 Yaroslav Tykhiy <ytykhiy@gmail.com>

This trivial change should fix at least 3 similar bugs. All of
them are related to the `c' function's need to know if we are at
the actual end of the address range. (It must print the text not
earl

This trivial change should fix at least 3 similar bugs. All of
them are related to the `c' function's need to know if we are at
the actual end of the address range. (It must print the text not
earlier than the whole pattern space was deleted.) It appears the
only sed function with this requirement.

There is `lastaddr' set by applies(), which is to notify the `c'
function, but it can't always help because it's false when we are
hitting the end of file early. There is also a bug in applies()
due to which `lastaddr' isn't set to true on degenerate ranges such
as `$,$' or `N,$' if N appears the last line number.

Handling early EOF condition in applies() could look more logical,
but it would effectively revert sed to the unreasonable behaviour
rev. 1.26 of main.c fought against, as it would require lastline()
be called for each line within each address range. So it's better
to call lastline() only if needed by the `c' function.

Together with this change to sed go regression tests for the bugs
fixed (c1-c3). A basic test of `c' (c0) is also added as it helped
me to spot my own error.

Discussed with: dds
Tested by: the regression tests
MFC after: 1 week

show more ...


# c691c0ed 31-Mar-2007 Yaroslav Tykhiy <ytykhiy@gmail.com>

Make the comment for cspace() match reality.


Revision tags: release/6.2.0_cvs, release/6.2.0
# 85184b8b 27-May-2006 Kirill Ponomarev <krion@FreeBSD.org>

Fix using "P" command on empty pattern space. If the "P" command is
used once on a non-empty pattern space and then again on an empty
pattern space, the second usage restores the pattern space lengt

Fix using "P" command on empty pattern space. If the "P" command is
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

show more ...


Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0
# 6c97c3d1 09-Apr-2005 Stefan Farfeleder <stefanf@FreeBSD.org>

Remove unused variables.


Revision tags: release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0
# 30fd73fb 09-Aug-2004 Diomidis Spinellis <dds@FreeBSD.org>

Per letter dated July 22, 1999 remove 3rd clause of Berkeley derived
software (original contributor).

Reviewed by: imp


123456