[mapcode] 08/32: Fixed error msg

Stefan Fritsch sf at moszumanska.debian.org
Wed Nov 2 23:27:15 UTC 2016


This is an automated email from the git hooks/post-receive script.

sf pushed a commit to annotated tag v1.33
in repository mapcode.

commit 3088aa33a0411bdd85d31bec8a59f22ee6cc9f36
Author: Rijn Buve <rijn at buve.nl>
Date:   Wed Aug 20 19:07:47 2014 +0200

    Fixed error msg
---
 mapcode.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/mapcode.c b/mapcode.c
index 3a0afc2..fa54020 100644
--- a/mapcode.c
+++ b/mapcode.c
@@ -11,12 +11,12 @@ static const double PI = 3.14159265358979323846;
 
 static void usage(const char* appName) {
     printf("Usage: \n");
-    printf("    %s [-d | --decode] <default-territory-ISO3> <mapcode> [<mapcode> ...]\n", appName);
+    printf("    %s [-d | --decode] <default-territory> <mapcode> [<mapcode> ...]\n", appName);
     printf("\n");
     printf("       Decode a Mapcode to a lat/lon. The default territory code is used if\n");
     printf("       the Mapcode is a shorthand local code\n");
     printf("\n");
-    printf("    %s [-e | --encode] <lat:-90..90> <lon:-180..180> [territory-ISO3]>\n", appName);
+    printf("    %s [-e | --encode] <lat:-90..90> <lon:-180..180> [territory]>\n", appName);
     printf("\n");
     printf("       Encode a lat/lon to a Mapcode. If the territory code is specified, the\n");
     printf("       encoding will only succeeed if the lat/lon is located in the territory.\n");
@@ -50,7 +50,7 @@ int main(const int argc, const char** argv)
     if ((strcmp(cmd, "-d") == 0) || (strcmp(cmd, "--decode") == 0)) {
 
         // ------------------------------------------------------------------
-        // Decode: [-d | --decode] <default-territory-ISO3> <mapcode> [<mapcode> ...]
+        // Decode: [-d | --decode] <default-territory> <mapcode> [<mapcode> ...]
         // ------------------------------------------------------------------
         if (argc < 4) {
             usage(appName);
@@ -64,7 +64,7 @@ int main(const int argc, const char** argv)
         for (int i = 3; i < argc; ++i) {
             int err = mc2coord(&lat, &lon, argv[i], context);
             if (err != 0) {
-                printf("error: cannot decode '%s' (default territory='%s')\n", argv[i], argv[1]);
+                printf("error: cannot decode '%s' (default territory='%s')\n", argv[i], argv[2]);
                 return -1;
             }
             printf("%f %f\n", lat, lon);
@@ -73,7 +73,7 @@ int main(const int argc, const char** argv)
     else if ((strcmp(cmd, "-e") == 0) || (strcmp(cmd, "--encode") == 0)) {
 
         // ------------------------------------------------------------------
-        // Encode: [-e | --encode] <lat:-90..90> <lon:-180..180> [territory-ISO3]>
+        // Encode: [-e | --encode] <lat:-90..90> <lon:-180..180> [territory]>
         // ------------------------------------------------------------------
         if ((argc != 4) && (argc != 5)) {
             usage(appName);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mapcode.git



More information about the Pkg-grass-devel mailing list