diff options
| author | Thomas Knudsen <thokn@sdfe.dk> | 2018-02-04 15:49:48 +0100 |
|---|---|---|
| committer | Thomas Knudsen <thokn@sdfe.dk> | 2018-02-04 15:49:48 +0100 |
| commit | 0ca9e9ff582e9ed2243c1991326b172880d94f35 (patch) | |
| tree | fbe3daef42dbc467f107ce50f501719570d3990a /src/gie.c | |
| parent | 20b1b84f769a9127cdf1953d166a6ff756accbd7 (diff) | |
| download | PROJ-0ca9e9ff582e9ed2243c1991326b172880d94f35.tar.gz PROJ-0ca9e9ff582e9ed2243c1991326b172880d94f35.zip | |
Add --version option to gie and cct.
Additionally correct a spelling error in optargpm.h and
remove two lines of leftover cruft from gie.c
Diffstat (limited to 'src/gie.c')
| -rw-r--r-- | src/gie.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -133,8 +133,6 @@ typedef struct ffio { size_t level; } ffio; -FILE *test = 0; - static int get_inp (ffio *F); static int skip_to_next_tag (ffio *F); static int step_into_gie_block (ffio *F); @@ -231,7 +229,7 @@ static const char usage[] = { int main (int argc, char **argv) { int i; - const char *longflags[] = {"v=verbose", "q=quiet", "h=help", "l=list", 0}; + const char *longflags[] = {"v=verbose", "q=quiet", "h=help", "l=list", "version", 0}; const char *longkeys[] = {"o=output", 0}; OPTARGS *o; @@ -240,7 +238,6 @@ int main (int argc, char **argv) { T.verbosity = 1; T.tolerance = 5e-4; - test = fopen ("test.c", "wt"); o = opt_parse (argc, argv, "hlvq", "o", longflags, longkeys); if (0==o) return 0; @@ -250,6 +247,13 @@ int main (int argc, char **argv) { return 0; } + + if (opt_given (o, "version")) { + fprintf (stdout, "%s: %s\n", o->progname, pj_get_release ()); + return 0; + } + + if (opt_given (o, "l")) return list_err_codes (); |
