option.h revision 7c2fbfb345896881c631598ee3852ce9ce33fb07
/* : : generated by proto : : */
/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2008 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> *
* *
***********************************************************************/
/*
* Glenn Fowler
* AT&T Research
*
* command line option parse interface
*/
#ifndef _OPTION_H
#if !defined(__PROTO__)
#include <prototyped.h>
#endif
#if !defined(__LINKAGE__)
#define __LINKAGE__ /* 2004-08-11 transition */
#endif
#define _OPTION_H
#include <ast.h>
#define OPT_VERSION 20070319L
struct Opt_s;
struct Optdisc_s;
typedef struct Optdisc_s
{
unsigned long version; /* OPT_VERSION */
unsigned long flags; /* OPT_* flags */
char* catalog; /* error catalog id */
} Optdisc_t;
/* NOTE: Opt_t member order fixed by a previous binary release */
#ifndef _OPT_PRIVATE_
#define _OPT_PRIVATE_ \
#endif
typedef struct Opt_s
{
int again; /* see optjoin() */
char* arg; /* {:,#} string argument */
char** argv; /* most recent argv */
int index; /* argv index */
long num; /* OBSOLETE -- use number */
int offset; /* char offset in argv[index] */
unsigned char assignment; /* option arg assigment op */
} Opt_t;
#if _BLD_ast && defined(__EXPORT__)
#endif
#if !_BLD_ast && defined(__IMPORT__)
#endif
#define opt_info (*_opt_infop_)
#define __MANGLE__ __LINKAGE__
#define optinit(d,f) (memset(d,0,sizeof(*(d))),(d)->version=OPT_VERSION,(d)->infof=(f),opt_info.disc=(d))
#if _BLD_ast && defined(__EXPORT__)
#endif
#define __MANGLE__ __LINKAGE__
#endif