1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
/** @file getopt_long.h
** @brief getopt_long
** @author Andrea Vedaldi
**/
/*
Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see legal/licenses/LICENSE.BSD.vlfeat)
*/
#ifndef VL_GETOPT_LONG_H
#define VL_GETOPT_LONG_H
#ifdef __cplusplus
extern "C" {
#endif
/* #include "generic.h" */
/* Added to avoid further modifying this source */
#define VL_EXPORT
VL_EXPORT int opterr ; /**< code of the last error occured while parsing an option */
VL_EXPORT int optind ; /**< index of the next option to process in @c argv */
VL_EXPORT int optopt ; /**< current option */
VL_EXPORT char * optarg ; /**< argument of the current option */
VL_EXPORT int optreset ; /**< reset flag */
/** @brief ::getopt_long option */
struct option
{
const char *name ; /**< option long name */
int has_arg ; /**< flag indicating whether the option has no, required or optional argument */
int *flag ; /**< pointer to a variable to set (if @c NULL, the value is returned instead) */
int val ; /**< value to set or to return */
} ;
#define no_argument 0 /**< ::option with no argument */
#define required_argument 1 /**< ::option with required argument */
#define optional_argument 2 /**< ::option with optional argument */
VL_EXPORT int getopt_long(int argc, char * const argv[],
const char * optstring,
const struct option * longopts, int * longindex);
#ifdef __cplusplus
} /* extern "C" */
#endif
/* VL_GETOPT_LONG_H */
#endif
|