HuntnGather

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 31  →  ?path2? @ 32
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/HuntnGather/Hunt/Hunt
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/HuntnGather/Hunt/Hunt.c.info
/trunk/HuntnGather/Hunt/getopt.c
@@ -1,5 +1,5 @@
/****************************************************************************
* getopt(): Return the next user option on each iteration.
* getopt(): Return the next user option on each iteration.
* This is a clone of the usual UNIX getopt() function.
* If you have never used a getopt() before, you'll have to
* read about it on any UNIX machine or other C system that
@@ -104,7 +104,7 @@
* Global variables. You must declare these externs in your program
* if you want to see their values!
************************************************************************/
 
char *optarg = NULL; /* This will point to a required argument, if any. */
int optind = 1; /* The index of the next argument in argv. */
int opterr = 1; /* 1 == print internal error messages. 0 else. */
@@ -127,11 +127,11 @@
* If we have a DASH followed immediately by another DASH, this is the
* special "--" option that means "no more options follow." Return EOF.
* Otherwise, we have an actual option or list of options. Process it. */
 
static int NextOption(char *argv[], char *optString)
{
static int optsSkipped = 0; /* In a single argv[i]. */
 
if ((argv[optind][0] == DASH)
&& ((optopt = argv[optind][1+optsSkipped]) != '\0'))
{
@@ -158,7 +158,7 @@
* If the option requires no argument, just return the option letter.
* If the option requires an argument, call HandleArgument and return
* the option letter. */
 
static int RealOption(char *argv[], char *optString, int *optsSkipped,
int *optind, int optopt)
{