Welcome to mirror list, hosted at ThFree Co, Russian Federation.

getopt.h « include « linux « sys « libc « newlib - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 994f8600137ecb3058ae6698876197f009d63955 (plain)
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
/* libc/sys/linux/include/getopt.h - Extended command line parsing */

/* Written 2000 by Werner Almesberger */


#ifndef _NEWLIB_GETOPT_H
#define _NEWLIB_GETOPT_H

#include <unistd.h>


enum { no_argument, required_argument, optional_argument };

struct option {
    const char *name;
    int has_arg;
    int *flag;
    int val;
};

int getopt_long(int argc,char *const argv[],const char *optstring,
  const struct option *longopts,int *longindex);

int getopt_long_only(int argc,char *const argv[],const char *optstring,
  const struct option *longopts,int *longindex);

#endif