|
Home --> Documentations --> PJLIB-UTIL Reference
getopt.hGo to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __PJ_GETOPT_H__
00023 #define __PJ_GETOPT_H__ 1
00024
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039
00040
00041
00042
00043
00044
00045
00046 extern char *pj_optarg;
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060 extern int pj_optind;
00061
00062
00063
00064 extern int pj_optopt;
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087 struct pj_getopt_option
00088 {
00089 const char *name;
00090
00091
00092 int has_arg;
00093 int *flag;
00094 int val;
00095 };
00096
00097
00098
00099 # define no_argument 0
00100 # define required_argument 1
00101 # define optional_argument 2
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128 int pj_getopt (int argc, char *const *argv, const char *shortopts);
00129
00130 int pj_getopt_long (int argc, char *const *argv, const char *options,
00131 const struct pj_getopt_option *longopts, int *longind);
00132 int pj_getopt_long_only (int argc, char *const *argv,
00133 const char *shortopts,
00134 const struct pj_getopt_option *longopts, int *longind);
00135
00136
00137 #ifdef __cplusplus
00138 }
00139 #endif
00140
00145 #endif
00146
PJLIB-UTIL Open Source, small footprint, and portable asynchronous/caching DNS resolver, text scanner, STUN client, and XML library
Copyright (C) 2006-2009 Teluu Inc.
|