<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.bin/getopt/getopt.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>ANSIify function definitions.</title>
<updated>2002-09-04T23:29:10+00:00</updated>
<author>
<name>David Malone</name>
<email>dwmalone@FreeBSD.org</email>
</author>
<published>2002-09-04T23:29:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f4ac32def255b5968bdd8150057b9c0d14595689'/>
<id>f4ac32def255b5968bdd8150057b9c0d14595689</id>
<content type='text'>
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by:	md5
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by:	md5
</pre>
</div>
</content>
</entry>
<entry>
<title>Consistently use FBSDID</title>
<updated>2002-06-30T05:25:07+00:00</updated>
<author>
<name>David E. O'Brien</name>
<email>obrien@FreeBSD.org</email>
</author>
<published>2002-06-30T05:25:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e026a48c34d396fe7d0e382673a69bc047c0bfca'/>
<id>e026a48c34d396fe7d0e382673a69bc047c0bfca</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Minor nit; return(foo) from main rather than exit(foo).</title>
<updated>2002-04-28T14:04:24+00:00</updated>
<author>
<name>Mark Murray</name>
<email>markm@FreeBSD.org</email>
</author>
<published>2002-04-28T14:04:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6c28b67b1e004e45f13067a61ca68a011848b065'/>
<id>6c28b67b1e004e45f13067a61ca68a011848b065</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Warns cleanup (just make main return an int).</title>
<updated>2001-12-03T20:57:49+00:00</updated>
<author>
<name>David Malone</name>
<email>dwmalone@FreeBSD.org</email>
</author>
<published>2001-12-03T20:57:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b268886863c48b66e5af50362872591ba4d9506f'/>
<id>b268886863c48b66e5af50362872591ba4d9506f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Include missing header files which define functions for which gcc has</title>
<updated>2001-06-24T19:50:42+00:00</updated>
<author>
<name>Dima Dorfman</name>
<email>dd@FreeBSD.org</email>
</author>
<published>2001-06-24T19:50:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7a19d1bbb9f8fe580d509ad1caf8343e876fa045'/>
<id>7a19d1bbb9f8fe580d509ad1caf8343e876fa045</id>
<content type='text'>
builtins (e.g., exit, strcmp).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
builtins (e.g., exit, strcmp).
</pre>
</div>
</content>
</entry>
<entry>
<title>getopt and friends are declared in &lt;unistd.h&gt;</title>
<updated>2000-09-04T06:09:54+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2000-09-04T06:09:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=62f882d620bdfa783c01626012d69f468ba34e28'/>
<id>62f882d620bdfa783c01626012d69f468ba34e28</id>
<content type='text'>
getopt returns -1 not EOF.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
getopt returns -1 not EOF.
</pre>
</div>
</content>
</entry>
<entry>
<title>Back out part of previous commit.</title>
<updated>1999-04-04T00:25:39+00:00</updated>
<author>
<name>Martin Cracauer</name>
<email>cracauer@FreeBSD.org</email>
</author>
<published>1999-04-04T00:25:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0ab2a7ae85e2d50dcafed917b86006b751783ca3'/>
<id>0ab2a7ae85e2d50dcafed917b86006b751783ca3</id>
<content type='text'>
Arguments with whitespaces are easy to fix, but in combination with
shell metachars that should not be evaluated it is very hard, probably
impossible to fix without going to a line-oriented solution.

Next time I will believe Henry Spencer when he says "this looks easy
to fix but isn't".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Arguments with whitespaces are easy to fix, but in combination with
shell metachars that should not be evaluated it is very hard, probably
impossible to fix without going to a line-oriented solution.

Next time I will believe Henry Spencer when he says "this looks easy
to fix but isn't".
</pre>
</div>
</content>
</entry>
<entry>
<title>1) Fix the case where a shellscript using getopt is called with a</title>
<updated>1999-04-03T22:24:36+00:00</updated>
<author>
<name>Martin Cracauer</name>
<email>cracauer@FreeBSD.org</email>
</author>
<published>1999-04-03T22:24:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=18b3ba267cff8d71364cbabb5429eccf1e79bba4'/>
<id>18b3ba267cff8d71364cbabb5429eccf1e79bba4</id>
<content type='text'>
   parameter that has space in it, both in getopt.c and in the manpage
   example.

2) Fix the example in the manpage. The set(1) command is required to
   return 0 (POSIX 1003.2, section 3.14.11), so you can't test for
   getopt's exit status like the example did:

  #! /bin/sh
  set -- `getopt abo: $*`
  if test $? != 0  # wrong, tests for set's exit status, which is
                   # always zero, no for getopt(1)'s.

Fixes PR bin/5845, which thought it was getopt's fault, but in fact
the manpage was wrong.

I also updated the example to be more useful and updated the BUGS
section.

PR:		bin/5845
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
   parameter that has space in it, both in getopt.c and in the manpage
   example.

2) Fix the example in the manpage. The set(1) command is required to
   return 0 (POSIX 1003.2, section 3.14.11), so you can't test for
   getopt's exit status like the example did:

  #! /bin/sh
  set -- `getopt abo: $*`
  if test $? != 0  # wrong, tests for set's exit status, which is
                   # always zero, no for getopt(1)'s.

Fixes PR bin/5845, which thought it was getopt's fault, but in fact
the manpage was wrong.

I also updated the example to be more useful and updated the BUGS
section.

PR:		bin/5845
</pre>
</div>
</content>
</entry>
<entry>
<title>compare return value from getopt against -1 rather than EOF, per the final</title>
<updated>1997-03-29T04:34:07+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>1997-03-29T04:34:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1c8af8787354e20c2b38cab5801698133ff8b403'/>
<id>1c8af8787354e20c2b38cab5801698133ff8b403</id>
<content type='text'>
posix standard on the topic.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
posix standard on the topic.
</pre>
</div>
</content>
</entry>
</feed>
