File: wgetopt.h

package info (click to toggle)
wimlib 1.14.4-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,044 kB
  • sloc: ansic: 49,927; sh: 7,148; makefile: 293
file content (31 lines) | stat: -rw-r--r-- 651 bytes parent folder | download
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
#ifndef _WGETOPT_H
#define _WGETOPT_H

#include <wchar.h>

extern wchar_t *woptarg;
extern int woptind, wopterr, woptopt;

struct woption {
	const wchar_t *name;
	int	       has_arg;
	int	      *flag;
	int	       val;
};

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

int
wgetopt (int argc, wchar_t *const *argv, const wchar_t *optstring);

int
wgetopt_long(int argc, wchar_t * const *argv, const wchar_t *options,
	     const struct woption *long_options, int *opt_index);

int
wgetopt_long_only(int argc, wchar_t *const *argv, const wchar_t *options,
		  const struct woption *long_options, int *opt_index);

#endif