<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.sbin/pkg_install/lib/str.c, branch release/5.3.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>2004-11-04T19:12:42+00:00</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>2004-11-04T19:12:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3f86d8a2ea3f3265afaa1fd263b0004c5c000e69'/>
<id>3f86d8a2ea3f3265afaa1fd263b0004c5c000e69</id>
<content type='text'>
'RELENG_5_3_0_RELEASE'.

This commit was manufactured to restore the state of the 5.3-RELEASE image.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'RELENG_5_3_0_RELEASE'.

This commit was manufactured to restore the state of the 5.3-RELEASE image.
</pre>
</div>
</content>
</entry>
<entry>
<title> pkg_create incorrectly does not add trailing '\n' when it receives</title>
<updated>2003-05-26T17:12:22+00:00</updated>
<author>
<name>Mario Sergio Fujikawa Ferreira</name>
<email>lioux@FreeBSD.org</email>
</author>
<published>2003-05-26T17:12:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fc12c41ca36573a559dd631e41d3976c057dddc4'/>
<id>fc12c41ca36573a559dd631e41d3976c057dddc4</id>
<content type='text'>
either COMMENT or DESCR from the command line. When a port is
installed, one gets both +COMMENT and +DESCR files with a trailing
'\n' character. However, +COMMENT does not contain a trailing '\n'
when it is installed from a package due to this behavior of pkg_create.

 Therefore, make sure it behaves exactly the same regardless of
where got its information; either command line or files. The modified
functions are used by pkg_create.

PR:		52097
Reviewed by:	bento, kris,
		portmgr, re,
		Michael Nottebrock &lt;michaelnottebrock@gmx.net&gt;,
		Martin Horcicka &lt;horcicka@FreeBSD.cz&gt;
Approved by:	re (scottl)
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
either COMMENT or DESCR from the command line. When a port is
installed, one gets both +COMMENT and +DESCR files with a trailing
'\n' character. However, +COMMENT does not contain a trailing '\n'
when it is installed from a package due to this behavior of pkg_create.

 Therefore, make sure it behaves exactly the same regardless of
where got its information; either command line or files. The modified
functions are used by pkg_create.

PR:		52097
Reviewed by:	bento, kris,
		portmgr, re,
		Michael Nottebrock &lt;michaelnottebrock@gmx.net&gt;,
		Martin Horcicka &lt;horcicka@FreeBSD.cz&gt;
Approved by:	re (scottl)
MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix SCM ID's.</title>
<updated>2002-04-01T09:39:07+00:00</updated>
<author>
<name>David E. O'Brien</name>
<email>obrien@FreeBSD.org</email>
</author>
<published>2002-04-01T09:39:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0d8875ff46ad6fa4e22b676e1b09d28509e89fc6'/>
<id>0d8875ff46ad6fa4e22b676e1b09d28509e89fc6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>WARNS=2 cleanup.</title>
<updated>2001-10-10T06:58:42+00:00</updated>
<author>
<name>Maxim Sobolev</name>
<email>sobomax@FreeBSD.org</email>
</author>
<published>2001-10-10T06:58:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d100deb8cc0b79e72f19dfe82f8ea3ddd1278f88'/>
<id>d100deb8cc0b79e72f19dfe82f8ea3ddd1278f88</id>
<content type='text'>
Tested on:	i386, alpha
MFC after:	2 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tested on:	i386, alpha
MFC after:	2 weeks
</pre>
</div>
</content>
</entry>
<entry>
<title>Reduce private "lesser known" function redirection to improve clarity.</title>
<updated>2001-08-13T04:18:30+00:00</updated>
<author>
<name>David E. O'Brien</name>
<email>obrien@FreeBSD.org</email>
</author>
<published>2001-08-13T04:18:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0dd1c7932058925060ebc0f2dc8c0b1144712852'/>
<id>0dd1c7932058925060ebc0f2dc8c0b1144712852</id>
<content type='text'>
Approved by:	jkh
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Approved by:	jkh
</pre>
</div>
</content>
</entry>
<entry>
<title>The security officer requested this be backed out for discussion.</title>
<updated>2001-07-28T04:44:09+00:00</updated>
<author>
<name>David E. O'Brien</name>
<email>obrien@FreeBSD.org</email>
</author>
<published>2001-07-28T04:44:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=43b866b0ed69861df3597a4041cb1a99dd3e733b'/>
<id>43b866b0ed69861df3597a4041cb1a99dd3e733b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove s_strl*().  I am not sure what was thought they accomplished.</title>
<updated>2001-07-28T01:59:58+00:00</updated>
<author>
<name>David E. O'Brien</name>
<email>obrien@FreeBSD.org</email>
</author>
<published>2001-07-28T01:59:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2bae1ab6a53b8b653639d2be8eb2114ce8532c5a'/>
<id>2bae1ab6a53b8b653639d2be8eb2114ce8532c5a</id>
<content type='text'>
When reading the code I had to stop, say "ok, what does *these*
modifications of strl*() do?  Pull out grep.  Oh, not in add/, maybe above
in ../lib/?  Yep.  So what do they do?  Comments above them are misleading,
guess I'll have to read the code.  Oh, they just test strl* against the
size and return the result of the test.  Now I can continue to read the
code I was.

The uses of s_strl*() then test that result and errx()'s.
Lets think about the "optimized" code I am removing:

In general the compiler pushes the three args to strl* onto the stack and calls
s_strl*.  s_strl* has to indirectly access 3 args from the stack.  Then push
them on the stack a 2nd time for the real strl* call.  s_strl* then pops the
return from strl* off the stack; or moves it from the register it was returned
in, to the register where tests can happen.  s_strl* then pops the three
arguments to strl*.  Perform the test, push the result of the test, or move it
from the result register to the return value register.  The caller to s_strl*
now has to either pop the return value of s_strl* or move it from the return
value register to the test register.  The caller then pops the three args to
s_strl* off the stack (the same args that s_strl* itself had to pop off after
the real call to strl*).  The s_strl* caller then performs a simular test to
what has already been done, and conditionally jumps.  By doing things this way, we've given the compiler optimizer less to work with.

Also, please don't forget the that call to s_strl* has possibly jumped to code
not in the cache due to being far away from the calling code, thus causing a
pipeline stall.

So where is the "optimization" from s_strl*?
It isn't code clarity.
It isn't code execution speed.  It isn't code size either.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When reading the code I had to stop, say "ok, what does *these*
modifications of strl*() do?  Pull out grep.  Oh, not in add/, maybe above
in ../lib/?  Yep.  So what do they do?  Comments above them are misleading,
guess I'll have to read the code.  Oh, they just test strl* against the
size and return the result of the test.  Now I can continue to read the
code I was.

The uses of s_strl*() then test that result and errx()'s.
Lets think about the "optimized" code I am removing:

In general the compiler pushes the three args to strl* onto the stack and calls
s_strl*.  s_strl* has to indirectly access 3 args from the stack.  Then push
them on the stack a 2nd time for the real strl* call.  s_strl* then pops the
return from strl* off the stack; or moves it from the register it was returned
in, to the register where tests can happen.  s_strl* then pops the three
arguments to strl*.  Perform the test, push the result of the test, or move it
from the result register to the return value register.  The caller to s_strl*
now has to either pop the return value of s_strl* or move it from the return
value register to the test register.  The caller then pops the three args to
s_strl* off the stack (the same args that s_strl* itself had to pop off after
the real call to strl*).  The s_strl* caller then performs a simular test to
what has already been done, and conditionally jumps.  By doing things this way, we've given the compiler optimizer less to work with.

Also, please don't forget the that call to s_strl* has possibly jumped to code
not in the cache due to being far away from the calling code, thus causing a
pipeline stall.

So where is the "optimization" from s_strl*?
It isn't code clarity.
It isn't code execution speed.  It isn't code size either.
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean up some of the evil string handling in this code, replace</title>
<updated>2001-05-12T09:44:32+00:00</updated>
<author>
<name>Kris Kennaway</name>
<email>kris@FreeBSD.org</email>
</author>
<published>2001-05-12T09:44:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ff7543ca42f8a42b04545cb0c23f0fb3a00eced2'/>
<id>ff7543ca42f8a42b04545cb0c23f0fb3a00eced2</id>
<content type='text'>
warnx()+exit() with errx() and replace a big if..then..else construct
to determine the package download directory with a lookup table.

Reviewed by:	jkh
MFC after:	2 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
warnx()+exit() with errx() and replace a big if..then..else construct
to determine the package download directory with a lookup table.

Reviewed by:	jkh
MFC after:	2 weeks
</pre>
</div>
</content>
</entry>
<entry>
<title>- Add which(1)-like functionality into pkg_info;</title>
<updated>2001-03-23T18:45:24+00:00</updated>
<author>
<name>Maxim Sobolev</name>
<email>sobomax@FreeBSD.org</email>
</author>
<published>2001-03-23T18:45:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c805813625feb77d75b9207eb0fbfac1aeccaf07'/>
<id>c805813625feb77d75b9207eb0fbfac1aeccaf07</id>
<content type='text'>
- fix a harmless bug in match_installed() function introduced in my last
  commit;
- uniformely reorder includes across files.

Submitted by:		Garrett Rooney &lt;rooneg@electricjellyfish.net&gt;
Not objected by:	jkh, -ports
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- fix a harmless bug in match_installed() function introduced in my last
  commit;
- uniformely reorder includes across files.

Submitted by:		Garrett Rooney &lt;rooneg@electricjellyfish.net&gt;
Not objected by:	jkh, -ports
</pre>
</div>
</content>
</entry>
<entry>
<title>Cause fatal error messages to be a little more helpful to the programmer</title>
<updated>2000-10-22T09:53:27+00:00</updated>
<author>
<name>Jordan K. Hubbard</name>
<email>jkh@FreeBSD.org</email>
</author>
<published>2000-10-22T09:53:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=aed4d2d1375167ce84a31909de4c2f506cdd7239'/>
<id>aed4d2d1375167ce84a31909de4c2f506cdd7239</id>
<content type='text'>
concerning where they're taking place.

Switch from [r]index() to str[r]chr() functions, which are more ISO
compliant.

Prompted by:	Edward Welbourne &lt;eddy@vortigen.demon.co.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
concerning where they're taking place.

Switch from [r]index() to str[r]chr() functions, which are more ISO
compliant.

Prompted by:	Edward Welbourne &lt;eddy@vortigen.demon.co.uk&gt;
</pre>
</div>
</content>
</entry>
</feed>
