/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
#include <ast.h>
#include <ast_getopt.h>
#include <error.h>
#include <option.h>
#include <getopt.h>
#include <ctype.h>
static const char* lastoptstring;
static char* usage;
static int lastoptind;
static int
golly(int argc, char* const* argv, const char* optstring, const struct option* longopts, int* longindex, int flags)
{
register char* s;
register const struct option* o;
register int c;
char* t;
{
return -1;
{
else
{
{
*s++ = ' ';
if (*s == ':')
{
*s++ = ' ';
if (*s == ':')
*s = ' ';
}
}
}
if (o->has_arg)
{
if (o->has_arg == optional_argument)
}
}
s = t;
while (c = *s++)
if (c != ' ')
{
if (*s == ':')
{
if (*++s == ':')
{
s++;
}
}
}
return -1;
}
{
sfstrclose(up);
up = 0;
c = -1;
}
else
{
if (c == ':' || c == '?')
{
{
if (!error_info.id)
}
c = '?';
}
if (c < 0)
{
if (o->flag)
{
c = 0;
}
else
c = o->val;
}
}
return c;
}
extern int
getopt_long(int argc, char* const* argv, const char* optstring, const struct option* longopts, int* longindex)
{
}
extern int
getopt_long_only(int argc, char* const* argv, const char* optstring, const struct option* longopts, int* longindex)
{
}