Skip to content

Commit 88d0cf8

Browse files
committed
New data added
1 parent c754b0a commit 88d0cf8

File tree

7 files changed

+37
-20
lines changed

7 files changed

+37
-20
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ This produces the following help text:
119119

120120
# Release Notes
121121

122+
### 2.3.1
123+
124+
* Minor fixes to prevent compiler warnings.
125+
126+
* Minor fixes to prevent multiple inclusion of `.h` files.
127+
128+
* Minor data fix for Gansu Province, China (mountain range extending further west).
129+
122130
### 2.3.0
123131

124132
* Arabic script added.

mapcodelib/basics.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
#ifndef __BASICS_H__
17+
#define __BASICS_H__
1618

17-
// *** GENERATED FILE, DO NOT CHANGE OR PRETTIFY ***
1819

19-
// TODO: Missing multiple header inclusion prevention: #ifndef __FILE_H__ #define __FILE_H__ etc.
20+
// *** GENERATED FILE (coords.cpp), DO NOT CHANGE OR PRETTIFY ***
2021

21-
#define mapcode_dataversion "2.2" // coords 2.0.2
22+
#define mapcode_dataversion "2.3.0" // coords 2.0.2
2223

2324
static const char *ALIASES =
2425
"2UK=2UT,2CG=2CT,1GU=GUM,1UM=UMI,1VI=VIR,1AS=ASM,1MP=MNP,4CX=CXR,4CC=CCK,4NF=NFK,4HM=HMD,COL=5CL,"
@@ -16449,7 +16450,7 @@ static const mminforec mminfo[NR_RECS+1] = {
1644916450
{ 99663928, 37426995, 103030311, 40108185, 0x001000d},
1645016451
{ 96267754, 38767590, 99663928, 41448780, 0x0010015},
1645116452
{ 89350000, 31535000, 108740000, 42800000, 0x3060016},
16452-
{ 92750000, 32560000, 108740000, 42800000, 0x0020217},
16453+
{ 92290000, 32560000, 108740000, 42800000, 0x0020217},
1645316454
{ 101693766, 36588138, 101816182, 36666629, 0x01b000a}, // 8QH
1645416455
{ 101463360, 36352880, 102041448, 36843920, 0x001000c},
1645516456
{ 102040000, 36411010, 102338819, 36535000, 0x782044b},
@@ -16593,3 +16594,5 @@ static const mminforec mminfo[NR_RECS+1] = {
1659316594
};
1659416595
#endif // MAKE_SOURCE_DIGITAL
1659516596

16597+
#endif // __BASICS_H__
16598+

mapcodelib/mapcode_countrynames.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
// *** GENERATED FILE, DO NOT CHANGE OR PRETTIFY ***
17-
18-
// TODO: Missing multiple header inclusion prevention: #ifndef __FILE_H__ #define __FILE_H__ etc.
16+
#ifndef __MAPCODE_COUNTRYNAMES_H__
17+
#define __MAPCODE_COUNTRYNAMES_H__
1918

19+
// *** GENERATED FILE (coords.cpp), DO NOT CHANGE OR PRETTIFY ***
2020
const char *isofullname[] = {
2121
"Vatican City State (Holy See)",
2222
"Monaco (Principality of _)",
@@ -553,3 +553,4 @@ const char *isofullname[] = {
553553
"International (Worldwide) (Earth)",
554554
"?"};
555555

556+
#endif

mapcodelib/mapcode_countrynames_short.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
// *** GENERATED FILE, DO NOT CHANGE OR PRETTIFY ***
17-
18-
// TODO: Missing multiple header inclusion prevention: #ifndef __FILE_H__ #define __FILE_H__ etc.
16+
#ifndef __MAPCODE_COUNTRYNAMES_H__
17+
#define __MAPCODE_COUNTRYNAMES_H__
1918

19+
// *** GENERATED FILE (coords.cpp), DO NOT CHANGE OR PRETTIFY ***
2020
const char *isofullname[] = {
2121
"Vatican City State (Holy See)",
2222
"Monaco",
@@ -553,3 +553,4 @@ const char *isofullname[] = {
553553
"International (Worldwide) (Earth)",
554554
"?"};
555555

556+
#endif

mapcodelib/mapcode_fast_encode.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
* limitations under the License.
1515
*/
1616

17-
// *** GENERATED FILE, DO NOT CHANGE OR PRETTIFY ***
17+
#ifndef __MAPCODE_FAST_ENCODE_H__
18+
#define __MAPCODE_FAST_ENCODE_H__
1819

19-
// TODO: Missing multiple header inclusion prevention: #ifndef __FILE_H__ #define __FILE_H__ etc.
20+
// *** GENERATED FILE (dividemaps.cpp), DO NOT CHANGE OR PRETTIFY ***
2021

21-
static int redivar[2924] = {
22+
#define REDIVAR_SIZE 2924
23+
static int redivar[REDIVAR_SIZE] = {
2224
27984500, 1383,
2325
2537718, 676,
2426
12842450, 332,
@@ -717,3 +719,4 @@ static int redivar[2924] = {
717719
7, 468, 469, 476, 478, 485, 494, 496,
718720
8, 393, 410, 486, 487, 488, 492, 494, 496,
719721
0}; // 2924 records, data version 2.2
722+
#endif // __MAPCODE_FAST_ENCODE_H__

mapcodelib/mapcode_fastalpha.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17-
// TODO: Missing multiple header inclusion prevention: #ifndef __FILE_H__ #define __FILE_H__ etc.
18-
17+
#ifndef __MAPCODE_FASTALPHA_H__
18+
#define __MAPCODE_FASTALPHA_H__
1919
// *** GENERATED FILE, DO NOT CHANGE OR PRETTIFY ***
2020

2121
static const char parentletter[MAX_CCODE + 1] =
@@ -985,4 +985,5 @@ static const alphaRec alphaSearch[NRTERREC] = {
985985
{"ZWE", 185}
986986
};
987987

988-
// produced by fast_territories.cpp
988+
// produced by dividemaps.cpp : fast_territories.cpp
989+
#endif // __MAPCODE_FASTALPHA_H__

mapcodelib/mapcoder.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2499,15 +2499,15 @@ static char *convertToAbjad(char *str, const char *source, int maxlen) {
24992499
}
25002500
repack_if_alldigits(str, 0);
25012501
if (rest) {
2502-
int totalLen = (int) strlen(str);
2502+
int len = (int) strlen(str);
25032503
int needed = (int) strlen(rest);
2504-
int tocopy = maxlen - totalLen - 1;
2504+
int tocopy = maxlen - len - 1;
25052505
if (tocopy > needed) {
25062506
tocopy = needed;
25072507
}
25082508
if (tocopy > 0) {
2509-
memcpy(str + totalLen, rest, tocopy);
2510-
str[totalLen + tocopy] = 0;
2509+
memcpy(str + len, rest, tocopy);
2510+
str[len + tocopy] = 0;
25112511
}
25122512
}
25132513
return str;

0 commit comments

Comments
 (0)