OLD | NEW |
1 /* | 1 /* |
2 * getopt.h | 2 * getopt.h |
3 * | 3 * |
4 * interface to a minimal implementation of the getopt() function, | 4 * interface to a minimal implementation of the getopt() function, |
5 * written so that test applications that use that function can run on | 5 * written so that test applications that use that function can run on |
6 * non-POSIX platforms | 6 * non-POSIX platforms |
7 * | 7 * |
8 */ | 8 */ |
9 /* | 9 /* |
10 * | 10 * |
(...skipping 27 matching lines...) Expand all Loading... |
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | 38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
40 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 40 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
41 * OF THE POSSIBILITY OF SUCH DAMAGE. | 41 * OF THE POSSIBILITY OF SUCH DAMAGE. |
42 * | 42 * |
43 */ | 43 */ |
44 | 44 |
45 #ifndef GETOPT_S_H | 45 #ifndef GETOPT_S_H |
46 #define GETOPT_S_H | 46 #define GETOPT_S_H |
47 | 47 |
| 48 #ifdef __cplusplus |
| 49 extern "C" { |
| 50 #endif |
| 51 |
48 /* | 52 /* |
49 * getopt_s(), optarg_s, and optind_s are small, locally defined | 53 * getopt_s(), optarg_s, and optind_s are small, locally defined |
50 * versions of the POSIX standard getopt() interface. | 54 * versions of the POSIX standard getopt() interface. |
51 */ | 55 */ |
52 | 56 |
53 int | 57 int |
54 getopt_s(int argc, char * const argv[], const char *optstring); | 58 getopt_s(int argc, char * const argv[], const char *optstring); |
55 | 59 |
56 extern char *optarg_s; /* defined in getopt.c */ | 60 extern char *optarg_s; /* defined in getopt.c */ |
57 | 61 |
58 extern int optind_s; /* defined in getopt.c */ | 62 extern int optind_s; /* defined in getopt.c */ |
59 | 63 |
| 64 #ifdef __cplusplus |
| 65 } |
| 66 #endif |
| 67 |
60 #endif /* GETOPT_S_H */ | 68 #endif /* GETOPT_S_H */ |
OLD | NEW |