diff options
author | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2014-05-29 23:01:21 +0000 |
---|---|---|
committer | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2014-05-29 23:01:21 +0000 |
commit | 37c472d35e6f72f228a518864f47fa37587653be (patch) | |
tree | ca94d5149796b27e1c747551b32521bc7543ecc1 /navit/maptool | |
parent | 76ab0b0460a4d56de499058cdf92ac45f3c47e95 (diff) | |
download | navit-svn-37c472d35e6f72f228a518864f47fa37587653be.tar.gz |
Fix:maptool:Put back switch '--experimental' removed in r.5780, add description text.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5792 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/maptool')
-rw-r--r-- | navit/maptool/maptool.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/navit/maptool/maptool.c b/navit/maptool/maptool.c index 7aac1f48..f29c2e2e 100644 --- a/navit/maptool/maptool.c +++ b/navit/maptool/maptool.c @@ -56,6 +56,10 @@ int slices; int unknown_country; int doway2poi=1; char ch_suffix[] ="r"; /* Used to make compiler happy due to Bug 35903 in gcc */ +/** Textual description of available experimental features, or NULL (=none available). */ +char* experimental_feature_description = NULL; /* add description here */ +/** Indicates if experimental features (if available) were enabled. */ +int experimental; struct buffer node_buffer = { 64*1024*1024, @@ -157,6 +161,8 @@ usage(FILE *f) fprintf(f,"-d (--db) <conn. string> : get osm data out of a postgresql database with osm simple scheme and given connect string\n"); #endif fprintf(f,"-e (--end) <phase> : end at specified phase\n"); + fprintf(f,"-E (--experimental) : Enable experimental features (%s)\n", + experimental_feature_description ? experimental_feature_description : "-not available in this version-"); fprintf(f,"-i (--input-file) <file> : specify the input file name (OSM), overrules default stdin\n"); fprintf(f,"-k (--keep-tmpfiles) : do not delete tmp files after processing. useful to reuse them\n\n"); fprintf(f,"-M (--o5m) : input file os o5m\n"); @@ -235,6 +241,7 @@ parse_option(struct maptool_params *p, char **argv, int argc, int *option_index) {"dump", 0, 0, 'D'}, {"dump-coordinates", 0, 0, 'c'}, {"end", 1, 0, 'e'}, + {"experimental", 0, 0, 'E'}, {"help", 0, 0, 'h'}, {"keep-tmpfiles", 0, 0, 'k'}, {"nodes-only", 0, 0, 'N'}, @@ -274,6 +281,9 @@ parse_option(struct maptool_params *p, char **argv, int argc, int *option_index) case 'D': p->output=1; break; + case 'E': + experimental=1; + break; case 'M': p->o5m=1; break; @@ -820,6 +830,10 @@ int main(int argc, char **argv) exit(0); } } + if (experimental && (!experimental_feature_description )) { + fprintf(stderr,"No experimental features available in this version, aborting. \n"); + exit(1); + } if (optind != argc-(p.output == 1 ? 0:1)) usage(stderr); p.result=argv[optind]; |