File: bsd_getopt.h

package info (click to toggle)
id3tool 1.2a-14
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 556 kB
  • sloc: ansic: 2,372; sh: 666; perl: 235; makefile: 65
file content (34 lines) | stat: -rw-r--r-- 666 bytes parent folder | download | duplicates (6)
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
#ifndef _BSD_GETOPT_H
#define _BSD_GETOPT_H

/* bsd_getopt.h
 *
 * Chris Collins <chris@collins.id.au>
 */

/** header created for NetBSD getopt/getopt_long */

#ifndef HAVE_GETOPT_LONG

extern int	opterr;
extern int	optind;
extern int	optopt;
extern int	optreset;
extern char	*optarg;

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

#define no_argument		0
#define	required_argument	1
#define optional_argument	2

extern int	getopt(int nargc, char * const *nargv, const char *options);
extern int	getopt_long(int nargc, char * const *nargv, const char *options, const struct option *long_options, int *idx);

#endif
#endif /* _BSD_GETOPT_H */