Skip to content

Commit 611d371

Browse files
authored
Merge pull request #29 from mapcode-foundation/dev
Release 2.5.1 (changed comment)
2 parents ad3e165 + 07ed6e0 commit 611d371

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

mapcodelib/mapcoder.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,17 @@ typedef struct {
4747
} Mapcodes;
4848

4949

50+
/**
51+
* The MapcodeElement structure is returned by decodeXXX and can be used to inspect or clean up the
52+
* mapcode input. The field territoryISO contains the cleaned up territory code from the input, but
53+
* the code may be abbreviated, or even missing (if it wasn't available in the input).
54+
*
55+
* If you want to get a full territory code, use:
56+
* char isoName[MAX_ISOCODE_LEN + 1];
57+
* getTerritoryIsoName(isoName, mapcodeElement.territoryCode, 0)
58+
*/
5059
typedef struct {
51-
char territoryISO[MAX_ISOCODE_LEN + 1]; // The (trimmed and uppercased) candidate territory ISO3166 code.
60+
char territoryISO[MAX_ISOCODE_LEN + 1]; // The (trimmed and uppercased) territory code, from the input.
5261
enum Territory territoryCode; // The territory, as recognized and disambiguated from territoryISO.
5362
char properMapcode[MAX_PROPER_MAPCODE_LEN + 1]; // The (romanised) mapcode excl. territory or extension.
5463
int indexOfDot; // Position of dot in properMapcode (a value between 2 and 5).

utility/compile.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
echo "Compiling..."
3+
cd ../mapcodelib
4+
gcc -O3 -c mapcoder.c
5+
cd ../utility
6+
gcc -O3 mapcode.cpp -lm -o mapcode ../mapcodelib/mapcoder.o
7+

0 commit comments

Comments
 (0)