Skip to content

Commit a3ac7e3

Browse files
committed
Renamed country to territory
1 parent de189cb commit a3ac7e3

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

mapcode.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ static const double PI = 3.14159265358979323846;
1111

1212
static void usage(const char* appName) {
1313
printf("Usage: \n");
14-
printf(" %s [-d | --decode] <default-country-ISO3> <mapcode> [<mapcode> ...]\n", appName);
14+
printf(" %s [-d | --decode] <default-territory-ISO3> <mapcode> [<mapcode> ...]\n", appName);
1515
printf("\n");
16-
printf(" Decode a Mapcode to a lat/lon. The default country code is used if\n");
16+
printf(" Decode a Mapcode to a lat/lon. The default territory code is used if\n");
1717
printf(" the Mapcode is a shorthand local code\n");
1818
printf("\n");
19-
printf(" %s [-e | --encode] <lat:-90..90> <lon:-180..180> [country-ISO3]>\n", appName);
19+
printf(" %s [-e | --encode] <lat:-90..90> <lon:-180..180> [territory-ISO3]>\n", appName);
2020
printf("\n");
21-
printf(" Encode a lat/lon to a Mapcode. If the country code is specified, the\n");
22-
printf(" encoding will only succeeed if the lat/lon is located in the country.\n");
21+
printf(" Encode a lat/lon to a Mapcode. If the territory code is specified, the\n");
22+
printf(" encoding will only succeeed if the lat/lon is located in the territory.\n");
2323
printf("\n");
2424
printf(" %s [-g | --generate] <nrPoints> [<seed>]\n", appName);
2525
printf("\n");
2626
printf(" Create a test set of a number of uniformly distributed lat/lon pairs,\n");
2727
printf(" 3D x/y/z points and their Mapcodes). The output format is:\n");
2828
printf(" <nr> <lat> <lon> <x> <y> <z>\n");
29-
printf(" <country> <mapcode> (repeated 'nr' rtimes)\n");
29+
printf(" <territory> <mapcode> (repeated 'nr' rtimes)\n");
3030
printf(" <1 empty line>\n");
3131
printf("\n");
3232
printf(" The points will be uniformly distributed over the 3D surface of the Earth\n");
@@ -50,21 +50,21 @@ int main(const int argc, const char** argv)
5050
if ((strcmp(cmd, "-d") == 0) || (strcmp(cmd, "--decode") == 0)) {
5151

5252
// ------------------------------------------------------------------
53-
// Decode: [-d | --decode] <default-country-ISO3> <mapcode> [<mapcode> ...]
53+
// Decode: [-d | --decode] <default-territory-ISO3> <mapcode> [<mapcode> ...]
5454
// ------------------------------------------------------------------
5555
if (argc < 4) {
5656
usage(appName);
5757
return -1;
5858
}
5959

60-
const char* defaultCountry = argv[2];
60+
const char* defaultTerritory = argv[2];
6161
double lat;
6262
double lon;
63-
int context = text2tc(defaultCountry, 0);
63+
int context = text2tc(defaultTerritory, 0);
6464
for (int i = 3; i < argc; ++i) {
6565
int err = mc2coord(&lat, &lon, argv[i], context);
6666
if (err != 0) {
67-
printf("error: cannot decode '%s' (default country='%s')\n", argv[i], argv[1]);
67+
printf("error: cannot decode '%s' (default territory='%s')\n", argv[i], argv[1]);
6868
return -1;
6969
}
7070
printf("%f %f\n", lat, lon);
@@ -73,7 +73,7 @@ int main(const int argc, const char** argv)
7373
else if ((strcmp(cmd, "-e") == 0) || (strcmp(cmd, "--encode") == 0)) {
7474

7575
// ------------------------------------------------------------------
76-
// Encode: [-e | --encode] <lat:-90..90> <lon:-180..180> [country-ISO3]>
76+
// Encode: [-e | --encode] <lat:-90..90> <lon:-180..180> [territory-ISO3]>
7777
// ------------------------------------------------------------------
7878
if ((argc != 4) && (argc != 5)) {
7979
usage(appName);
@@ -89,7 +89,7 @@ int main(const int argc, const char** argv)
8989
const char* results[32];
9090
const int nrResults = coord2mc(results, lat, lon, context);
9191
if (nrResults <= 0) {
92-
printf("error: cannot encode lat=%s, lon=%s (default country=%d)\n", argv[2], argv[3], context);
92+
printf("error: cannot encode lat=%s, lon=%s (default territory=%d)\n", argv[2], argv[3], context);
9393
return -1;
9494
}
9595
for (int i = 0; i < nrResults; ++i) {

0 commit comments

Comments
 (0)