Stage 2 towards unicode search.
Any other search improvements.


git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/sort2@3124 25d90789-57f7-4ee0-8453-03a3dfeeeb22
The repeat flag should not be applied to different groups in MDR2{1,2,3}
Re-instate mdr12 in gmapsupp.
Slightly modify the way that labels beginning with space are treated.

The plan is to remove initial spaces before creating the .img, although we should do the
right thing for a file that does have them if we can.

git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/sort2@3125 25d90789-57f7-4ee0-8453-03a3dfeeeb22
Sort maps and rewrite all map indexes so it works.

The maps need to be sorted by an internal map id. Although we did this, it would mean that
all map index references in the index would be wrong.  So now renumber every mapindex before
writing out.

git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/sort2@3130 25d90789-57f7-4ee0-8453-03a3dfeeeb22
Remove debugging code

git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/sort2@3131 25d90789-57f7-4ee0-8453-03a3dfeeeb22
More map index fixes, this time for the gmapsupp case.

git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/sort2@3158 25d90789-57f7-4ee0-8453-03a3dfeeeb22
Size of 25 ptr field is determined by size of section 5.

Sect 25 is cities sorted in order of country. If every city has a country
then the sizes of 5 and 25 will be the same.  If we have cities without a country
then sect 25 can be smaller.

It appears that the mdr25 pointer in mdr29 is sized based on the total number of cities
and not the number of cities that have a country assigned.  Of course with perfect
data these would be the same, but we don't always have that.


git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/sort2@3163 25d90789-57f7-4ee0-8453-03a3dfeeeb22
Merge from the sort2 branch. Index fixes.

There are two main fixes here.
1. A problem with the size of section 29 of the index
when the number of cities is near a critical number.
Probably only affects the gmapsupp file.

2. When the files are not given in the correct
sorted order on the command line. There was
some code to deal with this, but not enough...


git-svn-id: http://svn.mkgmap.org.uk/mkgmap/trunk@3211 25d90789-57f7-4ee0-8453-03a3dfeeeb22