From 50a00beb9598747a3c396088fd4ad311cb6cdf39 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Sat, 11 Aug 2007 22:27:55 +0200 Subject: don't export duplicates --- src/GipfelWidget.cxx | 2 +- src/gipfel.cxx | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/GipfelWidget.cxx b/src/GipfelWidget.cxx index e6bed3a..8590b5c 100644 --- a/src/GipfelWidget.cxx +++ b/src/GipfelWidget.cxx @@ -735,7 +735,7 @@ GipfelWidget::export_hills(const char *file, FILE *fp) { int _x = (int) rint(m->x) + w() / 2; int _y = (int) rint(m->y) + h() / 2; - if (file && !(m->flags & Hill::EXPORT)) { + if (m->flags & Hill::DUPLICATE || file && !(m->flags & Hill::EXPORT)) { continue; } diff --git a/src/gipfel.cxx b/src/gipfel.cxx index 50f2404..43f2ed5 100644 --- a/src/gipfel.cxx +++ b/src/gipfel.cxx @@ -264,7 +264,7 @@ void usage() { fprintf(stderr, "usage: gipfel [-v ] [-d ]\n" " [-s] [-j ] [-t ] [-h ]\n" - " [-e ] -p]\n" + " [-e ] [-E] [-p]\n" " []\n" " -v Set point from which the picture was taken.\n" " This must be a string that unambiguously \n" @@ -281,9 +281,8 @@ void usage() { " -j JPEG output file for Stitch mode.\n" " -t Output directory for TIFF images in Stitch mode.\n" " -p Export position of image to stdout.\n" - " -e Export positions of hills from on image\n" - " to stdout. Uses hills from default data file if\n" - " is omitted.\n" + " -e Export positions of hills from on image.\n" + " -E Export hills from default data file.\n" " JPEG file(s) to use.\n"); } @@ -428,7 +427,7 @@ int main(int argc, char** argv) { char *export_file = NULL; err = 0; - while ((c = getopt(argc, argv, ":?d:v:sw:h:j:t:u:br:4e:V:p")) != EOF) { + while ((c = getopt(argc, argv, ":?d:v:sw:h:j:t:u:br:4e:V:pE")) != EOF) { switch (c) { case '?': usage(); @@ -441,6 +440,9 @@ int main(int argc, char** argv) { export_flag++; export_file = optarg; break; + case 'E': + export_flag++; + break; case 'v': view_point = optarg; break; -- cgit v1.2.3