Rizin
unix-like reverse engineering framework and cli tools
getopt.h
Go to the documentation of this file.
1 #ifndef _HAD_GETOPT_H
2 #define _HAD_GETOPT_H
3 
4 /*
5  getopt.h -- header for getopt() replacement function
6  Copyright (C) 1999-2021 Dieter Baron and Thomas Klausner
7 
8  This file is part of libzip, a library to manipulate ZIP archives.
9  The authors can be contacted at <libzip@nih.at>
10 
11  Redistribution and use in source and binary forms, with or without
12  modification, are permitted provided that the following conditions
13  are met:
14  1. Redistributions of source code must retain the above copyright
15  notice, this list of conditions and the following disclaimer.
16  2. Redistributions in binary form must reproduce the above copyright
17  notice, this list of conditions and the following disclaimer in
18  the documentation and/or other materials provided with the
19  distribution.
20  3. The names of the authors may not be used to endorse or promote
21  products derived from this software without specific prior
22  written permission.
23 
24  THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
25  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
28  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
30  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
32  IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
33  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
34  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 */
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 extern char *optarg;
42 extern int optind;
43 extern int opterr;
44 
45 extern int getopt(int, char *const *, const char *);
46 
47 #ifdef __cplusplus
48 }
49 #endif
50 
51 #endif /* _HAD_GETOPT_H */
int getopt(int nargc, char *const nargv[], const char *ostr)
Definition: getopt.h:20
const char * optarg
Definition: getopt.h:9
int optind
Definition: getopt.h:6
int opterr
Definition: getopt.h:5