You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(92) |
Dec
(141) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(126) |
Feb
(72) |
Mar
(31) |
Apr
(200) |
May
(81) |
Jun
(130) |
Jul
(112) |
Aug
(134) |
Sep
(76) |
Oct
(89) |
Nov
(153) |
Dec
(9) |
2007 |
Jan
(59) |
Feb
(82) |
Mar
(50) |
Apr
(20) |
May
(9) |
Jun
(81) |
Jul
(41) |
Aug
(109) |
Sep
(91) |
Oct
(87) |
Nov
(33) |
Dec
(60) |
2008 |
Jan
(21) |
Feb
(15) |
Mar
(38) |
Apr
(75) |
May
(59) |
Jun
(46) |
Jul
(30) |
Aug
(20) |
Sep
(35) |
Oct
(32) |
Nov
(34) |
Dec
(19) |
2009 |
Jan
(29) |
Feb
(71) |
Mar
(54) |
Apr
(17) |
May
(4) |
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(58) |
Sep
(7) |
Oct
(7) |
Nov
(12) |
Dec
(18) |
2011 |
Jan
(17) |
Feb
(29) |
Mar
(11) |
Apr
(5) |
May
(1) |
Jun
|
Jul
|
Aug
(11) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(87) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(44) |
Jun
(79) |
Jul
(16) |
Aug
(31) |
Sep
|
Oct
(51) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Pascal F M. <pas...@us...> - 2006-02-10 09:00:00
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21737 Modified Files: roadmap_dbread.c Log Message: 64 bit compatibility: switch to 64bit alignment Index: roadmap_dbread.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_dbread.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** roadmap_dbread.c 17 Jan 2006 06:40:22 -0000 1.12 --- roadmap_dbread.c 10 Feb 2006 08:59:52 -0000 1.13 *************** *** 135,139 **** } ! child_offset = (child_offset + 3) & (~3); child = (roadmap_db *) malloc (sizeof(roadmap_db)); --- 135,139 ---- } ! child_offset = (child_offset + 7) & (~7); child = (roadmap_db *) malloc (sizeof(roadmap_db)); *************** *** 154,158 **** if (child->head->next > 0) { ! int aligned = (child->head->next + 3) & (~3); child->next = (roadmap_db *) (database->base + aligned); } else { --- 154,158 ---- if (child->head->next > 0) { ! int aligned = (child->head->next + 7) & (~7); child->next = (roadmap_db *) (database->base + aligned); } else { |
From: Pascal F M. <pas...@us...> - 2006-02-10 08:59:40
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21678 Modified Files: buildmap.h Log Message: 64 bit compatibility: switch to 64bit alignment Index: buildmap.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** buildmap.h 16 Jan 2006 20:20:29 -0000 1.4 --- buildmap.h 10 Feb 2006 08:59:32 -0000 1.5 *************** *** 89,93 **** buildmap_db *buildmap_db_add_section (buildmap_db *parent, const char *name); int buildmap_db_add_data (buildmap_db *section, int count, int size); ! char *buildmap_db_get_data (buildmap_db *section); buildmap_db *buildmap_db_add_child (buildmap_db *parent, --- 89,93 ---- buildmap_db *buildmap_db_add_section (buildmap_db *parent, const char *name); int buildmap_db_add_data (buildmap_db *section, int count, int size); ! void *buildmap_db_get_data (buildmap_db *section); buildmap_db *buildmap_db_add_child (buildmap_db *parent, |
From: Pascal F M. <pas...@us...> - 2006-02-10 08:59:15
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21592 Modified Files: buildmap_dbwrite.c Log Message: 64 bit compatibility: switch to 64bit alignment Index: buildmap_dbwrite.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_dbwrite.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** buildmap_dbwrite.c 16 Jan 2006 20:20:59 -0000 1.5 --- buildmap_dbwrite.c 10 Feb 2006 08:59:07 -0000 1.6 *************** *** 29,33 **** * buildmap_db *buildmap_db_add_section (buildmap_db *parent, char *name); * int buildmap_db_add_data (buildmap_db *section, int count, int size); ! * char *buildmap_db_get_data (buildmap_db *section); * * void buildmap_db_close (void); --- 29,33 ---- * buildmap_db *buildmap_db_add_section (buildmap_db *parent, char *name); * int buildmap_db_add_data (buildmap_db *section, int count, int size); ! * void *buildmap_db_get_data (buildmap_db *section); * * void buildmap_db_close (void); *************** *** 206,210 **** offset = parent->data + parent->head->size; ! aligned = (offset + 3) & (~3); if (buildmap_db_extend (aligned + sizeof(struct roadmap_db_section)) < 0) { --- 206,210 ---- offset = parent->data + parent->head->size; ! aligned = (offset + 7) & (~7); if (buildmap_db_extend (aligned + sizeof(struct roadmap_db_section)) < 0) { *************** *** 236,240 **** parent->last = new; ! buildmap_db_propagate (parent, sizeof(struct roadmap_db_section)); BuildmapCurrentDbSection = new; --- 236,241 ---- parent->last = new; ! buildmap_db_propagate ! (parent, (aligned - offset) + sizeof(struct roadmap_db_section)); BuildmapCurrentDbSection = new; *************** *** 261,265 **** total_size = size; } ! aligned_size = (total_size + 3) & (~3); section->head->size += total_size; --- 262,266 ---- total_size = size; } ! aligned_size = (total_size + 7) & (~7); section->head->size += total_size; *************** *** 277,281 **** ! char *buildmap_db_get_data (buildmap_db *section) { return BuildmapCurrentDbBase + section->data; --- 278,282 ---- ! void *buildmap_db_get_data (buildmap_db *section) { return BuildmapCurrentDbBase + section->data; |
From: Pascal F M. <pas...@us...> - 2006-02-06 06:46:19
|
Update of /cvsroot/roadmap/roadmap/src/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21735 Modified Files: All Log Message: Remove hard-coded layers Index: All =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/default/All,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** All 2 Dec 2005 20:47:52 -0000 1.1 --- All 6 Feb 2006 06:46:11 -0000 1.2 *************** *** 2,5 **** --- 2,6 ---- Class.Lines: Freeways Ramps Highways Streets Trails Rivers Shore Class.Polygons: Lakes Sea Parks Hospitals Airports Stations Malls + Navigation.Car: Freeways Ramps Highways Streets Trails Freeways.Color: black Freeways.Color1: IndianRed |
From: Pascal F M. <pas...@us...> - 2006-02-06 06:41:22
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20029 Modified Files: roadmap_street.h Log Message: Use unsigned for street numbers (large enough for the USA) Index: roadmap_street.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_street.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** roadmap_street.h 27 Nov 2005 06:08:56 -0000 1.9 --- roadmap_street.h 6 Feb 2006 06:41:13 -0000 1.10 *************** *** 39,44 **** typedef struct { ! int min; ! int max; } RoadMapStreetRange; --- 39,44 ---- typedef struct { ! unsigned int min; ! unsigned int max; } RoadMapStreetRange; *************** *** 93,97 **** int roadmap_street_get_position (RoadMapBlocks *blocks, ! int number, RoadMapPosition *position); --- 93,97 ---- int roadmap_street_get_position (RoadMapBlocks *blocks, ! unsigned int number, RoadMapPosition *position); |
From: Pascal F M. <pas...@us...> - 2006-02-06 06:41:07
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19830 Modified Files: roadmap_street.c Log Message: Use unsigned for street numbers (large enough for the USA) Index: roadmap_street.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_street.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** roadmap_street.c 8 Dec 2005 16:24:02 -0000 1.20 --- roadmap_street.c 6 Feb 2006 06:40:52 -0000 1.21 *************** *** 393,399 **** if (space != NULL) { ! unsigned length; ! length = (unsigned)(space - name); if (length < sizeof(buffer)) { --- 393,399 ---- if (space != NULL) { ! unsigned int length; ! length = (unsigned int)(space - name); if (length < sizeof(buffer)) { *************** *** 430,434 **** if (street->type > 0) { ! length = (unsigned)(space - name); if (length < sizeof(buffer)) { --- 430,434 ---- if (street->type > 0) { ! length = (unsigned int)(space - name); if (length < sizeof(buffer)) { *************** *** 684,689 **** int end; ! int fradd; ! int toadd; int total = 0; --- 684,689 ---- int end; ! unsigned int fradd; ! unsigned int toadd; int total = 0; *************** *** 698,705 **** if (HAS_CONTINUATION(this_addr)) { ! fradd = ((int)(this_addr->fradd) & 0xffff) ! + (((int)(this_addr[1].fradd) & 0xffff) << 16); ! toadd = ((int)(this_addr->toadd) & 0xffff) ! + (((int)(this_addr[1].toadd) & 0xffff) << 16); ++i; /* Because this range occupies two entries. */ --- 698,705 ---- if (HAS_CONTINUATION(this_addr)) { ! fradd = ((unsigned int)(this_addr->fradd) & 0xffff) ! + (((unsigned int)(this_addr[1].fradd) & 0xffff) << 16); ! toadd = ((unsigned int)(this_addr->toadd) & 0xffff) ! + (((unsigned int)(this_addr[1].toadd) & 0xffff) << 16); ++i; /* Because this range occupies two entries. */ *************** *** 729,742 **** int roadmap_street_get_position (RoadMapBlocks *blocks, ! int number, RoadMapPosition *position) { int i; int end; ! int number_max; ! int number_min; ! int fradd; ! int toadd; RoadMapPosition from; --- 729,742 ---- int roadmap_street_get_position (RoadMapBlocks *blocks, ! unsigned int number, RoadMapPosition *position) { int i; int end; ! unsigned int number_max; ! unsigned int number_min; ! unsigned int fradd; ! unsigned int toadd; RoadMapPosition from; *************** *** 755,762 **** if (HAS_CONTINUATION(this_addr)) { ! fradd = ((int)(this_addr->fradd) & 0xffff) ! + (((int)(this_addr[1].fradd) & 0xffff) << 16); ! toadd = ((int)(this_addr->toadd) & 0xffff) ! + (((int)(this_addr[1].toadd) & 0xffff) << 16); ++i; --- 755,762 ---- if (HAS_CONTINUATION(this_addr)) { ! fradd = ((unsigned int)(this_addr->fradd) & 0xffff) ! + (((unsigned int)(this_addr[1].fradd) & 0xffff) << 16); ! toadd = ((unsigned int)(this_addr->toadd) & 0xffff) ! + (((unsigned int)(this_addr[1].toadd) & 0xffff) << 16); ++i; *************** *** 790,802 **** } else { position->longitude = from.longitude - ! ((from.longitude - to.longitude) ! * abs(fradd - number)) / (number_max - number_min); position->latitude = from.latitude - ! ((from.latitude - to.latitude) ! * abs(fradd - number)) / (number_max - number_min); } --- 790,810 ---- } else { + int delta; + + if (fradd > number) { + delta = fradd - number; + } else { + delta = number - fradd; + } + position->longitude = from.longitude - ! ((from.longitude - to.longitude) * delta) ! / (int)(number_max - number_min); position->latitude = from.latitude - ! ((from.latitude - to.latitude) * delta) ! / (int)(number_max - number_min); } |
From: Pascal F M. <pas...@us...> - 2006-02-06 06:40:19
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19725 Modified Files: roadmap_navigate.c Log Message: Fix regression bug from a previous merge Index: roadmap_navigate.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_navigate.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** roadmap_navigate.c 6 Feb 2006 01:44:43 -0000 1.22 --- roadmap_navigate.c 6 Feb 2006 06:40:12 -0000 1.23 *************** *** 445,483 **** } } - } ! if (roadmap_line_in_square2 ! (square, layer, &first_line, &last_line) > 0) { ! int xline; ! for (xline = first_line; xline <= last_line; ++xline) { ! int line = roadmap_line_get_from_index2 (xline); ! PluginLine p_line = ! PLUGIN_MAKE_LINE (ROADMAP_PLUGIN_ID, line, layer, fips); ! if (roadmap_plugin_override_line (line, layer, fips)) { ! continue; ! } ! match = roadmap_navigate_is_intersection ! (&p_line, position->steering, &crossing); ! if (best_match < match) { ! PluginStreet street; ! roadmap_street_get_properties (line, &properties); ! roadmap_plugin_set_street ! (&street, ROADMAP_PLUGIN_ID, properties.street); ! if ((properties.street > 0) && ! (! roadmap_plugin_same_street (&street, &RoadMapConfirmedStreet.street))) { ! *found = p_line; ! best_match = match; } } --- 445,483 ---- } } ! if (roadmap_line_in_square2 ! (square, layer, &first_line, &last_line) > 0) { ! int xline; ! for (xline = first_line; xline <= last_line; ++xline) { ! int line = roadmap_line_get_from_index2 (xline); ! PluginLine p_line = ! PLUGIN_MAKE_LINE (ROADMAP_PLUGIN_ID, line, layer, fips); ! if (roadmap_plugin_override_line (line, layer, fips)) { ! continue; ! } ! match = roadmap_navigate_is_intersection ! (&p_line, position->steering, &crossing); ! if (best_match < match) { ! PluginStreet street; ! roadmap_street_get_properties (line, &properties); ! roadmap_plugin_set_street ! (&street, ROADMAP_PLUGIN_ID, properties.street); ! if ((properties.street > 0) && ! (! roadmap_plugin_same_street (&street, &RoadMapConfirmedStreet.street))) { ! *found = p_line; ! best_match = match; ! } } } |
From: Pascal F M. <pas...@us...> - 2006-02-06 06:39:20
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19271 Modified Files: roadmap_math.h Log Message: Use unsigned for street numbers (large enough for the USA) Index: roadmap_math.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_math.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** roadmap_math.h 7 Dec 2005 13:21:52 -0000 1.23 --- roadmap_math.h 6 Feb 2006 06:39:13 -0000 1.24 *************** *** 111,115 **** void roadmap_math_screen_edges (RoadMapArea *area); ! int roadmap_math_street_address (const char *image, int length); int roadmap_math_compare_points (const RoadMapPosition *p1, --- 111,115 ---- void roadmap_math_screen_edges (RoadMapArea *area); ! unsigned int roadmap_math_street_address (const char *image, int length); int roadmap_math_compare_points (const RoadMapPosition *p1, |
From: Pascal F M. <pas...@us...> - 2006-02-06 06:39:02
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19065 Modified Files: roadmap_math.c Log Message: Use unsigned for street numbers (large enough for the USA) Index: roadmap_math.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_math.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** roadmap_math.c 7 Dec 2005 00:54:59 -0000 1.28 --- roadmap_math.c 6 Feb 2006 06:38:53 -0000 1.29 *************** *** 1244,1252 **** ! int roadmap_math_street_address (const char *image, int length) { int i; int digit; ! int result = 0; if ((length > 8) && --- 1244,1252 ---- ! unsigned int roadmap_math_street_address (const char *image, int length) { int i; int digit; ! unsigned int result = 0; if ((length > 8) && *************** *** 1259,1265 **** */ int separator = 0; ! int part1 = 0; ! int part2 = 0; ! int multiplier = 10; --- 1259,1265 ---- */ int separator = 0; ! unsigned int multiplier = 10; ! unsigned int part1 = 0; ! unsigned int part2 = 0; *************** *** 1276,1282 **** if (image[i] < '0' || image[i] > '9') { roadmap_log ! (ROADMAP_ERROR, "bad numerical character %c", image[i]); } ! part1 = (part1 * 10) + (image[i] - '0'); } --- 1276,1282 ---- if (image[i] < '0' || image[i] > '9') { roadmap_log ! (ROADMAP_WARNING, "bad numerical character %c", image[i]); } ! part1 = (part1 * 10) + (unsigned int)(image[i] - '0'); } *************** *** 1284,1290 **** if (image[i] < '0' || image[i] > '9') { roadmap_log ! (ROADMAP_ERROR, "bad numerical character %c", image[i]); } ! part2 = (part2 * 10) + (image[i] - '0'); multiplier *= 10; } --- 1284,1290 ---- if (image[i] < '0' || image[i] > '9') { roadmap_log ! (ROADMAP_WARNING, "bad numerical character %c", image[i]); } ! part2 = (part2 * 10) + (unsigned int)(image[i] - '0'); multiplier *= 10; } *************** *** 1308,1316 **** digit = '1' + digit - 'a'; } else { ! roadmap_log (ROADMAP_ERROR, "bad numerical character %c", digit); continue; } } ! result = (result * 10) + (digit - '0'); } --- 1308,1316 ---- digit = '1' + digit - 'a'; } else { ! roadmap_log (ROADMAP_WARNING, "bad numerical character %c", digit); continue; } } ! result = (result * 10) + (unsigned int)(digit - '0'); } |
From: Pascal F M. <pas...@us...> - 2006-02-06 06:38:36
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18962 Modified Files: roadmap_geocode.c Log Message: Use unsigned for street numbers (large enough for the USA) Index: roadmap_geocode.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_geocode.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** roadmap_geocode.c 13 Nov 2005 07:20:49 -0000 1.4 --- roadmap_geocode.c 6 Feb 2006 06:38:25 -0000 1.5 *************** *** 57,61 **** int count; ! int street_number [ROADMAP_MAX_STREETS]; RoadMapBlocks blocks[ROADMAP_MAX_STREETS]; --- 57,61 ---- int count; ! unsigned int street_number [ROADMAP_MAX_STREETS]; RoadMapBlocks blocks[ROADMAP_MAX_STREETS]; *************** *** 119,130 **** if (number_image[0] == 0) { int range_count; RoadMapStreetRange ranges[ROADMAP_MAX_STREETS]; - for (i = 0, j = 0; i < count; ++i) { - street_number[i] = -1; - } ! for (i = 0, j = 0; i < count && street_number[i] < 0; ++i) { range_count = --- 119,128 ---- if (number_image[0] == 0) { + int cursor; int range_count; RoadMapStreetRange ranges[ROADMAP_MAX_STREETS]; ! for (i = 0, cursor = count; i < count; ++i) { range_count = *************** *** 137,160 **** for (k = 1; k < range_count; ++k) { ! if (count >= ROADMAP_MAX_STREETS) { roadmap_log (ROADMAP_WARNING, "too many blocks, cannot expand"); break; } ! blocks[count] = blocks[i]; ! ranges[count] = ranges[k]; ! street_number[count] = ranges[count].min; ! count += 1; } } } } else { ! int number; number = roadmap_math_street_address (number_image, strlen(number_image)); ! for (i = 0, j = 0; i < count; ++i) { street_number[i] = number; } --- 135,158 ---- for (k = 1; k < range_count; ++k) { ! if (cursor >= ROADMAP_MAX_STREETS) { roadmap_log (ROADMAP_WARNING, "too many blocks, cannot expand"); break; } ! blocks[cursor] = blocks[i]; ! street_number[cursor] = ranges[k].min; ! cursor += 1; } } } + count = cursor; } else { ! unsigned int number; number = roadmap_math_street_address (number_image, strlen(number_image)); ! for (i = 0; i < count; ++i) { street_number[i] = number; } *************** *** 166,170 **** fips = roadmap_locator_active(); ! for (i = 0, j = 0; i< count; ++i) { int line; --- 164,168 ---- fips = roadmap_locator_active(); ! for (i = 0, j = 0; i < count; ++i) { int line; |
From: Pascal F M. <pas...@us...> - 2006-02-06 06:34:40
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17517 Modified Files: buildmap_tiger.c Log Message: Use unsigned for street numbers (large enough for the USA) Index: buildmap_tiger.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_tiger.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** buildmap_tiger.c 5 Feb 2006 23:17:51 -0000 1.8 --- buildmap_tiger.c 6 Feb 2006 06:34:31 -0000 1.9 *************** *** 190,194 **** } ! static int tiger2address (char *line, int start, int end) { tigerAdjust (line, &start, &end); --- 190,194 ---- } ! static unsigned int tiger2address (char *line, int start, int end) { tigerAdjust (line, &start, &end); *************** *** 395,402 **** RoadMapString city; RoadMapString place; ! int fraddl; ! int toaddl; ! int fraddr; ! int toaddr; int zipl; int zipr; --- 395,402 ---- RoadMapString city; RoadMapString place; ! unsigned int fraddl; ! unsigned int toaddl; ! unsigned int fraddr; ! unsigned int toaddr; int zipl; int zipr; *************** *** 512,517 **** if (placel == placer) { ! int fradd; ! int toadd; buildmap_range_merge (fraddl, toaddl, --- 512,517 ---- if (placel == placer) { ! unsigned int fradd; ! unsigned int toadd; buildmap_range_merge (fraddl, toaddl, |
From: Pascal F M. <pas...@us...> - 2006-02-06 06:34:15
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17424 Modified Files: buildmap_shapefile.c Log Message: Use unsigned for street numbers (large enough for the USA) Index: buildmap_shapefile.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_shapefile.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** buildmap_shapefile.c 5 Feb 2006 23:16:52 -0000 1.5 --- buildmap_shapefile.c 6 Feb 2006 06:34:06 -0000 1.6 *************** *** 240,245 **** int line, int street, ! int fradd, ! int toadd) { RoadMapString city; --- 240,245 ---- int line, int street, ! unsigned int fradd, ! unsigned int toadd) { RoadMapString city; *************** *** 306,313 **** RoadMapString fetype; RoadMapString fedirs; ! int fraddl; ! int toaddl; ! int fraddr; ! int toaddr; int zipl; int zipr; --- 306,313 ---- RoadMapString fetype; RoadMapString fedirs; ! unsigned int fraddl; ! unsigned int toaddl; ! unsigned int fraddr; ! unsigned int toaddr; int zipl; int zipr; *************** *** 391,399 **** DBFReadStringAttribute(hDBF, irec, iFEDIRS)); ! fraddl = DBFReadIntegerAttribute(hDBF, irec, iFRADDL); ! toaddl = DBFReadIntegerAttribute(hDBF, irec, iTOADDL); ! fraddr = DBFReadIntegerAttribute(hDBF, irec, iFRADDR); ! toaddr = DBFReadIntegerAttribute(hDBF, irec, iTOADDR); zipl = str2dict (DictionaryFSA, --- 391,399 ---- DBFReadStringAttribute(hDBF, irec, iFEDIRS)); ! fraddl = (unsigned int) DBFReadIntegerAttribute(hDBF, irec, iFRADDL); ! toaddl = (unsigned int) DBFReadIntegerAttribute(hDBF, irec, iTOADDL); ! fraddr = (unsigned int) DBFReadIntegerAttribute(hDBF, irec, iFRADDR); ! toaddr = (unsigned int) DBFReadIntegerAttribute(hDBF, irec, iTOADDR); zipl = str2dict (DictionaryFSA, *************** *** 438,443 **** (diff_to > -10) && (diff_to < 10)) { ! int fradd; ! int toadd; buildmap_range_merge (fraddl, toaddl, --- 438,443 ---- (diff_to > -10) && (diff_to < 10)) { ! unsigned int fradd; ! unsigned int toadd; buildmap_range_merge (fraddl, toaddl, |
From: Pascal F M. <pas...@us...> - 2006-02-06 06:33:50
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17106 Modified Files: buildmap_range.h Log Message: Use unsigned for street numbers (large enough for the USA) Index: buildmap_range.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_range.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** buildmap_range.h 16 Jan 2006 20:36:43 -0000 1.3 --- buildmap_range.h 6 Feb 2006 06:33:41 -0000 1.4 *************** *** 27,37 **** #include "roadmap_types.h" ! void buildmap_range_merge (int frleft, int toleft, ! int frright, int toright, ! int *from, int *to); int buildmap_range_add (int line, int street, ! int fradd, int toadd, RoadMapZip zip, RoadMapString city); void buildmap_range_add_no_address (int line, int street); void buildmap_range_add_place (RoadMapString place, RoadMapString city); --- 27,38 ---- #include "roadmap_types.h" ! void buildmap_range_merge (unsigned int frleft, unsigned int toleft, ! unsigned int frright, unsigned int toright, ! unsigned int *from, unsigned int *to); int buildmap_range_add (int line, int street, ! unsigned int fradd, unsigned int toadd, ! RoadMapZip zip, RoadMapString city); void buildmap_range_add_no_address (int line, int street); void buildmap_range_add_place (RoadMapString place, RoadMapString city); |
From: Pascal F M. <pas...@us...> - 2006-02-06 06:33:32
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16869 Modified Files: buildmap_range.c Log Message: Use unsigned for street numbers (large enough for the USA) Index: buildmap_range.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_range.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** buildmap_range.c 16 Jan 2006 20:49:34 -0000 1.9 --- buildmap_range.c 6 Feb 2006 06:33:24 -0000 1.10 *************** *** 59,64 **** int line; ! int fradd; ! int toadd; } BuildMapRange; --- 59,64 ---- int line; ! unsigned int fradd; ! unsigned int toadd; } BuildMapRange; *************** *** 130,139 **** ! void buildmap_range_merge (int frleft, int toleft, ! int frright, int toright, ! int *from, int *to) { ! int fradd = frright; ! int toadd = toright; if (fradd < toadd) { --- 130,139 ---- ! void buildmap_range_merge (unsigned int frleft, unsigned int toleft, ! unsigned int frright, unsigned int toright, ! unsigned int *from, unsigned int *to) { ! unsigned int fradd = frright; ! unsigned int toadd = toright; if (fradd < toadd) { *************** *** 174,178 **** int buildmap_range_add (int line, int street, ! int fradd, int toadd, RoadMapZip zip, RoadMapString city) { int index; --- 174,179 ---- int buildmap_range_add (int line, int street, ! unsigned int fradd, unsigned int toadd, ! RoadMapZip zip, RoadMapString city) { int index; *************** *** 189,195 **** buildmap_fatal (0, "negative street index"); } - if (fradd < 0 || toadd < 0) { - buildmap_fatal (0, "negative street address"); - } RangeAddCount += 1; --- 190,193 ---- |
From: Pascal F M. <pas...@us...> - 2006-02-06 03:49:17
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21729 Modified Files: rdmcompare Log Message: Avoid spurious messages Index: rdmcompare =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/rdmcompare,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** rdmcompare 21 Feb 2003 20:07:52 -0000 1.1.1.1 --- rdmcompare 6 Feb 2006 03:49:06 -0000 1.2 *************** *** 30,34 **** if [ ! -e $MAPSDIR/usc$fips.rdm ] ; then ! echo "## usc$fips.rdm was not generated" echo "## usc$fips.rdm was not generated" >> $STARTDIR/buildmap_errors.log fi --- 30,34 ---- if [ ! -e $MAPSDIR/usc$fips.rdm ] ; then ! echo "usc$fips.rdm was not generated" echo "## usc$fips.rdm was not generated" >> $STARTDIR/buildmap_errors.log fi *************** *** 40,49 **** for i in tgr*.zip do ! check_one_county $i done for i in TGR*.ZIP do ! check_one_county $i done --- 40,53 ---- for i in tgr*.zip do ! if [ -e $i ] ; then ! check_one_county $i ! fi done for i in TGR*.ZIP do ! if [ -e $i ] ; then ! check_one_county $i ! fi done |
From: Pascal F M. <pas...@us...> - 2006-02-06 03:28:37
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14388 Modified Files: rdmgenmaps Log Message: Cleanup Index: rdmgenmaps =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/rdmgenmaps,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** rdmgenmaps 13 Nov 2005 07:24:17 -0000 1.8 --- rdmgenmaps 6 Feb 2006 03:28:29 -0000 1.9 *************** *** 10,14 **** # # rdmgenmaps <tiger-path> [maps=<map-directory-path>] ! # [format=2000|2002|2004] # [state=<state-id>] # [verbose|test] --- 10,14 ---- # # rdmgenmaps <tiger-path> [maps=<map-directory-path>] ! # [format=2000|2002|2004|2005] # [state=<state-id>] # [verbose|test] *************** *** 17,29 **** # # rdmgenmaps <tiger-path> [maps=<map-directory-path>] ! # [format=2000|2002|2004] # [verbose|test] # county-fips ... # ! # Example: rdmgenmaps /var/tmp/maps state=06 # # # Default setup: preferred map path is used, latest format, all states. OPTIONS="" TMPDIR=/var/tmp --- 17,31 ---- # # rdmgenmaps <tiger-path> [maps=<map-directory-path>] ! # [format=2000|2002|2004|2005] # [verbose|test] # county-fips ... # ! # Example: rdmgenmaps /var/lib/roadmap state=06 # # # Default setup: preferred map path is used, latest format, all states. + FORMAT="--format=2002" + MAPPATH="" OPTIONS="" TMPDIR=/var/tmp *************** *** 41,46 **** case $1 in ! maps=*) BUILDMAPOPTIONS="--maps=`expr $1 : 'maps=\(.*\)'`" ! BUILDUSOPTIONS=$BUILDMAPOPTIONS shift ;; --- 43,47 ---- case $1 in ! maps=*) MAPPATH="--maps=`expr $1 : 'maps=\(.*\)'`" shift ;; *************** *** 48,58 **** case $1 in ! format=2000) BUILDMAPOPTIONS="--format=2000 $OPTIONS" shift ;; ! format=2002) BUILDMAPOPTIONS="--format=2002 $OPTIONS" shift ;; ! format=2004) BUILDMAPOPTIONS="--format=2002 $OPTIONS" shift ;; --- 49,62 ---- case $1 in ! format=2000) FORMAT="--format=2000" shift ;; ! format=2002) FORMAT="--format=2002" shift ;; ! format=2004) FORMAT="--format=2002" ! shift ! ;; ! format=2005) FORMAT="--format=2002" shift ;; *************** *** 96,102 **** if [ -e $rt1 ] ; then if [ $verbose = 'Y' ] ; then ! echo "$BUILDMAP $BUILDMAPOPTIONS $1 $rt1" fi ! $BUILDMAP $BUILDMAPOPTIONS $1 $rt1 fi if [ $cleanup = 'Y' ] ; then --- 100,106 ---- if [ -e $rt1 ] ; then if [ $verbose = 'Y' ] ; then ! echo "$BUILDMAP $OPTIONS $FORMAT $MAPPATH $1 $rt1" fi ! $BUILDMAP $OPTIONS $FORMAT $MAPPATH $1 $rt1 fi if [ $cleanup = 'Y' ] ; then *************** *** 139,145 **** if [ -e buildus ] ; then ! ./buildus -s $BUILDUSOPTIONS else ! buildus -s $BUILDUSOPTIONS fi fi --- 143,149 ---- if [ -e buildus ] ; then ! ./buildus -s $MAPPATH else ! buildus -s $MAPPATH fi fi |
From: Pascal F M. <pas...@us...> - 2006-02-06 03:28:06
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14130 Modified Files: Makefile Log Message: Fix the install code Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/Makefile,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** Makefile 5 Feb 2006 23:18:27 -0000 1.75 --- Makefile 6 Feb 2006 03:27:58 -0000 1.76 *************** *** 372,381 **** for icon in roadmap*.png ; \ do \ ! convert $icon $(icon:.png=.xpm) \ ! cp -f $(icon:.png=.xpm) $(DESTDIR)$(ICONDIR)/. \ done installdoc: ! copy ../web/manual.html $(DESTDIR)$(pkgdatadir)/manual.html webdoc: --- 372,382 ---- for icon in roadmap*.png ; \ do \ ! icon2=`basename $$icon .png` ; \ ! convert $$icon $${icon2}.xpm ; \ ! cp -f $${icon2}.xpm $(DESTDIR)$(ICONDIR)/. ; \ done installdoc: ! cp ../web/manual.html $(DESTDIR)$(pkgdatadir)/manual.html webdoc: |
From: Pascal F M. <pas...@us...> - 2006-02-06 01:46:51
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10539 Modified Files: rdmxchange_line.c Log Message: Remove hard-coded layers Index: rdmxchange_line.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/rdmxchange_line.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** rdmxchange_line.c 4 Feb 2006 09:15:50 -0000 1.3 --- rdmxchange_line.c 6 Feb 2006 01:46:41 -0000 1.4 *************** *** 46,52 **** --- 46,58 ---- int LineBySquare1Count; + int *LineByLayer1; + int LineByLayer1Count; + int *LineIndex2; int LineIndex2Count; + int *LineByLayer2; + int LineByLayer2Count; + RoadMapLineBySquare *LineBySquare2; int LineBySquare2Count; *************** *** 67,70 **** --- 73,78 ---- roadmap_db *square1_table; roadmap_db *square2_table; + roadmap_db *layer1_table; + roadmap_db *layer2_table; *************** *** 79,82 **** --- 87,92 ---- square1_table = roadmap_db_get_subsection (root, "bysquare1"); square2_table = roadmap_db_get_subsection (root, "bysquare2"); + layer1_table = roadmap_db_get_subsection (root, "bylayer1"); + layer2_table = roadmap_db_get_subsection (root, "bylayer2"); index2_table = roadmap_db_get_subsection (root, "index2"); *************** *** 100,103 **** --- 110,122 ---- } + context->LineByLayer1 = (int *) roadmap_db_get_data (layer1_table); + context->LineByLayer1Count = roadmap_db_get_count (layer1_table); + + if (roadmap_db_get_size (layer1_table) != + context->LineByLayer1Count * sizeof(int)) { + roadmap_log (ROADMAP_ERROR, "invalid line/bylayer1 structure"); + goto roadmap_line_map_abort; + } + context->LineIndex2 = (int *) roadmap_db_get_data (index2_table); context->LineIndex2Count = roadmap_db_get_count (index2_table); *************** *** 119,122 **** --- 138,150 ---- } + context->LineByLayer2 = (int *) roadmap_db_get_data (layer2_table); + context->LineByLayer2Count = roadmap_db_get_count (layer2_table); + + if (roadmap_db_get_size (layer2_table) != + context->LineByLayer2Count * sizeof(int)) { + roadmap_log (ROADMAP_ERROR, "invalid line/bylayer2 structure"); + goto roadmap_line_map_abort; + } + rdmxchange_line_register_export(); *************** *** 166,174 **** RoadMapLineActive->LineBySquare1Count); ! fprintf (file, "line/index2,%d\n", ! RoadMapLineActive->LineIndex2Count); fprintf (file, "line/bysquare2,%d\n", RoadMapLineActive->LineBySquare2Count); } --- 194,208 ---- RoadMapLineActive->LineBySquare1Count); ! fprintf (file, "line/bylayer1,%d\n", ! RoadMapLineActive->LineByLayer1Count); fprintf (file, "line/bysquare2,%d\n", RoadMapLineActive->LineBySquare2Count); + + fprintf (file, "line/bylayer2,%d\n", + RoadMapLineActive->LineByLayer2Count); + + fprintf (file, "line/index2,%d\n", + RoadMapLineActive->LineIndex2Count); } *************** *** 177,182 **** int i; ! int j; ! int *index2; RoadMapLine *line; RoadMapLineBySquare *bysquare; --- 211,215 ---- int i; ! int *index; RoadMapLine *line; RoadMapLineBySquare *bysquare; *************** *** 194,215 **** fprintf (file, "line/bysquare1\n" ! "first[%d],last\n", ROADMAP_CATEGORY_RANGE); bysquare = RoadMapLineActive->LineBySquare1; for (i = 0; i < RoadMapLineActive->LineBySquare1Count; ++i, ++bysquare) { ! for (j = 0; j < ROADMAP_CATEGORY_RANGE; ++j) { ! fprintf (file, "%.0d,", bysquare->first[j]); ! } ! fprintf (file, "%.0d\n", bysquare->last); } fprintf (file, "\n"); ! fprintf (file, "line/index2\n" "index\n"); ! index2 = RoadMapLineActive->LineIndex2; ! for (i = 0; i < RoadMapLineActive->LineIndex2Count; ++i, ++index2) { ! fprintf (file, "%d\n", *index2); } fprintf (file, "\n"); --- 227,245 ---- fprintf (file, "line/bysquare1\n" ! "first,count\n"); bysquare = RoadMapLineActive->LineBySquare1; for (i = 0; i < RoadMapLineActive->LineBySquare1Count; ++i, ++bysquare) { ! fprintf (file, "%.0d,%.0d\n", bysquare->first, bysquare->count); } fprintf (file, "\n"); ! fprintf (file, "line/bylayer1\n" "index\n"); ! index = RoadMapLineActive->LineByLayer1; ! for (i = 0; i < RoadMapLineActive->LineByLayer1Count; ++i, ++index) { ! fprintf (file, "%d\n", *index); } fprintf (file, "\n"); *************** *** 217,228 **** fprintf (file, "line/bysquare2\n" ! "first[%d],last\n", ROADMAP_CATEGORY_RANGE); bysquare = RoadMapLineActive->LineBySquare2; for (i = 0; i < RoadMapLineActive->LineBySquare2Count; ++i, ++bysquare) { ! for (j = 0; j < ROADMAP_CATEGORY_RANGE; ++j) { ! fprintf (file, "%.0d,", bysquare->first[j]); ! } ! fprintf (file, "%.0d\n", bysquare->last); } fprintf (file, "\n"); --- 247,275 ---- fprintf (file, "line/bysquare2\n" ! "first,count\n"); bysquare = RoadMapLineActive->LineBySquare2; for (i = 0; i < RoadMapLineActive->LineBySquare2Count; ++i, ++bysquare) { ! fprintf (file, "%.0d,%.0d\n", bysquare->first, bysquare->count); ! } ! fprintf (file, "\n"); ! ! ! fprintf (file, "line/bylayer2\n" ! "index\n"); ! index = RoadMapLineActive->LineByLayer2; ! ! for (i = 0; i < RoadMapLineActive->LineByLayer2Count; ++i, ++index) { ! fprintf (file, "%d\n", *index); ! } ! fprintf (file, "\n"); ! ! ! fprintf (file, "line/index2\n" ! "index\n"); ! index = RoadMapLineActive->LineIndex2; ! ! for (i = 0; i < RoadMapLineActive->LineIndex2Count; ++i, ++index) { ! fprintf (file, "%d\n", *index); } fprintf (file, "\n"); *************** *** 245,252 **** --- 292,303 ---- static RoadMapLine *Line = NULL; static int *LineIndex2 = NULL; + static int *LineLayer1 = NULL; + static int *LineLayer2 = NULL; static RoadMapLineBySquare *LineSquare1 = NULL; static RoadMapLineBySquare *LineSquare2 = NULL; static int LineCount = 0; static int LineIndex2Count = 0; + static int LineLayer1Count = 0; + static int LineLayer2Count = 0; static int LineSquare1Count = 0; static int LineSquare2Count = 0; *************** *** 257,260 **** --- 308,313 ---- int i; + int *db_layer1; + int *db_layer2; int *db_index2; RoadMapLine *db_lines; *************** *** 265,270 **** buildmap_db *data_table; buildmap_db *square1_table; ! buildmap_db *index2_table; buildmap_db *square2_table; --- 318,325 ---- buildmap_db *data_table; buildmap_db *square1_table; ! buildmap_db *layer1_table; buildmap_db *square2_table; + buildmap_db *layer2_table; + buildmap_db *index2_table; *************** *** 283,289 **** LineSquare1Count, sizeof(RoadMapLineBySquare)); ! index2_table = buildmap_db_add_section (root, "index2"); ! if (index2_table == NULL) buildmap_fatal (0, "Can't add a new section"); ! buildmap_db_add_data (index2_table, LineIndex2Count, sizeof(int)); square2_table = buildmap_db_add_section (root, "bysquare2"); --- 338,344 ---- LineSquare1Count, sizeof(RoadMapLineBySquare)); ! layer1_table = buildmap_db_add_section (root, "bylayer1"); ! if (layer1_table == NULL) buildmap_fatal (0, "Can't add a new section"); ! buildmap_db_add_data (layer1_table, LineLayer1Count, sizeof(int)); square2_table = buildmap_db_add_section (root, "bysquare2"); *************** *** 292,298 **** --- 347,363 ---- LineSquare2Count, sizeof(RoadMapLineBySquare)); + layer2_table = buildmap_db_add_section (root, "bylayer2"); + if (layer2_table == NULL) buildmap_fatal (0, "Can't add a new section"); + buildmap_db_add_data (layer2_table, LineLayer2Count, sizeof(int)); + + index2_table = buildmap_db_add_section (root, "index2"); + if (index2_table == NULL) buildmap_fatal (0, "Can't add a new section"); + buildmap_db_add_data (index2_table, LineIndex2Count, sizeof(int)); + db_lines = (RoadMapLine *) buildmap_db_get_data (data_table); db_square1 = (RoadMapLineBySquare *) buildmap_db_get_data (square1_table); + db_layer1 = (int *) buildmap_db_get_data (layer1_table); db_index2 = (int *) buildmap_db_get_data (index2_table); + db_layer2 = (int *) buildmap_db_get_data (layer2_table); db_square2 = (RoadMapLineBySquare *) buildmap_db_get_data (square2_table); *************** *** 307,310 **** --- 372,379 ---- } + for (i = 0; i < LineLayer1Count; ++i) { + db_layer1[i] = LineLayer1[i]; + } + for (i = 0; i < LineIndex2Count; ++i) { db_index2[i] = LineIndex2[i]; *************** *** 315,318 **** --- 384,391 ---- } + for (i = 0; i < LineLayer2Count; ++i) { + db_layer2[i] = LineLayer2[i]; + } + /* Do not save this data ever again. */ free (Line); *************** *** 324,327 **** --- 397,404 ---- LineSquare1Count = 0; + free (LineLayer1); + LineLayer1 = NULL; + LineLayer1Count = 0; + free (LineIndex2); LineIndex2 = NULL; *************** *** 331,334 **** --- 408,415 ---- LineSquare2 = NULL; LineSquare2Count = 0; + + free (LineLayer2); + LineLayer2 = NULL; + LineLayer2Count = 0; } *************** *** 361,370 **** LineSquare1Count = count; ! } else if (strcmp (name, "line/index2") == 0) { ! if (LineIndex2 != NULL) free (LineIndex2); ! LineIndex2 = calloc (count, sizeof(int)); ! LineIndex2Count = count; } else if (strcmp (name, "line/bysquare2") == 0) { --- 442,451 ---- LineSquare1Count = count; ! } else if (strcmp (name, "line/bylayer1") == 0) { ! if (LineLayer1 != NULL) free (LineLayer1); ! LineLayer1 = calloc (count, sizeof(int)); ! LineLayer1Count = count; } else if (strcmp (name, "line/bysquare2") == 0) { *************** *** 375,401 **** LineSquare2Count = count; ! } else { ! buildmap_fatal (1, "invalid table name %s", name); ! } ! } ! static int rdmxchange_line_bad_square (char *fields[], int count) { ! char first_name[64]; ! snprintf (first_name, sizeof(first_name), ! "first[%d]", ROADMAP_CATEGORY_RANGE); ! if ((count != 2) || ! (strcmp(fields[0], first_name) != 0) || ! (strcmp(fields[1], "last") != 0)) { ! return 1; ! } ! return 0; } static int rdmxchange_line_import_schema (const char *table, char *fields[], int count) { --- 456,480 ---- LineSquare2Count = count; ! } else if (strcmp (name, "line/index2") == 0) { ! if (LineIndex2 != NULL) free (LineIndex2); + LineIndex2 = calloc (count, sizeof(int)); + LineIndex2Count = count; ! } else if (strcmp (name, "line/bylayer2") == 0) { ! if (LineLayer2 != NULL) free (LineLayer2); ! LineLayer2 = calloc (count, sizeof(int)); ! LineLayer2Count = count; ! } else { ! buildmap_fatal (1, "invalid table name %s", name); ! } } + static int rdmxchange_line_import_schema (const char *table, char *fields[], int count) { *************** *** 415,426 **** } else if (strcmp (table, "line/bysquare1") == 0) { ! if (LineSquare1 == NULL || rdmxchange_line_bad_square(fields, count)) { buildmap_fatal (1, "invalid schema for table %s", table); } return 2; ! } else if (strcmp (table, "line/index2") == 0) { ! if ((LineIndex2 == NULL) || (count != 1) || (strcmp (fields[0], "index") != 0)) { buildmap_fatal (1, "invalid schema for table %s", table); --- 494,508 ---- } else if (strcmp (table, "line/bysquare1") == 0) { ! if ((LineSquare1 == NULL) || ! (count != 2) || ! (strcmp(fields[0], "first") != 0) || ! (strcmp(fields[1], "count") != 0)) { buildmap_fatal (1, "invalid schema for table %s", table); } return 2; ! } else if (strcmp (table, "line/bylayer1") == 0) { ! if ((LineLayer1 == NULL) || (count != 1) || (strcmp (fields[0], "index") != 0)) { buildmap_fatal (1, "invalid schema for table %s", table); *************** *** 430,438 **** } else if (strcmp (table, "line/bysquare2") == 0) { ! if (LineSquare2 == NULL || rdmxchange_line_bad_square(fields, count)) { buildmap_fatal (1, "invalid schema for table %s", table); } return 4; } --- 512,539 ---- } else if (strcmp (table, "line/bysquare2") == 0) { ! if ((LineSquare2 == NULL) || ! (count != 2) || ! (strcmp(fields[0], "first") != 0) || ! (strcmp(fields[1], "count") != 0)) { buildmap_fatal (1, "invalid schema for table %s", table); } return 4; + } else if (strcmp (table, "line/bylayer2") == 0) { + + if ((LineLayer2 == NULL) || + (count != 1) || (strcmp (fields[0], "index") != 0)) { + buildmap_fatal (1, "invalid schema for table %s", table); + } + return 5; + + } else if (strcmp (table, "line/index2") == 0) { + + if ((LineIndex2 == NULL) || + (count != 1) || (strcmp (fields[0], "index") != 0)) { + buildmap_fatal (1, "invalid schema for table %s", table); + } + return 6; + } *************** *** 444,449 **** char *fields[], int count) { - int i; - switch (table) { --- 545,548 ---- *************** *** 459,470 **** case 2: ! if (count != ROADMAP_CATEGORY_RANGE + 1) { ! buildmap_fatal (count, "invalid line/bysquare record"); ! } ! for (i = 0; i < ROADMAP_CATEGORY_RANGE; ++i) { ! LineSquare1[LineCursor].first[i] = ! rdmxchange_import_int (fields[i]); } ! LineSquare1[LineCursor].last = rdmxchange_import_int (fields[i]); break; --- 558,566 ---- case 2: ! if (count != 2) { ! buildmap_fatal (count, "invalid line/bysquare1 record"); } ! LineSquare1[LineCursor].first = rdmxchange_import_int (fields[0]); ! LineSquare1[LineCursor].count = rdmxchange_import_int (fields[1]); break; *************** *** 472,490 **** if (count != 1) { ! buildmap_fatal (count, "invalid line/index2 record"); } ! LineIndex2[LineCursor] = rdmxchange_import_int (fields[0]); break; case 4: ! if (count != ROADMAP_CATEGORY_RANGE + 1) { ! buildmap_fatal (count, "invalid line/bysquare record"); } ! for (i = 0; i < ROADMAP_CATEGORY_RANGE; ++i) { ! LineSquare2[LineCursor].first[i] = ! rdmxchange_import_int (fields[i]); } ! LineSquare2[LineCursor].last = rdmxchange_import_int (fields[i]); break; --- 568,599 ---- if (count != 1) { ! buildmap_fatal (count, "invalid line/bylayer1 record"); } ! LineLayer1[LineCursor] = rdmxchange_import_int (fields[0]); break; case 4: ! if (count != 2) { ! buildmap_fatal (count, "invalid line/bysquare2 record"); } ! LineSquare2[LineCursor].first = rdmxchange_import_int (fields[0]); ! LineSquare2[LineCursor].count = rdmxchange_import_int (fields[1]); ! break; ! ! case 5: ! ! if (count != 1) { ! buildmap_fatal (count, "invalid line/bylayer2 record"); } ! LineLayer2[LineCursor] = rdmxchange_import_int (fields[0]); ! break; ! ! case 6: ! ! if (count != 1) { ! buildmap_fatal (count, "invalid line/index2 record"); ! } ! LineIndex2[LineCursor] = rdmxchange_import_int (fields[0]); break; |
From: Pascal F M. <pas...@us...> - 2006-02-06 01:46:23
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10412 Modified Files: rdmxchange_main.c Log Message: Fix error messages Index: rdmxchange_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/rdmxchange_main.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** rdmxchange_main.c 4 Feb 2006 09:16:22 -0000 1.4 --- rdmxchange_main.c 6 Feb 2006 01:46:15 -0000 1.5 *************** *** 340,344 **** if (! roadmap_db_open ("", argv[i], RdmMapModel)) { ! fprintf (stderr, "cannot open map database %s", argv[i]); exit(1); } --- 340,344 ---- if (! roadmap_db_open ("", argv[i], RdmMapModel)) { ! fprintf (stderr, "cannot open map database %s\n", argv[i]); exit(1); } *************** *** 350,354 **** io = fopen (fullname, "w"); if (io == NULL) { ! fprintf (stderr, "cannot open output file %s", fullname); exit(1); } --- 350,354 ---- io = fopen (fullname, "w"); if (io == NULL) { ! fprintf (stderr, "cannot open output file %s\n", fullname); exit(1); } *************** *** 374,378 **** io = fopen (argv[i], "r"); if (io == NULL) { ! fprintf (stderr, "cannot open input file %s", argv[i]); exit(1); } --- 374,378 ---- io = fopen (argv[i], "r"); if (io == NULL) { ! fprintf (stderr, "cannot open input file %s\n", argv[i]); exit(1); } *************** *** 384,388 **** if (buildmap_db_open (RdmXchangePath, basename) < 0) { ! fprintf (stderr, "cannot create map database %s", basename); exit(1); } --- 384,388 ---- if (buildmap_db_open (RdmXchangePath, basename) < 0) { ! fprintf (stderr, "cannot create map database %s\n", basename); exit(1); } |
From: Pascal F M. <pas...@us...> - 2006-02-06 01:45:57
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10193 Modified Files: roadmap_types.h Log Message: Remove hard-coded layers Index: roadmap_types.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_types.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_types.h 29 Oct 2004 06:59:32 -0000 1.2 --- roadmap_types.h 6 Feb 2006 01:45:49 -0000 1.3 *************** *** 45,90 **** } RoadMapArea; - - /* The cfcc category codes: */ - - /* Category: road. */ - - #define ROADMAP_ROAD_FIRST 1 - - #define ROADMAP_ROAD_FREEWAY 1 - #define ROADMAP_ROAD_RAMP 2 - #define ROADMAP_ROAD_MAIN 3 - #define ROADMAP_ROAD_STREET 4 - #define ROADMAP_ROAD_TRAIL 5 - - #define ROADMAP_ROAD_LAST 5 - - - /* Category: area. */ - - #define ROADMAP_AREA_FIRST 6 - - #define ROADMAP_AREA_PARC 6 - #define ROADMAP_AREA_HOSPITAL 7 - #define ROADMAP_AREA_AIRPORT 8 - #define ROADMAP_AREA_STATION 9 - #define ROADMAP_AREA_MALL 10 - - #define ROADMAP_AREA_LAST 10 - - - /* Category: water. */ - - #define ROADMAP_WATER_FIRST 11 - - #define ROADMAP_WATER_SHORELINE 11 - #define ROADMAP_WATER_RIVER 12 - #define ROADMAP_WATER_LAKE 13 - #define ROADMAP_WATER_SEA 14 - - #define ROADMAP_WATER_LAST 14 - - #define ROADMAP_CATEGORY_RANGE 14 - #endif // INCLUDED__ROADMAP_TYPES__H --- 45,48 ---- |
From: Pascal F M. <pas...@us...> - 2006-02-06 01:45:36
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10123 Modified Files: roadmap_screen.c Log Message: Remove hard-coded layers Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_screen.c,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** roadmap_screen.c 7 Dec 2005 18:57:35 -0000 1.59 --- roadmap_screen.c 6 Feb 2006 01:45:26 -0000 1.60 *************** *** 920,926 **** static int roadmap_screen_repaint_square (int square, unsigned int pen_index) { int i; int count; - int layers[1024]; RoadMapArea edges; --- 920,928 ---- static int roadmap_screen_repaint_square (int square, unsigned int pen_index) { + static int *layers = NULL; + static int layers_size = 0; + int i; int count; RoadMapArea edges; *************** *** 953,958 **** if (pen_index == 0) roadmap_screen_draw_square_edges (square); ! count = roadmap_layer_visible_lines (layers, 1024, pen_index); ! RoadMapScreenLastPen = NULL; --- 955,965 ---- if (pen_index == 0) roadmap_screen_draw_square_edges (square); ! if (layers == NULL) { ! layers_size = roadmap_layer_max_defined(); ! layers = (int *)calloc (layers_size, sizeof(int)); ! roadmap_check_allocated(layers); ! } ! count = roadmap_layer_visible_lines (layers, layers_size, pen_index); ! RoadMapScreenLastPen = NULL; |
From: Pascal F M. <pas...@us...> - 2006-02-06 01:44:51
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9784 Modified Files: roadmap_navigate.c Log Message: Remove hard-coded layers Index: roadmap_navigate.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_navigate.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** roadmap_navigate.c 27 Nov 2005 06:06:59 -0000 1.21 --- roadmap_navigate.c 6 Feb 2006 01:44:43 -0000 1.22 *************** *** 61,64 **** --- 61,67 ---- static int RoadMapNavigateEnabled = 0; + static int RoadMapCarMode; + + /* Avoid doing navigation work when the position has not changed. */ static RoadMapGpsPosition RoadMapLatestGpsPosition; *************** *** 179,183 **** roadmap_navigate_adjust_focus (&focus, &focus_point); ! count = roadmap_layer_visible_roads (layers, 128); if (count > 0) { --- 182,186 ---- roadmap_navigate_adjust_focus (&focus, &focus_point); ! count = roadmap_layer_navigable (RoadMapCarMode, layers, 128); if (count > 0) { *************** *** 344,348 **** (const RoadMapGpsPosition *position, PluginLine *found) { ! int cfcc; int square; int first_line; --- 347,351 ---- (const RoadMapGpsPosition *position, PluginLine *found) { ! int layer; int square; int first_line; *************** *** 398,405 **** if (square != -1) { ! for (cfcc = ROADMAP_ROAD_FIRST; cfcc <= ROADMAP_ROAD_LAST; ++cfcc) { if (roadmap_line_in_square ! (square, cfcc, &first_line, &last_line) > 0) { int line; --- 401,414 ---- if (square != -1) { ! int i; ! int layers[128]; ! int count = roadmap_layer_navigable (RoadMapCarMode, layers, 128); ! ! for (i = 0; i < count; ++i) { ! ! layer = layers[i]; if (roadmap_line_in_square ! (square, layer, &first_line, &last_line) > 0) { int line; *************** *** 408,414 **** PluginLine p_line = ! PLUGIN_MAKE_LINE (ROADMAP_PLUGIN_ID, line, cfcc, fips); ! if (roadmap_plugin_override_line (line, cfcc, fips)) { continue; } --- 417,423 ---- PluginLine p_line = ! PLUGIN_MAKE_LINE (ROADMAP_PLUGIN_ID, line, layer, fips); ! if (roadmap_plugin_override_line (line, layer, fips)) { continue; } *************** *** 439,443 **** if (roadmap_line_in_square2 ! (square, cfcc, &first_line, &last_line) > 0) { int xline; --- 448,452 ---- if (roadmap_line_in_square2 ! (square, layer, &first_line, &last_line) > 0) { int xline; *************** *** 447,453 **** int line = roadmap_line_get_from_index2 (xline); PluginLine p_line = ! PLUGIN_MAKE_LINE (ROADMAP_PLUGIN_ID, line, cfcc, fips); ! if (roadmap_plugin_override_line (line, cfcc, fips)) { continue; } --- 456,462 ---- int line = roadmap_line_get_from_index2 (xline); PluginLine p_line = ! PLUGIN_MAKE_LINE (ROADMAP_PLUGIN_ID, line, layer, fips); ! if (roadmap_plugin_override_line (line, layer, fips)) { continue; } *************** *** 669,672 **** --- 678,683 ---- void roadmap_navigate_initialize (void) { + RoadMapCarMode = roadmap_layer_declare_navigation_mode ("Car"); + roadmap_config_declare_enumeration ("session", &RoadMapNavigateFlag, "yes", "no", NULL); |
From: Pascal F M. <pas...@us...> - 2006-02-06 01:44:11
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9464 Modified Files: roadmap_layer.h Log Message: Remove hard-coded layers Index: roadmap_layer.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_layer.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** roadmap_layer.h 14 Nov 2005 07:12:58 -0000 1.4 --- roadmap_layer.h 6 Feb 2006 01:43:54 -0000 1.5 *************** *** 59,70 **** #include "roadmap_canvas.h" ! /* This is the maximum number of layers PER CLASS. As there is no limit on ! * the number of classes, the total number of layers is actually unlimited. ! * We could have implemented support for an unlimited number of layers per ! * class, but who wants a thousand layers per map, anyway? ! * Having this limit makes life easier for everyone, and the downside is nil. ! */ ! #define ROADMAP_MAX_LAYERS 1024 ! unsigned int roadmap_layer_max_pen(void); --- 59,63 ---- #include "roadmap_canvas.h" ! unsigned int roadmap_layer_max_defined(void); unsigned int roadmap_layer_max_pen(void); *************** *** 76,81 **** int roadmap_layer_select_class (const char *name); ! /* DEPRECATED, use: roadmap_layer_select_class ("Roads") */ ! int roadmap_layer_visible_roads (int *layers, int size); int roadmap_layer_visible_lines --- 69,73 ---- int roadmap_layer_select_class (const char *name); ! int roadmap_layer_navigable (int mode, int *layers, int size); int roadmap_layer_visible_lines *************** *** 93,96 **** --- 85,89 ---- void roadmap_layer_load (void); + int roadmap_layer_declare_navigation_mode (const char *name); void roadmap_layer_initialize (void); |
From: Pascal F M. <pas...@us...> - 2006-02-06 01:44:05
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9427 Modified Files: roadmap_layer.c Log Message: Remove hard-coded layers Index: roadmap_layer.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_layer.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** roadmap_layer.c 11 Dec 2005 18:19:08 -0000 1.10 --- roadmap_layer.c 6 Feb 2006 01:43:46 -0000 1.11 *************** *** 41,44 **** --- 41,68 ---- + /* This is the maximum number of layers PER CLASS. As there is no limit on + * the number of classes, the total number of layers is actually unlimited. + * We could have implemented support for an unlimited number of layers per + * class, but who wants a thousand layers per map, anyway? + * Having this limit makes life easier for everyone, and the downside is nil. + * Note that this has no impact on the API of roadmap_layer. + */ + #define ROADMAP_MAX_LAYERS 1024 + + /* There is a maximum number of navigation modules that can be registered. + * This is not really a limitation for now, since there is currently only + * one navigation mode (car) and any other would be hiking, boat, plane, + * spaceship... i.e. much less than the limit here. + * The size cannot be changed easily: the code uses bitmaps... + */ + #define ROADMAP_MAX_NAVIGATION_MODES (8*sizeof(int)) + + /* Some layers may be displayed using more than one pen. + * For example, a freeway could be displayed using 3 pens: + * border, fill, center divider. + */ + #define ROADMAP_MAX_LAYER_PENS 4 + + static RoadMapConfigDescriptor RoadMapConfigStylePretty = ROADMAP_CONFIG_ITEM("Style", "Use Pretty Lines"); *************** *** 47,54 **** ROADMAP_CONFIG_ITEM("Display", "Skin"); /* CLASSES. ----------------------------------------------------------- * A class represent a group of categories that have the same basic ! * properties. For example, the "Road" class can be searched for an ! * address. * The lines and the polygons arrays are consecutive to each other, * i.e. a single array where the lines are listed first, so that we --- 71,85 ---- ROADMAP_CONFIG_ITEM("Display", "Skin"); + static const char *RoadMapNavigationMode[ROADMAP_MAX_NAVIGATION_MODES]; + static unsigned int RoadMapNavigationModeCount = 0; + + /* CLASSES. ----------------------------------------------------------- * A class represent a group of categories that have the same basic ! * properties or which come from a single source. For example, the "Road" ! * class can be searched for an address. Note however that RoadMap never ! * assumes that there is any implicit property common to the layers ! * of the same class: the organization of layers into classes is only ! * a map creator's convention. * The lines and the polygons arrays are consecutive to each other, * i.e. a single array where the lines are listed first, so that we *************** *** 79,88 **** * using the same pen (i.e. same color, thickness) and the same * graphical primitive (line, polygon, etc..). - * Some layers may be displayed using more than one pen. - * For example, a freeway could be displayed using 3 pens: - * border, fill, center divider. */ - #define ROADMAP_LAYER_PENS 4 - typedef struct roadmap_layer_record { --- 110,114 ---- *************** *** 91,95 **** RoadMapClass *class; ! char in_use[ROADMAP_LAYER_PENS]; RoadMapConfigDescriptor declutter; --- 117,121 ---- RoadMapClass *class; ! char in_use[ROADMAP_MAX_LAYER_PENS]; RoadMapConfigDescriptor declutter; *************** *** 97,106 **** unsigned int pen_count; ! RoadMapPen pen[ROADMAP_LAYER_PENS]; ! int delta_thickness[ROADMAP_LAYER_PENS]; } RoadMapLayer; static unsigned int RoadMapMaxUsedPen = 1; --- 123,135 ---- unsigned int pen_count; ! RoadMapPen pen[ROADMAP_MAX_LAYER_PENS]; ! int delta_thickness[ROADMAP_MAX_LAYER_PENS]; ! ! int navigation_modes; } RoadMapLayer; static unsigned int RoadMapMaxUsedPen = 1; + static unsigned int RoadMapMaxDefinedLayers = 1; *************** *** 162,165 **** --- 191,200 ---- + unsigned int roadmap_layer_max_defined(void) { + + return RoadMapMaxDefinedLayers + 1; /* To be safe, allocate a bit more. */ + } + + unsigned int roadmap_layer_max_pen(void) { *************** *** 171,179 **** ! /* THIS FUNCTION IS A TEMPORARY COMPATIBILITY HACK. */ ! int roadmap_layer_visible_roads (int *layers, int size) { int i; ! int count = -1; RoadMapLayer *layer; --- 206,214 ---- ! int roadmap_layer_navigable (int mode, int *layers, int size) { int i; ! int mask = 1 << mode; ! int count = 0; RoadMapLayer *layer; *************** *** 182,200 **** if (RoadMapLayerCurrentClass == NULL) return 0; ! --size; /* To match our boundary check. */ ! ! for (i = 0; i < RoadMapLayerCurrentClass->lines_count; ++i) { ! layer = RoadMapLayerCurrentClass->layers + i; ! if (strcasecmp(layer->name, "Rivers") == 0) break; ! if (roadmap_layer_is_visible (layer)) { ! if (count >= size) break; ! layers[++count] = i + 1; } } ! return count + 1; } --- 217,234 ---- if (RoadMapLayerCurrentClass == NULL) return 0; ! for (i = 1; i <= RoadMapLayerCurrentClass->lines_count; ++i) { ! layer = RoadMapLayerCurrentClass->layers + i - 1; ! if (layer->navigation_modes & mask) { ! if (roadmap_layer_is_visible (layer)) { ! if (count >= size) break; ! layers[count++] = i; ! } } } ! return count; } *************** *** 204,208 **** int i; ! int count = -1; RoadMapLayer *layer; --- 238,242 ---- int i; ! int count = 0; RoadMapLayer *layer; *************** *** 211,219 **** if (RoadMapLayerCurrentClass == NULL) return 0; ! --size; /* To match our boundary check. */ ! ! for (i = RoadMapLayerCurrentClass->lines_count - 1; i >= 0; --i) { ! layer = RoadMapLayerCurrentClass->layers + i; if (pen_index >= layer->pen_count) continue; --- 245,251 ---- if (RoadMapLayerCurrentClass == NULL) return 0; ! for (i = RoadMapLayerCurrentClass->lines_count; i > 0; --i) { ! layer = RoadMapLayerCurrentClass->layers + i - 1; if (pen_index >= layer->pen_count) continue; *************** *** 222,231 **** if (roadmap_layer_is_visible (layer)) { if (count >= size) goto done; ! layers[++count] = i + 1; } } ! done: ! return count + 1; } --- 254,263 ---- if (roadmap_layer_is_visible (layer)) { if (count >= size) goto done; ! layers[count++] = i; } } ! done: ! return count; } *************** *** 425,443 **** static int roadmap_layer_decode (const char *config, ! const char *id, char**args, int max) { int count; char *buffer; ! if (max <= 0) { ! roadmap_log (ROADMAP_FATAL, ! "too many layers in class file %s", ! roadmap_config_file(config)); ! } /* We must allocate a new storage because we are going to split * the string, thus modify it. */ ! buffer = strdup(roadmap_config_get_from (config, "Class", id)); roadmap_check_allocated(buffer); --- 457,473 ---- static int roadmap_layer_decode (const char *config, ! const char *category, const char *id, ! char**args, int max) { int count; char *buffer; + const char *value = roadmap_config_get_from (config, category, id); ! if (value == NULL) return 0; /* We must allocate a new storage because we are going to split * the string, thus modify it. */ ! buffer = strdup(value); roadmap_check_allocated(buffer); *************** *** 445,450 **** if (count <= 0) { roadmap_log (ROADMAP_FATAL, ! "invalid layer list %s in class file %s", ! id, roadmap_config_file(config)); } --- 475,480 ---- if (count <= 0) { roadmap_log (ROADMAP_FATAL, ! "invalid list %s.%s in class file %s", ! category, id, roadmap_config_file(config)); } *************** *** 645,654 **** lines_count = roadmap_layer_decode ! (class_config, "Lines", layers, ROADMAP_MAX_LAYERS); if (lines_count <= 0) return; polygons_count = roadmap_layer_decode ! (class_config, "Polygons", layers + lines_count, ROADMAP_MAX_LAYERS - lines_count); if (polygons_count <= 0) return; --- 675,684 ---- lines_count = roadmap_layer_decode ! (class_config, "Class", "Lines", layers, ROADMAP_MAX_LAYERS); if (lines_count <= 0) return; polygons_count = roadmap_layer_decode ! (class_config, "Class", "Polygons", layers + lines_count, ROADMAP_MAX_LAYERS - lines_count); if (polygons_count <= 0) return; *************** *** 681,689 **** for (i = lines_count + polygons_count - 1; i >= 0; --i) { RoadMapLayer *layer = new_class->layers + i; ! const char *color[ROADMAP_LAYER_PENS]; int thickness; --- 711,723 ---- + if (RoadMapMaxDefinedLayers < (unsigned int) lines_count + polygons_count) { + RoadMapMaxDefinedLayers = lines_count + polygons_count; + } + for (i = lines_count + polygons_count - 1; i >= 0; --i) { RoadMapLayer *layer = new_class->layers + i; ! const char *color[ROADMAP_MAX_LAYER_PENS]; int thickness; *************** *** 694,697 **** --- 728,732 ---- layer->name = layers[i]; layer->class = new_class; + layer->navigation_modes = 0; *************** *** 716,720 **** /* Retrieve the layer's other colors (optional). */ ! for (pen_index = 1; pen_index < ROADMAP_LAYER_PENS; ++pen_index) { const char *image; --- 751,755 ---- /* Retrieve the layer's other colors (optional). */ ! for (pen_index = 1; pen_index < ROADMAP_MAX_LAYER_PENS; ++pen_index) { const char *image; *************** *** 751,754 **** --- 786,793 ---- } + if (i >= lines_count) { /* This is a polygon. */ + layer->in_use[0] = 1; + } + for (pen_index = 1; pen_index < layer->pen_count; ++pen_index) { *************** *** 764,769 **** --- 803,838 ---- roadmap_canvas_set_thickness (thickness); roadmap_canvas_set_foreground (color[pen_index]); + + if (i >= lines_count) { /* This is a polygon. */ + layer->in_use[pen_index] = 1; + } } } + + /* Retrieve the navigation modes associated with each layer. */ + + for (i = 0; i < (int)RoadMapNavigationModeCount; ++i) { + + int j; + int k; + int mask = 1 << i; + char *navigation_layers[ROADMAP_MAX_LAYERS]; + + int layers_count = + roadmap_layer_decode (class_config, + "Navigation", RoadMapNavigationMode[i], + navigation_layers, ROADMAP_MAX_LAYERS); + + for (j = layers_count - 1; j >= 0; --j) { + + for (k = lines_count - 1; k >= 0; --k) { + + if (strcasecmp(layers[k], navigation_layers[j]) == 0) { + new_class->layers[k].navigation_modes |= mask; + break; + } + } + } + } } *************** *** 821,824 **** --- 890,904 ---- + int roadmap_layer_declare_navigation_mode (const char *name) { + + if (RoadMapNavigationModeCount >= ROADMAP_MAX_NAVIGATION_MODES) { + roadmap_log (ROADMAP_FATAL, "too many navigation modes"); + } + RoadMapNavigationMode[RoadMapNavigationModeCount] = strdup(name); + + return RoadMapNavigationModeCount++; + } + + void roadmap_layer_initialize (void) { |
From: Pascal F M. <pas...@us...> - 2006-02-05 23:20:31
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14750 Modified Files: roadmap_place.c Log Message: Remove hard-coded layers Index: roadmap_place.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_place.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_place.c 5 Dec 2004 19:10:06 -0000 1.2 --- roadmap_place.c 5 Feb 2006 23:20:21 -0000 1.3 *************** *** 23,29 **** * SYNOPSYS: * ! * int roadmap_place_in_square (int square, int cfcc, int *first, int *last); ! * void roadmap_place_point (int place, RoadMapPosition *position); ! * * int roadmap_place_count (void); * --- 23,29 ---- * SYNOPSYS: * ! * int roadmap_place_in_square ! * (int square, int layer, int *first, int *last); ! * void roadmap_place_point (int place, RoadMapPosition *position); * int roadmap_place_count (void); * *************** *** 51,56 **** char *type; ! RoadMapPlace *Place; ! int PlaceCount; RoadMapPlaceBySquare *PlaceBySquare; --- 51,59 ---- char *type; ! int *Place; ! int PlaceCount; ! ! int *PlaceByLayer; ! int PlaceByLayerCount; RoadMapPlaceBySquare *PlaceBySquare; *************** *** 67,70 **** --- 70,74 ---- roadmap_db *place_table; + roadmap_db *layer_table; roadmap_db *square_table; *************** *** 78,92 **** place_table = roadmap_db_get_subsection (root, "data"); square_table = roadmap_db_get_subsection (root, "bysquare"); ! context->Place = (RoadMapPlace *) roadmap_db_get_data (place_table); context->PlaceCount = roadmap_db_get_count (place_table); ! if (roadmap_db_get_size (place_table) != ! context->PlaceCount * sizeof(RoadMapPlace)) { roadmap_log (ROADMAP_ERROR, "invalid place/data structure"); goto roadmap_place_map_abort; } context->PlaceBySquare = (RoadMapPlaceBySquare *) roadmap_db_get_data (square_table); --- 82,104 ---- place_table = roadmap_db_get_subsection (root, "data"); + layer_table = roadmap_db_get_subsection (root, "bylayer"); square_table = roadmap_db_get_subsection (root, "bysquare"); ! context->Place = (int *) roadmap_db_get_data (place_table); context->PlaceCount = roadmap_db_get_count (place_table); ! if (roadmap_db_get_size (place_table) != context->PlaceCount * sizeof(int)) { roadmap_log (ROADMAP_ERROR, "invalid place/data structure"); goto roadmap_place_map_abort; } + context->PlaceByLayer = (int *) roadmap_db_get_data (layer_table); + context->PlaceByLayerCount = roadmap_db_get_count (layer_table); + + if (roadmap_db_get_size (layer_table) != context->PlaceCount * sizeof(int)) { + roadmap_log (ROADMAP_ERROR, "invalid place/bylayer structure"); + goto roadmap_place_map_abort; + } + context->PlaceBySquare = (RoadMapPlaceBySquare *) roadmap_db_get_data (square_table); *************** *** 128,132 **** roadmap_db_handler RoadMapPlaceHandler = { ! "dictionary", roadmap_place_map, roadmap_place_activate, --- 140,144 ---- roadmap_db_handler RoadMapPlaceHandler = { ! "place", roadmap_place_map, roadmap_place_activate, *************** *** 135,146 **** ! int roadmap_place_in_square (int square, int cfcc, int *first, int *last) { - int next; int *index; - if (cfcc <= 0 || cfcc > ROADMAP_CATEGORY_RANGE) { - roadmap_log (ROADMAP_FATAL, "illegal cfcc %d", cfcc); - } square = roadmap_square_index(square); if (square < 0) { --- 147,154 ---- ! int roadmap_place_in_square (int square, int layer, int *first, int *last) { int *index; square = roadmap_square_index(square); if (square < 0) { *************** *** 148,169 **** } ! index = RoadMapPlaceActive->PlaceBySquare[square].first; ! ! if (index[cfcc-1] < 0) { ! return 0; ! } ! *first = index[cfcc-1]; ! ! for (next = -1; next < 0 && cfcc < ROADMAP_CATEGORY_RANGE; cfcc++) { ! next = index[cfcc]; } ! if (next > 0) { ! *last = next - 1; ! } else { ! *last = RoadMapPlaceActive->PlaceBySquare[square].last; ! } ! return 1; } --- 156,169 ---- } ! if (layer <= 0 || layer > RoadMapPlaceActive->PlaceBySquare[square].count) { ! roadmap_log (ROADMAP_FATAL, "illegal layer %d", layer); } + index = RoadMapPlaceActive->PlaceByLayer + + RoadMapPlaceActive->PlaceBySquare[square].first; ! *first = index[layer-1]; ! *last = index[layer] - 1; ! return (*first <= *last); } |