update epan/dissectors/pidl/drsuapi/drsuapi.idl from samba
[wireshark-sm.git] / wsutil / ws_getopt.h
blobb32badceacdf11e7e40e49f17549c337dea2360c
1 /** @file
3 * musl as a whole is licensed under the following standard MIT license:
5 * ----------------------------------------------------------------------
6 * Copyright © 2005-2020 Rich Felker, et al.
8 * Permission is hereby granted, free of charge, to any person obtaining
9 * a copy of this software and associated documentation files (the
10 * "Software"), to deal in the Software without restriction, including
11 * without limitation the rights to use, copy, modify, merge, publish,
12 * distribute, sublicense, and/or sell copies of the Software, and to
13 * permit persons to whom the Software is furnished to do so, subject to
14 * the following conditions:
16 * The above copyright notice and this permission notice shall be
17 * included in all copies or substantial portions of the Software.
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 * ----------------------------------------------------------------------
29 #ifndef _WS_GETOPT_H_
30 #define _WS_GETOPT_H_
32 #include <ws_symbol_export.h>
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
38 WS_DLL_PUBLIC int ws_getopt(int, char * const [], const char *);
39 WS_DLL_PUBLIC char *ws_optarg;
40 WS_DLL_PUBLIC int ws_optind, ws_opterr, ws_optopt, ws_optpos, ws_optreset;
42 struct ws_option {
43 const char *name;
44 int has_arg;
45 int *flag;
46 int val;
49 WS_DLL_PUBLIC int ws_getopt_long(int, char *const *, const char *, const struct ws_option *, int *);
50 WS_DLL_PUBLIC int ws_getopt_long_only(int, char *const *, const char *, const struct ws_option *, int *);
52 #define ws_no_argument 0
53 #define ws_required_argument 1
54 #define ws_optional_argument 2
56 #ifdef __cplusplus
58 #endif
60 #endif