[Xastir-Dev] I split maps.c into map-specific pieces

Alan Crosswell alan at columbia.edu
Sat Jun 21 16:55:33 EDT 2003


Xastir-1.2.0 hacks 6/18-6/21/03:

I've split the 14K line maps.c into several source files, one per map 
type.  This division is rudimentary at this point since a bunch of 
cleanup is still required to get the appropriate data hiding and 
eliminate unneccessary globals.  I've made many internal-use functions 
"static" and added extern definitions in maps.h for those functions in 
maps.c that are shared among the map drivers.

To add a new map type, simply add a row to the map_driver[] table.

I couldn't figure out why GNIS labels were not working.  This took me an 
hour to find in maps.c:
             // I included GNIS here at this time because the files are
             // very large (at least for a state-wide file), and they
             // take a long time to load.  They're obviously not a raster
             // format file.

I removed it.  This can be set in map preferences now to decide whether 
or not a GNIS file should be displayed in auto maps.  I had no idea to 
even try turning on raster auto maps to get GNIS to work as it is not 
intuitive at all!  Bill, N2RKL mentioned yesterday that he had trouble 
getting GNIS to work.  I'll bet this is why.

I have not tested extensively since I didn't have all map types 
available on the train:-)  I did test with shape, DOS, and GNIS.  I seem 
to be able to make it segfault with Tiger maps.  I'll send a separate 
post about that.

I'll grab the latest maps.c from CVS and reintegrate any changes since 
1.2.0 and post shortly.

The patch is here.  Touches maps.c, maps.h, Makefile.am, and creates 
several new files.

http://www.columbia.edu/~alan/xastir/SOURCES/xastir-maps.patch

Various RPMS, SRPMS, etc. are in the same directory w/version 1.2.0-3.

/a



More information about the Xastir-dev mailing list