Last change
on this file was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
723 bytes
|
Line | |
---|
1 | /* libc/sys/linux/include/getopt.h - Extended command line parsing */ |
---|
2 | |
---|
3 | /* Written 2000 by Werner Almesberger */ |
---|
4 | |
---|
5 | |
---|
6 | #ifndef _NEWLIB_GETOPT_H |
---|
7 | #define _NEWLIB_GETOPT_H |
---|
8 | |
---|
9 | #include <unistd.h> |
---|
10 | |
---|
11 | enum { NO_ARG, REQUIRED_ARG, OPTIONAL_ARG }; |
---|
12 | /* Define glibc names as well for compatibility. */ |
---|
13 | #define no_argument NO_ARG |
---|
14 | #define required_argument REQUIRED_ARG |
---|
15 | #define optional_argument OPTIONAL_ARG |
---|
16 | |
---|
17 | struct option { |
---|
18 | const char *name; |
---|
19 | int has_arg; |
---|
20 | int *flag; |
---|
21 | int val; |
---|
22 | }; |
---|
23 | |
---|
24 | int getopt_long(int argc,char *const argv[],const char *optstring, |
---|
25 | const struct option *longopts,int *longindex); |
---|
26 | |
---|
27 | int getopt_long_only(int argc,char *const argv[],const char *optstring, |
---|
28 | const struct option *longopts,int *longindex); |
---|
29 | |
---|
30 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.