aboutsummaryrefslogtreecommitdiff
path: root/src/gie.c
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2018-02-06 09:17:21 +0100
committerGitHub <noreply@github.com>2018-02-06 09:17:21 +0100
commitcdce49332f5d66cb9ab6b9a922cb65f566f9a9ed (patch)
treef4db3efbb8fd787b0603cb44661f3e4b1c63c9f3 /src/gie.c
parentb24fc0f7cf105d89c194b63dc6d0dd2cf911b9c1 (diff)
parent0ca9e9ff582e9ed2243c1991326b172880d94f35 (diff)
downloadPROJ-cdce49332f5d66cb9ab6b9a922cb65f566f9a9ed.tar.gz
PROJ-cdce49332f5d66cb9ab6b9a922cb65f566f9a9ed.zip
Merge pull request #771 from busstoptaktik/gie_cct_version
Add --version option to gie and cct.
Diffstat (limited to 'src/gie.c')
-rw-r--r--src/gie.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gie.c b/src/gie.c
index b2673d13..ee5bae44 100644
--- a/src/gie.c
+++ b/src/gie.c
@@ -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 ();