<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/usr.bin/sed/process.c, branch release/7.0.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F7.0.0_cvs</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F7.0.0_cvs'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2008-02-24T05:45:17Z</updated>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>2008-02-24T05:45:17Z</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>2008-02-24T05:45:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=a9c219fa3cec18ef9f30edec6fa106bf0e2d423d'/>
<id>urn:sha1:a9c219fa3cec18ef9f30edec6fa106bf0e2d423d</id>
<content type='text'>
'RELENG_7_0_0_RELEASE'.

This commit was manufactured to restore the state of the 7.0-RELEASE image.
</content>
</entry>
<entry>
<title>Drop the argument to the OUT macro because it can't emit</title>
<updated>2007-06-12T12:17:25Z</updated>
<author>
<name>Yaroslav Tykhiy</name>
<email>ytykhiy@gmail.com</email>
</author>
<published>2007-06-12T12:17:25Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=85ae5d2f948c2ece5b8401ecfc33206a4c2b4708'/>
<id>urn:sha1:85ae5d2f948c2ece5b8401ecfc33206a4c2b4708</id>
<content type='text'>
anything but the pattern space anyway.  Apply style(9)
to the macro.

Tested with:	md5(1)
</content>
</entry>
<entry>
<title>Don't forget to clear out the hold space for each subsequent file</title>
<updated>2007-06-12T12:05:24Z</updated>
<author>
<name>Yaroslav Tykhiy</name>
<email>ytykhiy@gmail.com</email>
</author>
<published>2007-06-12T12:05:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=26a5710c40b83c69c0193be82ffc100b2159fe65'/>
<id>urn:sha1:26a5710c40b83c69c0193be82ffc100b2159fe65</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>There is a symbolic antonym for REPLACE as a flag to cspace()</title>
<updated>2007-06-12T10:56:38Z</updated>
<author>
<name>Yaroslav Tykhiy</name>
<email>ytykhiy@gmail.com</email>
</author>
<published>2007-06-12T10:56:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=bebfe2adf772a55f7d0f944d37246115c0e0e9d3'/>
<id>urn:sha1:bebfe2adf772a55f7d0f944d37246115c0e0e9d3</id>
<content type='text'>
and mf_fgets(): APPEND.  So use it instead of a 0 constant for
clarity.

Tested with:	md5(1)
</content>
</entry>
<entry>
<title>Change the semantics of -i (in-place editing) so that it treats</title>
<updated>2007-04-21T01:21:36Z</updated>
<author>
<name>Yaroslav Tykhiy</name>
<email>ytykhiy@gmail.com</email>
</author>
<published>2007-04-21T01:21:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=f6703c9c0a920659b90a0854b41ae1522c443927'/>
<id>urn:sha1:f6703c9c0a920659b90a0854b41ae1522c443927</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>Don't forget to close the range if we branched over its end</title>
<updated>2007-04-02T08:14:46Z</updated>
<author>
<name>Yaroslav Tykhiy</name>
<email>ytykhiy@gmail.com</email>
</author>
<published>2007-04-02T08:14:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=e9a0eed45187a25e0c76387e8e7a8c00694171a3'/>
<id>urn:sha1:e9a0eed45187a25e0c76387e8e7a8c00694171a3</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>Prevent foot-shooting in advance:  Put the MATCH() macro's value</title>
<updated>2007-04-02T06:47:48Z</updated>
<author>
<name>Yaroslav Tykhiy</name>
<email>ytykhiy@gmail.com</email>
</author>
<published>2007-04-02T06:47:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=b1b46280cb820e68b4173e96b3140b38a407474b'/>
<id>urn:sha1:b1b46280cb820e68b4173e96b3140b38a407474b</id>
<content type='text'>
in parentheses.  The ?: operator has a remarkably low precedence, so
expressions like (MATCH(foo) &amp;&amp; bar) would have an unexpected meaning
w/o the parentheses around MATCH().

Tested with:	md5(1)
</content>
</entry>
<entry>
<title>This trivial change should fix at least 3 similar bugs.  All of</title>
<updated>2007-04-01T13:25:03Z</updated>
<author>
<name>Yaroslav Tykhiy</name>
<email>ytykhiy@gmail.com</email>
</author>
<published>2007-04-01T13:25:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=6b8ef68111c89c0adbb048ea22ac7d2d6c29ca4e'/>
<id>urn:sha1:6b8ef68111c89c0adbb048ea22ac7d2d6c29ca4e</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>Make the comment for cspace() match reality.</title>
<updated>2007-03-31T09:08:22Z</updated>
<author>
<name>Yaroslav Tykhiy</name>
<email>ytykhiy@gmail.com</email>
</author>
<published>2007-03-31T09:08:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=c691c0ed18e1376f930f20d5193bbe5ea6946217'/>
<id>urn:sha1:c691c0ed18e1376f930f20d5193bbe5ea6946217</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix using "P" command on empty pattern space.  If the "P" command is</title>
<updated>2006-05-27T19:32:28Z</updated>
<author>
<name>Kirill Ponomarev</name>
<email>krion@FreeBSD.org</email>
</author>
<published>2006-05-27T19:32:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=85184b8b2361a1b3e6a06fc32f79edff6ce46759'/>
<id>urn:sha1:85184b8b2361a1b3e6a06fc32f79edff6ce46759</id>
<content type='text'>
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 &lt;aaz@althenia.net&gt;
MFC after:	7 days
</content>
</entry>
</feed>
