diff options
| author | Thomas Knudsen <busstoptaktik@users.noreply.github.com> | 2017-11-27 04:03:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-27 04:03:07 +0100 |
| commit | 1f48f4c333bfe135296d3be643ef4981dc401c38 (patch) | |
| tree | fca354d0481f4d00bfa97ab5e2f3f546210dd307 /src/optargpm.h | |
| parent | df306f9800b1d6f7a1984877f090c1bc810da7a0 (diff) | |
| download | PROJ-1f48f4c333bfe135296d3be643ef4981dc401c38.tar.gz PROJ-1f48f4c333bfe135296d3be643ef4981dc401c38.zip | |
gie support for builtin errcodes, and other improvements (#684)
* gie support for builtin errcodes, and other improvements
* allow lower case error constants
Diffstat (limited to 'src/optargpm.h')
| -rw-r--r-- | src/optargpm.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/optargpm.h b/src/optargpm.h index 950ee529..acb96583 100644 --- a/src/optargpm.h +++ b/src/optargpm.h @@ -207,7 +207,7 @@ static int opt_raise_flag (OPTARGS *opt, int ordinal); static int opt_ordinal (OPTARGS *opt, char *option); int opt_given (OPTARGS *opt, char *option); char *opt_arg (OPTARGS *opt, char *option); -char *opt_strip_path (char *full_name); +const char *opt_strip_path (const char *full_name); OPTARGS *opt_parse (int argc, char **argv, const char *flags, const char *keys, const char **longflags, const char **longkeys); #define opt_eof_handler(opt) if (opt_eof (opt)) {continue;} else {;} @@ -219,7 +219,7 @@ struct OPTARGS { FILE *input; int input_index; int record_index; - char *progname; /* argv[0], stripped from /path/to, if present */ + const char *progname; /* argv[0], stripped from /path/to, if present */ char flaglevel[21]; /* if flag -f is specified n times, its optarg pointer is set to flaglevel + n */ char *optarg[256]; /* optarg[(int) 'f'] holds a pointer to the argument of option "-f" */ char *flags; /* a list of flag style options supported, e.g. "hv" (help and verbose) */ @@ -401,8 +401,8 @@ char *opt_arg (OPTARGS *opt, char *option) { return opt->optarg[ordinal]; } -char *opt_strip_path (char *full_name) { - char *last_path_delim, *stripped_name = full_name; +const char *opt_strip_path (const char *full_name) { + const char *last_path_delim, *stripped_name = full_name; last_path_delim = strrchr (stripped_name, '\\'); if (last_path_delim > stripped_name) |
