/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1982-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 *
* *
* David Korn <dgk@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* getopts optstring name [arg...]
*
* David Korn
* AT&T Labs
* research!dgk
*
*/
#include "defs.h"
#include "variables.h"
#include <error.h>
#include <nval.h>
#include "builtins.h"
{
{
}
return(1);
}
{
struct {
} disc;
value[1] = 0;
key[1] = 0;
{
case 'a':
break;
case ':':
break;
case '?':
break;
}
if(argc>2)
{
argv +=1;
argc -=1;
}
else
{
}
options++;
if(jmpval)
{
sh_exit(2);
}
switch(opt_info.index>=0 && opt_info.index<=argc?(opt_info.num= LONG_MIN,flag=optget(argv,options)):0)
{
case '?':
if(mode==0)
/* FALL THRU */
case ':':
flag = '?';
if(mode)
else
{
flag = '?';
}
{
}
break;
case 0:
{
com[0] = "-?";
com[1] = 0;
}
*options = '?';
r=1;
break;
default:
}
else if (opt_info.arg && opt_info.num > 0 && isalpha((char)opt_info.num) && !isdigit(opt_info.arg[0]) && opt_info.arg[0] != '-' && opt_info.arg[0] != '+')
{
key[1] = 0;
}
else if(extended)
{
Sfdouble_t d;
}
else
return(r);
}