tMake our getopt() implementation properly conformant - i.e. it ignores argv[0]. - vaccinewars - be a doctor and try to vaccinate the world
(HTM) git clone git://src.adamsgaard.dk/vaccinewars
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 085d49380f426d5ad20c7771d28b840171c420c7
(DIR) parent f9dd12e8900997767e53ab87f837c4162cfb78ea
(HTM) Author: Ben Webb <ben@salilab.org>
Date: Sat, 7 Jun 2003 17:55:48 +0000
Make our getopt() implementation properly conformant - i.e. it ignores argv[0].
Diffstat:
M src/util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/src/util.c b/src/util.c
t@@ -46,7 +46,7 @@
#ifndef HAVE_GETOPT
char *optarg;
-static int apos = 0;
+static int apos = 1; /* Skip argv[0], the executable name */
int getopt(int argc, char *const argv[], const char *str)
{