File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ static void usage(const char* appName) {
8888 printf (" Encode a lat/lon to a Mapcode. If the territory code is specified, the\n " );
8989 printf (" encoding will only succeeed if the lat/lon is located in the territory.\n " );
9090 printf (" \n " );
91- printf (" %s [-b | --boundaries]\n " , appName);
91+ printf (" %s [-b | --boundaries] [<extraDigits>] \n " , appName);
9292 printf (" %s [-g | --grid] <nrOfPoints> [<extraDigits>]\n " , appName);
9393 printf (" %s [-r | --random] <nrOfPoints> [<extraDigits>] [<seed>]\n " , appName);
9494 printf (" \n " );
@@ -491,11 +491,14 @@ int main(const int argc, const char** argv)
491491 // ------------------------------------------------------------------
492492 // Generate a test set based on the Mapcode boundaries.
493493 // ------------------------------------------------------------------
494- if (argc != 2 ) {
494+ if (( argc < 2 ) || (argc > 3 ) ) {
495495 fprintf (stderr, " error: incorrect number of arguments\n\n " );
496496 usage (appName);
497497 return NORMAL_ERROR;
498498 }
499+ if (argc == 3 ) {
500+ extraDigits = atoi (argv[2 ]);
501+ }
499502
500503 resetStatistics (NR_BOUNDARY_RECS);
501504 for (int i = 0 ; i < totalNrOfPoints; ++i) {
You can’t perform that action at this time.
0 commit comments