|
From: Danny B. <dan...@us...> - 2008-08-03 06:31:16
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv3236 Modified Files: buildmap_square.c Log Message: Add a test to avoid core dump with small files, call buildmap_fatal instead. Index: buildmap_square.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_square.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** buildmap_square.c 27 Nov 2007 13:44:06 -0000 1.10 --- buildmap_square.c 3 Aug 2008 06:31:12 -0000 1.11 *************** *** 1,4 **** ! /* buildmap_square.c - Divide the area in more manageable squares. ! * * LICENSE: * --- 1,3 ---- ! /* * LICENSE: * *************** *** 20,23 **** --- 19,33 ---- * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + /** + * @file + * @brief Divide the area in more manageable squares. + * + * These functions are used to build a table of lines from + * the Tiger maps. The objective is double: (1) reduce the size of + * the Tiger data by sharing all duplicated information and + * (2) produce the index data to serve as the basis for a fast + * search mechanism for streets in roadmap. * * SYNOPSYS: *************** *** 34,42 **** * (int square, int *longitude, int *latitude); * - * These functions are used to build a table of lines from - * the Tiger maps. The objective is double: (1) reduce the size of - * the Tiger data by sharing all duplicated information and - * (2) produce the index data to serve as the basis for a fast - * search mechanism for streets in roadmap. */ --- 44,47 ---- *************** *** 165,169 **** } ! void buildmap_square_initialize(void) { --- 170,176 ---- } ! /** ! * @brief ! */ void buildmap_square_initialize(void) { *************** *** 199,202 **** --- 206,212 ---- } + if (count_longitude == 0 || count_latitude) + buildmap_fatal (0, "buildmap_square: not enough data"); + size_longitude = (maxlongitude - minlongitude) / count_longitude; size_latitude = (maxlatitude - minlatitude) / count_latitude; |