You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mapcodelib/mapcoder.h
+21-19Lines changed: 21 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -29,9 +29,9 @@ extern "C" {
29
29
#defineSUPPORT_HIGH_PRECISION// Define to enable high-precision extension logic.
30
30
31
31
#defineMAX_NR_OF_MAPCODE_RESULTS 22 // Max. number of results ever returned by encoder (e.g. for 26.904899, 95.138515).
32
-
#defineMAX_PROPER_MAPCODE_LEN10 // Max. number of characters in a proper mapcode (including the dot).
32
+
#defineMAX_PROPER_MAPCODE_LEN11 // Max. number of characters in a proper mapcode (including the dot).
33
33
#defineMAX_PRECISION_DIGITS 8 // Max. number of extension characters (excluding the hyphen). Must be even.
34
-
#defineMAX_PRECISION_FACTOR 810000 // 30 to the power (MAX_PRECISION_DIGITS/2)
34
+
#defineMAX_PRECISION_FACTOR 810000 // 30 to the power (MAX_PRECISION_DIGITS/2).
35
35
#defineMAX_ISOCODE_LEN 7 // Max. number of characters of a valid territory code; although nothing longer than SIX characters is ever generated (RU-KAM), users can input SEVEN characters (RUS-KAM).
36
36
#defineMAX_CLEAN_MAPCODE_LEN (MAX_PROPER_MAPCODE_LEN + 1 + MAX_PRECISION_DIGITS) // Max. number of characters in a clean mapcode (excluding zero-terminator).
37
37
#defineMAX_MAPCODE_RESULT_LEN (MAX_ISOCODE_LEN + 1 + MAX_CLEAN_MAPCODE_LEN + 1) // Max. number of characters to store a single result (including zero-terminator).
@@ -140,7 +140,7 @@ int encodeLatLonToSingleMapcode(
140
140
* Pass 0 if not available.
141
141
*
142
142
* Returns:
143
-
* 0 if encoding succeeded, nonzero in case of error
143
+
* 0 if encoding succeeded, nonzero in case of error.
144
144
*/
145
145
intdecodeMapcodeToLatLon(
146
146
double*lat,
@@ -289,42 +289,44 @@ int multipleBordersNearby(
289
289
* Decode a string to Roman characters.
290
290
*
291
291
* Arguments:
292
-
* string - String to decode.
292
+
* string - String to decode, allocated by caller.
293
293
* asciibuf - Buffer to be filled with the result
294
294
* maxlen - Size of asciibuf
295
295
*
296
296
* Returns:
297
-
* Pointer to asciibuf, which holds the result.
297
+
* Pointer to same buffers as asciibuf (allocated by caller), which holds the result.
0 commit comments