| 1 |
/***************************************************************************** |
| 2 |
* getopt.h - competent and free getopt library. |
| 3 |
* $Header: /cvsroot/freegetopt/freegetopt/getopt.h,v 1.2 2003/10/26 03:10:20 vindaci Exp $ |
| 4 |
* |
| 5 |
* Copyright (c)2002-2003 Mark K. Kim |
| 6 |
* All rights reserved. |
| 7 |
* |
| 8 |
* Redistribution and use in source and binary forms, with or without |
| 9 |
* modification, are permitted provided that the following conditions |
| 10 |
* are met: |
| 11 |
* |
| 12 |
* * Redistributions of source code must retain the above copyright |
| 13 |
* notice, this list of conditions and the following disclaimer. |
| 14 |
* |
| 15 |
* * Redistributions in binary form must reproduce the above copyright |
| 16 |
* notice, this list of conditions and the following disclaimer in |
| 17 |
* the documentation and/or other materials provided with the |
| 18 |
* distribution. |
| 19 |
* |
| 20 |
* * Neither the original author of this software nor the names of its |
| 21 |
* contributors may be used to endorse or promote products derived |
| 22 |
* from this software without specific prior written permission. |
| 23 |
* |
| 24 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 25 |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 26 |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 27 |
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
| 28 |
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 29 |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| 30 |
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS |
| 31 |
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
| 32 |
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 33 |
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF |
| 34 |
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH |
| 35 |
* DAMAGE. |
| 36 |
*/ |
| 37 |
#ifndef GETOPT_H_ |
| 38 |
#define GETOPT_H_ |
| 39 |
|
| 40 |
|
| 41 |
#ifdef __cplusplus |
| 42 |
extern "C" { |
| 43 |
#endif |
| 44 |
|
| 45 |
|
| 46 |
extern char* optarg; |
| 47 |
extern int optind; |
| 48 |
extern int opterr; |
| 49 |
extern int optopt; |
| 50 |
|
| 51 |
int getopt(int argc, char** argv, char* optstr); |
| 52 |
|
| 53 |
|
| 54 |
#ifdef __cplusplus |
| 55 |
} |
| 56 |
#endif |
| 57 |
|
| 58 |
|
| 59 |
#endif /* GETOPT_H_ */ |
| 60 |
|
| 61 |
|
| 62 |
/* vim:ts=3 |
| 63 |
*/ |