#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <epicsGetopt.h>
Go to the source code of this file.
|
int | getopt (int nargc, char *const *nargv, const char *ostr) |
|
#define _getprogname |
( |
| ) |
nargv[0] |
int getopt |
( |
int |
nargc, |
|
|
char * const * |
nargv, |
|
|
const char * |
ostr |
|
) |
| |
Definition at line 65 of file epicsGetopt.c.
70 static char *place =
EMSG;
75 if (
optind >= nargc || *(place = nargv[
optind]) !=
'-') {
79 if (place[1] && *++place ==
'-') {
85 if ((
optopt = (
int)*place++) == (
int)
':' ||
86 !(oli = strchr(ostr,
optopt))) {
96 (void)fprintf(
stderr,
"%s: illegal option -- %c\n",
108 else if (nargc <= ++optind) {
114 "%s: option requires an argument -- %c\n",