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: Ehud S. <esh...@us...> - 2006-10-14 09:07:35
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7973 Modified Files: roadmap_httpcopy.c Log Message: Fix time parsing in NMEA to return UTC time. Index: roadmap_httpcopy.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_httpcopy.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** roadmap_httpcopy.c 17 Sep 2006 18:18:50 -0000 1.3 --- roadmap_httpcopy.c 14 Oct 2006 09:07:29 -0000 1.4 *************** *** 75,79 **** length = strlen(buffer); ! if (roadmap_net_send (socket, buffer, length) != length) { error ("send error on: %s", buffer); return 0; --- 75,79 ---- length = strlen(buffer); ! if (roadmap_net_send (socket, buffer, length, 1) != length) { error ("send error on: %s", buffer); return 0; *************** *** 174,177 **** --- 174,178 ---- return 0; } + total += received; buffer[total] = 0; |
From: Ehud S. <esh...@us...> - 2006-10-14 09:06:17
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7577 Modified Files: roadmap_nmea.c Log Message: Fix time parsing in NMEA to return UTC time. Index: roadmap_nmea.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_nmea.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** roadmap_nmea.c 27 Jul 2006 14:20:17 -0000 1.4 --- roadmap_nmea.c 14 Oct 2006 09:06:12 -0000 1.5 *************** *** 140,144 **** /* FIXME: th time zone might change if we are moving !. */ ! return mktime(&tm); } --- 140,144 ---- /* FIXME: th time zone might change if we are moving !. */ ! return timegm(&tm); } |
From: Ehud S. <esh...@us...> - 2006-10-14 09:05:11
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7157 Modified Files: roadmap_gps.c roadmap_gpsd2.c roadmap_io.c roadmap_io.h roadmap_net.h Log Message: Add wait parameter to roadmap_net_send Index: roadmap_io.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_io.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** roadmap_io.h 15 Oct 2005 22:18:58 -0000 1.1.1.1 --- roadmap_io.h 14 Oct 2006 09:05:07 -0000 1.2 *************** *** 64,68 **** int roadmap_io_read (RoadMapIO *io, void *data, int size); ! int roadmap_io_write (RoadMapIO *io, const void *data, int length); void roadmap_io_close (RoadMapIO *io); --- 64,68 ---- int roadmap_io_read (RoadMapIO *io, void *data, int size); ! int roadmap_io_write (RoadMapIO *io, const void *data, int length, int wait); void roadmap_io_close (RoadMapIO *io); Index: roadmap_io.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_io.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** roadmap_io.c 15 Oct 2005 22:18:58 -0000 1.1.1.1 --- roadmap_io.c 14 Oct 2006 09:05:07 -0000 1.2 *************** *** 58,62 **** ! int roadmap_io_write (RoadMapIO *io, const void *data, int length) { switch (io->subsystem) { --- 58,62 ---- ! int roadmap_io_write (RoadMapIO *io, const void *data, int length, int wait) { switch (io->subsystem) { *************** *** 66,70 **** case ROADMAP_IO_NET: ! return roadmap_net_send (io->os.socket, data, length); case ROADMAP_IO_SERIAL: --- 66,70 ---- case ROADMAP_IO_NET: ! return roadmap_net_send (io->os.socket, data, length, wait); case ROADMAP_IO_SERIAL: Index: roadmap_gps.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_gps.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** roadmap_gps.c 17 Sep 2006 18:18:31 -0000 1.13 --- roadmap_gps.c 14 Oct 2006 09:05:07 -0000 1.14 *************** *** 743,747 **** if (ROADMAP_NET_IS_VALID(RoadMapGpsLink.os.socket)) { ! if (roadmap_net_send (RoadMapGpsLink.os.socket, "r\n", 2) == 2) { RoadMapGpsLink.subsystem = ROADMAP_IO_NET; --- 743,747 ---- if (ROADMAP_NET_IS_VALID(RoadMapGpsLink.os.socket)) { ! if (roadmap_net_send (RoadMapGpsLink.os.socket, "r\n", 2, 1) == 2) { RoadMapGpsLink.subsystem = ROADMAP_IO_NET; Index: roadmap_gpsd2.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_gpsd2.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** roadmap_gpsd2.c 15 Oct 2005 22:18:58 -0000 1.1.1.1 --- roadmap_gpsd2.c 14 Oct 2006 09:05:07 -0000 1.2 *************** *** 107,111 **** if (roadmap_net_send ! (socket, request, sizeof(request)-1) != sizeof(request)-1) { roadmap_log (ROADMAP_WARNING, "Lost gpsd server session"); --- 107,111 ---- if (roadmap_net_send ! (socket, request, sizeof(request)-1, 1) != sizeof(request)-1) { roadmap_log (ROADMAP_WARNING, "Lost gpsd server session"); Index: roadmap_net.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_net.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_net.h 13 Jul 2006 06:34:47 -0000 1.2 --- roadmap_net.h 14 Oct 2006 09:05:07 -0000 1.3 *************** *** 49,53 **** */ int roadmap_net_receive (RoadMapSocket s, void *data, int size); ! int roadmap_net_send (RoadMapSocket s, const void *data, int length); RoadMapSocket roadmap_net_listen(int port); --- 49,54 ---- */ int roadmap_net_receive (RoadMapSocket s, void *data, int size); ! int roadmap_net_send (RoadMapSocket s, const void *data, int length, ! int wait); RoadMapSocket roadmap_net_listen(int port); |
From: Ehud S. <esh...@us...> - 2006-10-14 09:04:11
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6779 Modified Files: roadmap_driver.c roadmap_friends.c roadmap_ghost.c Log Message: Add wait parameter to roadmap_net_send Index: roadmap_driver.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_driver.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_driver.c 28 Nov 2005 19:36:34 -0000 1.2 --- roadmap_driver.c 14 Oct 2006 09:04:08 -0000 1.3 *************** *** 421,425 **** descriptor.name, value); ! roadmap_io_write (&driver->output, buffer, strlen(buffer)); /* We do not release the category, name and default value strings, --- 421,425 ---- descriptor.name, value); ! roadmap_io_write (&driver->output, buffer, strlen(buffer), 0); /* We do not release the category, name and default value strings, *************** *** 515,519 **** (driver->output.subsystem != ROADMAP_IO_INVALID)) { ! if (roadmap_io_write (&driver->output, data, length) < 0) { roadmap_driver_onexit (driver); } --- 515,519 ---- (driver->output.subsystem != ROADMAP_IO_INVALID)) { ! if (roadmap_io_write (&driver->output, data, length, 0) < 0) { roadmap_driver_onexit (driver); } Index: roadmap_friends.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_friends.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_friends.c 3 Sep 2006 18:00:15 -0000 1.2 --- roadmap_friends.c 14 Oct 2006 09:04:08 -0000 1.3 *************** *** 218,222 **** atoi(argv[8])); ! roadmap_net_send (socket, buffer, strlen(buffer)); } --- 218,222 ---- atoi(argv[8])); ! roadmap_net_send (socket, buffer, strlen(buffer), 1); } *************** *** 494,498 **** } buffer[0] = 'A'; buffer[1] = 'C'; buffer[2] = 'K'; ! roadmap_net_send (socket, buffer, strlen(buffer)); } else if (strncmp (buffer, "POS: ", 5) == 0 || --- 494,498 ---- } buffer[0] = 'A'; buffer[1] = 'C'; buffer[2] = 'K'; ! roadmap_net_send (socket, buffer, strlen(buffer), 1); } else if (strncmp (buffer, "POS: ", 5) == 0 || Index: roadmap_ghost.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_ghost.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_ghost.c 3 Sep 2006 18:00:15 -0000 1.2 --- roadmap_ghost.c 14 Oct 2006 09:04:08 -0000 1.3 *************** *** 38,42 **** #include <stdlib.h> ! #include "roadmap.h" #include "roadmap_net.h" --- 38,42 ---- #include <stdlib.h> ! #include "roadmap.h" #include "roadmap_net.h" *************** *** 45,54 **** char data[256]; }; ! ! static void send_buffer (RoadMapSocket s, char *buffer) { ! ! if (roadmap_net_send(s, buffer, strlen(buffer)) < 0) exit(-1); } ! int main(int argc, char *argv[]) { --- 45,54 ---- char data[256]; }; ! ! static void send_buffer (RoadMapSocket s, char *buffer) { ! ! if (roadmap_net_send(s, buffer, strlen(buffer), 1) < 0) exit(-1); } ! int main(int argc, char *argv[]) { *************** *** 64,75 **** int previous = -1; int delay_cursor = 0; ! int delay_length = 0; RoadMapSocket roadmap_socket; struct delay_buffer *delay_line = NULL; ! roadmap_socket = roadmap_net_connect ("tcp", "localhost", 2007); ! ! if (!ROADMAP_NET_IS_VALID(roadmap_socket)) exit(-1); if (argc > 1 && strncmp (argv[1], "--driver=", 9) == 0) { --- 64,75 ---- int previous = -1; int delay_cursor = 0; ! int delay_length = 0; RoadMapSocket roadmap_socket; struct delay_buffer *delay_line = NULL; ! roadmap_socket = roadmap_net_connect ("tcp", "localhost", 2007); ! ! if (!ROADMAP_NET_IS_VALID(roadmap_socket)) exit(-1); if (argc > 1 && strncmp (argv[1], "--driver=", 9) == 0) { *************** *** 79,89 **** config_length = strlen(config); ! snprintf (buffer, sizeof(buffer), "$PXRMADD,%s,%s,Friend\n", driver, driver); ! send_buffer (roadmap_socket, buffer); ! strcpy (buffer, "$PXRMSUB,RMC\n"); ! send_buffer (roadmap_socket, buffer); ! snprintf (buffer, sizeof(buffer), "%s10\n", config, driver); send_buffer (roadmap_socket, buffer); --- 79,89 ---- config_length = strlen(config); ! snprintf (buffer, sizeof(buffer), "$PXRMADD,%s,%s,Friend\n", driver, driver); ! send_buffer (roadmap_socket, buffer); ! strcpy (buffer, "$PXRMSUB,RMC\n"); ! send_buffer (roadmap_socket, buffer); ! snprintf (buffer, sizeof(buffer), "%s10\n", config, driver); send_buffer (roadmap_socket, buffer); |
From: Ehud S. <esh...@us...> - 2006-10-14 09:02:59
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6032 Modified Files: lang Log Message: Fix right / left mixup. Index: lang =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/lang,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lang 17 Sep 2006 18:15:41 -0000 1.3 --- lang 14 Oct 2006 09:02:54 -0000 1.4 *************** *** 70,75 **** Left=ש××× Right=×××× ! Update left=×¢××× ×¦× ×××× ! Update right=×¢××× ×¦× ×©××× There are no markers.=××× ×ער×ת. There is no recording associated with this note.=××× ××××¢× ×§×××ת ×××¢×¨× ××ת. --- 70,75 ---- Left=ש××× Right=×××× ! Update left=×¢××× ×¦× ×©××× ! Update right=×¢××× ×¦× ×××× There are no markers.=××× ×ער×ת. There is no recording associated with this note.=××× ××××¢× ×§×××ת ×××¢×¨× ××ת. |
From: Paul F. <pg...@us...> - 2006-10-13 15:18:15
|
Update of /cvsroot/roadmap/roadmap In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14264 Modified Files: README Log Message: doc update for new Geometry.Default, and for street name heuristics. Index: README =================================================================== RCS file: /cvsroot/roadmap/roadmap/README,v retrieving revision 1.100 retrieving revision 1.101 diff -C2 -d -r1.100 -r1.101 *** README 20 Aug 2006 16:12:15 -0000 1.100 --- README 13 Oct 2006 15:18:09 -0000 1.101 *************** *** 871,875 **** any space, dashes can be used in place of the spaces (the goal here is to be shell friendly). This option is sticky (preference item ! Geometry.<WINDOW> = <WIDTHxHEIGHT>). [--no-toolbar] Do not show the toolbar. This option is sticky (preference --- 871,876 ---- any space, dashes can be used in place of the spaces (the goal here is to be shell friendly). This option is sticky (preference item ! Geometry.<WINDOW> = <WIDTHxHEIGHT>). To set the default geometry ! of all unspecified windows, use --geometry:Default=<WIDTHxHEIGHT>. [--no-toolbar] Do not show the toolbar. This option is sticky (preference *************** *** 1232,1243 **** regarding the format of the names. ! When entering a street name, the street prefix, suffix and type, if provided, ! must be among the abbreviations listed by the US Census Bureau (N for north, ! E for east, Blvd for boulevard, etc..). In almost all cases, the US Census ! Bureau conventions follow the usual abbreviations, so there is no need to ! worry here. In addition, any of these fields is optional: not providing ! them only makes the search less selective. If several matches are found, ! RoadMap shows a list of all matching streets and lets the user select the ! appropriate one. The exact format of the data expected by RoadMap as a complete street name --- 1233,1246 ---- regarding the format of the names. ! When entering a street name, the street prefix and suffix, if provided, ! must be among the abbreviations listed by the US Census Bureau (N for ! north, SW for southwest, etc..). The "type" part of the name (i.e. "Rd", ! "St", "Pl") can be given using either the Census Bureau abbreviation, or by ! spelling it out in full (i.e., "Road", "Street", "Place"). In almost all ! cases, the US Census Bureau conventions follow the usual abbreviations, so ! there is no need to worry here. In addition, any of these fields is ! optional: not providing them only makes the search less selective. If ! several matches are found, RoadMap shows a list of all matching streets and ! lets the user select the appropriate one. The exact format of the data expected by RoadMap as a complete street name *************** *** 2100,2104 **** <<Default:>> 800x600 ! [Geometry.WINDOW] Sets the size of the RoadMap window named WINDOW. <<Format:>> <WIDTH>x<HEIGHT> --- 2103,2107 ---- <<Default:>> 800x600 ! [Geometry.Default] Sets the default size for other RoadMap windows. <<Format:>> <WIDTH>x<HEIGHT> *************** *** 2106,2109 **** --- 2109,2118 ---- <<Default:>> 300x200 + [Geometry.WINDOW] Sets the size of the RoadMap window named WINDOW. + + <<Format:>> <WIDTH>x<HEIGHT> + + <<Default:>> <the value of Geometry.Default > + [Display.Bottom Right] Defines the message on the bottom right corner. |
From: Paul F. <pg...@us...> - 2006-10-13 15:17:29
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13873 Modified Files: roadmap_option.c roadmap_start.c Log Message: adjust previous change to roadmap_option.c: declare Geometry.Main so that the option is always present in preferences, ready to be edited. Index: roadmap_option.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_option.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** roadmap_option.c 13 Oct 2006 13:22:11 -0000 1.16 --- roadmap_option.c 13 Oct 2006 15:17:26 -0000 1.17 *************** *** 121,126 **** if (option == NULL || option[0] == 0) { ! /* assumes no dialog named "default" */ ! option = roadmap_option_get_geometry ("default"); } --- 121,126 ---- if (option == NULL || option[0] == 0) { ! /* assumes no dialog named "default" */ ! option = roadmap_option_get_geometry ("Default"); } *************** *** 138,143 **** if (option == NULL || option[0] == 0) { ! /* assumes no dialog named "default" */ ! option = roadmap_option_get_geometry ("default"); } --- 138,143 ---- if (option == NULL || option[0] == 0) { ! /* assumes no dialog named "default" */ ! option = roadmap_option_get_geometry ("Default"); } Index: roadmap_start.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_start.c,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -d -r1.105 -r1.106 *** roadmap_start.c 3 Oct 2006 21:40:30 -0000 1.105 --- roadmap_start.c 13 Oct 2006 15:17:26 -0000 1.106 *************** *** 96,99 **** --- 96,102 ---- ROADMAP_CONFIG_ITEM("Geometry", "Main"); + static RoadMapConfigDescriptor RoadMapConfigGeometryDefault = + ROADMAP_CONFIG_ITEM("Geometry", "Default"); + static RoadMapConfigDescriptor RoadMapConfigMapPath = ROADMAP_CONFIG_ITEM("Map", "Path"); *************** *** 1013,1016 **** --- 1016,1022 ---- roadmap_config_declare + ("preferences", &RoadMapConfigGeometryDefault, "300x200"); + + roadmap_config_declare ("preferences", &RoadMapConfigDisplayRefresh, ""); |
From: Paul F. <pg...@us...> - 2006-10-13 13:23:14
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv368 Modified Files: roadmap_option.c Log Message: add support for default dialog window size. (use "--geometry:default:WWWxHHH", or add "Geometry.default: 500x400" to .preferences.) Index: roadmap_option.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_option.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** roadmap_option.c 4 Nov 2005 18:57:58 -0000 1.15 --- roadmap_option.c 13 Oct 2006 13:22:11 -0000 1.16 *************** *** 121,124 **** --- 121,129 ---- if (option == NULL || option[0] == 0) { + /* assumes no dialog named "default" */ + option = roadmap_option_get_geometry ("default"); + } + + if (option == NULL || option[0] == 0) { return 300; } *************** *** 132,135 **** --- 137,145 ---- char *separator; + if (option == NULL || option[0] == 0) { + /* assumes no dialog named "default" */ + option = roadmap_option_get_geometry ("default"); + } + separator = strchr (option, 'x'); if (separator == NULL) { |
From: Paul F. <pg...@us...> - 2006-10-13 13:01:59
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25384 Modified Files: roadmap_address.c Log Message: don't force a selection when the address list dialog is being dismissed. Index: roadmap_address.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_address.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** roadmap_address.c 27 Nov 2005 06:01:05 -0000 1.18 --- roadmap_address.c 13 Oct 2006 13:01:55 -0000 1.19 *************** *** 107,112 **** roadmap_dialog_hide (name); - roadmap_address_selected (name, data); if (context->selections != NULL) { free (context->selections); --- 107,115 ---- roadmap_dialog_hide (name); + /* Don't select anything "by default". If the user clicked on + * a choice, it will already have been selected. If they didn't, + * don't choose one for them. + */ if (context->selections != NULL) { free (context->selections); |
From: Paul F. <pg...@us...> - 2006-10-12 20:59:39
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv3411 Modified Files: buildmap_range.c buildmap_tiger.c roadmap_geocode.c roadmap_street.c roadmap_street.h Log Message: bring over editor branch changes to support reporting and searching on per-side address ranges. this includes a change to the sort order for ranges in buildmap_range.c. also, change buildmap_tiger.c to add roads which have no address range and no zipcode (but which do have a city). they're added to the range tables with a null range. (roads missing a city still go to the "noaddr" table.) some small changes in roadmap_street.c support the new inclusion of null ranges in the data. this makes searching for rural roads (which, at least in a place like NH, often don't have address/zip info) much more reliable. both of these changes require a rebuild of the maps to work properly, but roadmap will continue to function on the old maps (i.e., there's no schema change). Index: roadmap_street.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_street.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** roadmap_street.h 6 Feb 2006 06:41:13 -0000 1.10 --- roadmap_street.h 12 Oct 2006 20:58:38 -0000 1.11 *************** *** 39,44 **** typedef struct { ! unsigned int min; ! unsigned int max; } RoadMapStreetRange; --- 39,44 ---- typedef struct { ! unsigned int fradd; ! unsigned int toadd; } RoadMapStreetRange; *************** *** 47,51 **** typedef struct { ! RoadMapStreetRange range; int street; --- 47,52 ---- typedef struct { ! RoadMapStreetRange first_range; ! RoadMapStreetRange second_range; int street; *************** *** 145,149 **** void roadmap_street_get_street_range ! (const RoadMapStreetProperties *properties, int side, int *from, int *to); int roadmap_street_replace --- 146,150 ---- void roadmap_street_get_street_range ! (const RoadMapStreetProperties *properties, int range, int *from, int *to); int roadmap_street_replace Index: roadmap_geocode.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_geocode.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** roadmap_geocode.c 2 Jun 2006 23:10:23 -0000 1.6 --- roadmap_geocode.c 12 Oct 2006 20:58:38 -0000 1.7 *************** *** 66,71 **** } ! block_count = ! roadmap_street_blocks_by_city (street_name, city_name, blocks, 256); if (block_count <= 0) { --- 66,72 ---- } ! block_count = roadmap_street_blocks_by_city ! (street_name, city_name, ! blocks, ROADMAP_MAX_STREETS); if (block_count <= 0) { *************** *** 110,114 **** if (range_count > 0) { ! street_number[i] = ranges[0].min; for (k = 1; k < range_count; ++k) { --- 111,115 ---- if (range_count > 0) { ! street_number[i] = ranges[0].fradd; for (k = 1; k < range_count; ++k) { *************** *** 120,124 **** } blocks[cursor] = blocks[i]; ! street_number[cursor] = ranges[k].min; cursor += 1; } --- 121,125 ---- } blocks[cursor] = blocks[i]; ! street_number[cursor] = ranges[k].fradd; cursor += 1; } Index: roadmap_street.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_street.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** roadmap_street.c 25 Jun 2006 02:16:10 -0000 1.25 --- roadmap_street.c 12 Oct 2006 20:58:38 -0000 1.26 *************** *** 516,521 **** buffer[length] = 0; ! street->prefix = ! roadmap_dictionary_locate (RoadMapRangeActive->RoadMapStreetPrefix, buffer); --- 516,520 ---- buffer[length] = 0; ! street->prefix = roadmap_dictionary_locate (RoadMapRangeActive->RoadMapStreetPrefix, buffer); *************** *** 555,562 **** typemap = roadmap_street_type_to_abbrev(buffer, typemap); ! street->type = ! roadmap_dictionary_locate ! (RoadMapRangeActive->RoadMapStreetType, ! typemap ? typemap->abbrev : buffer); if (street->type > 0) --- 554,560 ---- typemap = roadmap_street_type_to_abbrev(buffer, typemap); ! street->type = roadmap_dictionary_locate ! (RoadMapRangeActive->RoadMapStreetType, ! typemap ? typemap->abbrev : buffer); if (street->type > 0) *************** *** 637,640 **** --- 635,652 ---- by_street->first_range + by_street->count_range; + if ((range_index == range_end) && (city < 0)) { + + blocks[count].street = i; + blocks[count].first = range_index; + blocks[count].count = 0; + + if (++count >= size) { + return count; + } + + continue; + } + + for (j = by_street->first_city; range_index < range_end; j++) { *************** *** 744,747 **** --- 756,760 ---- + #if NEEDED /* no callers, currently */ int roadmap_street_blocks_by_zip (const char *street_name, int zip, *************** *** 815,818 **** --- 828,832 ---- return count; } + #endif /* NEEDED ? */ *************** *** 852,862 **** if (total >= count) return total; ! if (fradd > toadd) { ! ranges->min = toadd; ! ranges->max = fradd; ! } else { ! ranges->min = fradd; ! ranges->max = toadd; ! } ranges += 1; total += 1; --- 866,871 ---- if (total >= count) return total; ! ranges->fradd = fradd; ! ranges->toadd = toadd; ranges += 1; total += 1; *************** *** 1299,1302 **** --- 1308,1365 ---- } + static int roadmap_street_check_other_side (int street, + int line, + int first_range) { + + int range_end; + RoadMapRange *range; + RoadMapRangeByStreet *by_street; + + + if (RoadMapRangeActive == NULL) return -1; + + range = RoadMapRangeActive->RoadMapAddr; + by_street = RoadMapRangeActive->RoadMapByStreet + street; + range_end = by_street->first_range + by_street->count_range; + + if (HAS_CONTINUATION ((range + first_range))) { + first_range++; + } + + first_range++; + + if (first_range >= range_end) return -1; + + if ((range[first_range].line & (~CONTINUATION_FLAG)) == (unsigned)line) { + return first_range; + } + + return -1; + } + + static void roadmap_street_extract_range (int range_index, + RoadMapStreetRange *range) { + + RoadMapRange *this_address = + &(RoadMapRangeActive->RoadMapAddr[range_index]); + + if (HAS_CONTINUATION(this_address)) { + + range->fradd = + ((unsigned int)(this_address->fradd) & 0xffff) + + (((unsigned int)(this_address[1].fradd) & 0xffff) << 16); + range->toadd = + ((unsigned int)(this_address->toadd) & 0xffff) + + (((unsigned int)(this_address[1].toadd) & 0xffff) << 16); + + } else { + + range->fradd = this_address->fradd; + range->toadd = this_address->toadd; + } + + } + + static int roadmap_street_get_city (int street, int range) { *************** *** 1680,1709 **** { ! RoadMapRange *this_address = ! &(RoadMapRangeActive->RoadMapAddr[range_index]); ! ! if (HAS_CONTINUATION(this_address)) { ! properties->range.min = ! ((int)(this_address->fradd) & 0xffff) ! + (((int)(this_address[1].fradd) & 0xffff) << 16); ! properties->range.max = ! ((int)(this_address->toadd) & 0xffff) ! + (((int)(this_address[1].toadd) & 0xffff) << 16); } else { ! ! properties->range.min = this_address->fradd; ! properties->range.max = this_address->toadd; ! } ! ! if (properties->range.min > properties->range.max) { ! ! int tmp = properties->range.min; ! ! properties->range.min = properties->range.max; ! properties->range.max = tmp; } } properties->city = roadmap_street_get_city (street, range_index); --- 1743,1761 ---- { ! int range_index2; ! roadmap_street_extract_range (range_index, &properties->first_range); + range_index2 = + roadmap_street_check_other_side (street, line, range_index); + if (range_index2 != -1) { + roadmap_street_extract_range + (range_index2, &properties->second_range); } else { ! properties->second_range.fradd = ! properties->second_range.toadd = 0; } } + properties->city = roadmap_street_get_city (street, range_index); *************** *** 1727,1737 **** static char RoadMapStreetAddress [32]; ! if (properties->range.min >= properties->range.max) { return ""; } ! sprintf (RoadMapStreetAddress, ! "%d - %d", properties->range.min, properties->range.max); return RoadMapStreetAddress; --- 1779,1815 ---- static char RoadMapStreetAddress [32]; + unsigned int min; + unsigned int max; ! if (properties->first_range.fradd == 0 && ! properties->first_range.toadd == 0) { return ""; } ! if (properties->first_range.fradd > properties->first_range.toadd) { ! min = properties->first_range.toadd; ! max = properties->first_range.fradd; ! } else { ! min = properties->first_range.fradd; ! max = properties->first_range.toadd; ! } ! ! if (properties->second_range.fradd != 0) { ! ! if (properties->second_range.fradd < min) { ! min = properties->second_range.fradd; ! } ! if (properties->second_range.fradd > max) { ! max = properties->second_range.fradd; ! } ! if (properties->second_range.toadd < min) { ! min = properties->second_range.toadd; ! } ! if (properties->second_range.toadd > max) { ! max = properties->second_range.toadd; ! } ! } ! ! sprintf (RoadMapStreetAddress, "%d - %d", min, max); return RoadMapStreetAddress; *************** *** 1747,1750 **** --- 1825,1829 ---- RoadMapStreet *this_street; + RoadMapStreetName[0] = 0; if (properties->street < 0) { *************** *** 1755,1760 **** this_street = RoadMapStreetActive->RoadMapStreets + properties->street; - RoadMapStreetName[0] = 0; roadmap_street_append --- 1834,1843 ---- this_street = RoadMapStreetActive->RoadMapStreets + properties->street; + + if (this_street->fename == 0) { + + return ""; + } roadmap_street_append *************** *** 1806,1809 **** --- 1889,1893 ---- const char *address; const char *city; + const char *streetname; *************** *** 1814,1824 **** address = roadmap_street_get_street_address (properties); city = roadmap_street_get_city_name (properties); snprintf (RoadMapStreetName, sizeof(RoadMapStreetName), "%s%s%s%s%s", address, ! (address[0])? " " : "", ! roadmap_street_get_street_name (properties), ! (city[0])? ", " : "", city); --- 1898,1909 ---- address = roadmap_street_get_street_address (properties); city = roadmap_street_get_city_name (properties); + streetname = roadmap_street_get_street_name (properties); snprintf (RoadMapStreetName, sizeof(RoadMapStreetName), "%s%s%s%s%s", address, ! (address[0]) ? " " : "", ! (streetname[0]) ? streetname : "?", ! (city[0]) ? ", " : "", city); *************** *** 1928,1936 **** void roadmap_street_get_street_range ! (const RoadMapStreetProperties *properties, int side, int *from, int *to) { ! //FIXME find real street range numbers according to requested side ! *from = properties->range.min; ! *to = properties->range.max; } --- 2013,2029 ---- void roadmap_street_get_street_range ! (const RoadMapStreetProperties *properties, int range, int *from, int *to) { ! if (range == 1) { ! *from = properties->first_range.fradd; ! *to = properties->first_range.toadd; ! ! } else if (range == 2) { ! *from = properties->second_range.fradd; ! *to = properties->second_range.toadd; ! ! } else { ! roadmap_log (ROADMAP_ERROR, "Illegal range number: %d", range); ! } } Index: buildmap_range.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_range.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** buildmap_range.c 11 Feb 2006 03:44:07 -0000 1.11 --- buildmap_range.c 12 Oct 2006 20:58:38 -0000 1.12 *************** *** 392,414 **** - static void buildmap_range_print (FILE *file, int index) { - - BuildMapRange *this_range; - BuildMapDictionary cities = buildmap_dictionary_open ("city"); - - this_range = Range[index/BUILDMAP_BLOCK] + (index % BUILDMAP_BLOCK); - - fprintf (file, "%d to %d ", this_range->fradd, this_range->toadd); - - buildmap_street_print_sorted (file, this_range->street); - - fprintf (file, ", city %s, zip %d, line %d\n", - buildmap_dictionary_get (cities, this_range->city), - buildmap_zip_get_zip_code (this_range->zip), - buildmap_line_get_id_sorted - (this_range->line & (~ CONTINUATION_FLAG))); - } - - static int buildmap_range_compare (const void *r1, const void *r2) { --- 392,395 ---- *************** *** 421,430 **** BuildMapRange *record2; - int lowaddr1; - int lowaddr2; - int highaddr1; - int highaddr2; - - record1 = Range[i1/BUILDMAP_BLOCK] + (i1 % BUILDMAP_BLOCK); record2 = Range[i2/BUILDMAP_BLOCK] + (i2 % BUILDMAP_BLOCK); --- 402,405 ---- *************** *** 442,474 **** } ! if (record1->fradd < record1->toadd) { ! lowaddr1 = record1->fradd; ! highaddr1 = record1->toadd; ! } else { ! lowaddr1 = record1->toadd; ! highaddr1 = record1->fradd; ! } ! ! if (record2->fradd < record2->toadd) { ! lowaddr2 = record2->fradd; ! highaddr2 = record2->toadd; ! } else { ! lowaddr2 = record2->toadd; ! highaddr2 = record2->fradd; ! } ! ! result = lowaddr1 - lowaddr2; ! ! if (result != 0) { ! return result; ! } ! ! result = highaddr1 - highaddr2; ! ! if (result != 0) { ! return result; ! } ! ! result = record1->zip - record2->zip; if (result != 0) { --- 417,423 ---- } ! result = ! buildmap_line_get_sorted (record1->line & (~ CONTINUATION_FLAG)) - ! buildmap_line_get_sorted (record2->line & (~ CONTINUATION_FLAG)); if (result != 0) { *************** *** 476,492 **** } ! if ((record2->line & CONTINUATION_FLAG) == ! (record1->line & CONTINUATION_FLAG)) { ! ! fprintf (stderr, "range conflict:\n"); ! buildmap_range_print (stderr, i1); ! buildmap_range_print (stderr, i2); ! } ! ! if ((record2->line & CONTINUATION_FLAG) == 0) { ! return -1; /* High order 16 bits last. */ ! } ! return 1; /* Low order 16 bits first. */ } --- 425,431 ---- } ! /* Preserve the order of range insertion */ ! return i1 - i2; } Index: buildmap_tiger.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_tiger.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** buildmap_tiger.c 19 Aug 2006 16:01:31 -0000 1.14 --- buildmap_tiger.c 12 Oct 2006 20:58:38 -0000 1.15 *************** *** 576,580 **** } else { ! buildmap_range_add_no_address (line, street); } --- 576,603 ---- } else { ! RoadMapString cityl; ! RoadMapString cityr; ! int added = 0; ! ! /* NB -- no place support here. the use of places is ! * disabled in roadmap currently anyway. ! */ ! ! cityl = buildmap_city_get_name (tiger2int (cursor, 141, 145)); ! if (cityl > 0) { ! buildmap_range_add (line, street, 0, 0, 0, cityl); ! added = 1; ! } ! ! cityr = buildmap_city_get_name (tiger2int (cursor, 146, 150)); ! if (cityr > 0 && cityr != cityl) { ! buildmap_range_add (line, street, 0, 0, 0, cityr); ! added = 1; ! } ! ! if (!added) { ! /* no zip, no city -- fallback list */ ! buildmap_range_add_no_address (line, street); ! } } *************** *** 755,765 **** fips = tiger2int (cursor, 15, 19); ! if (cursor[10] == 'C') { ! year = 2000; ! } else if (cursor[10] == 'E') { ! year = 2002; ! } else { ! year = tiger2int (cursor, 11, 14); ! } if (fips > 0) { --- 778,788 ---- fips = tiger2int (cursor, 15, 19); ! if (cursor[10] == 'C') { ! year = 2000; ! } else if (cursor[10] == 'E') { ! year = 2002; ! } else { ! year = tiger2int (cursor, 11, 14); ! } if (fips > 0) { |
From: Ehud S. <esh...@us...> - 2006-10-12 17:58:35
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv24377 Modified Files: buildmap_postgres.c Log Message: Filter out negative street ranges. Index: buildmap_postgres.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_postgres.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** buildmap_postgres.c 8 Oct 2006 19:59:50 -0000 1.12 --- buildmap_postgres.c 12 Oct 2006 17:58:31 -0000 1.13 *************** *** 319,323 **** const char *toaddr = PQgetvalue(db_result, irec, column++); ! if (fraddl[0] && fraddr[0]) { buildmap_range_add --- 319,325 ---- const char *toaddr = PQgetvalue(db_result, irec, column++); ! if (fraddl[0] && fraddr[0] && ! (atoi(fraddr) >= 0) && (atoi(toaddr) >= 0) && ! (atoi(fraddl) >= 0) && (atoi(toaddl) >= 0)) { buildmap_range_add |
From: Ehud S. <esh...@us...> - 2006-10-12 17:57:54
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23987 Modified Files: buildmap_empty.c Log Message: Fix parameters parsing bug. Index: buildmap_empty.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_empty.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** buildmap_empty.c 12 Dec 2005 20:35:41 -0000 1.3 --- buildmap_empty.c 12 Oct 2006 17:57:48 -0000 1.4 *************** *** 63,67 **** itr++; } ! num[i+1] = '\0'; points[j] = (int) (atof(num) * 1000000); } --- 63,67 ---- itr++; } ! num[i] = '\0'; points[j] = (int) (atof(num) * 1000000); } |
From: Paul F. <pg...@us...> - 2006-10-12 13:05:12
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4600 Modified Files: roadmap_display.c Log Message: add ifdefed support for displaying "signs" using internal linefont. this is really only needed because we don't have proper fontsize control for the system font, and i really need a bigger font for the dynamic screen data. it should be cleaned up though -- perhaps a unified interface for selecting font (system or internal), color, and size. Index: roadmap_display.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_display.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** roadmap_display.c 16 Aug 2006 13:59:59 -0000 1.27 --- roadmap_display.c 12 Oct 2006 13:05:06 -0000 1.28 *************** *** 39,42 **** --- 39,43 ---- #include "roadmap_street.h" #include "roadmap_config.h" + #include "roadmap_linefont.h" #include "roadmap_canvas.h" #include "roadmap_message.h" *************** *** 47,50 **** --- 48,52 ---- #include "roadmap_display.h" + #define ROADMAP_DISPLAY_SIGN_SIZE 20 static char *RoadMapDisplayPage = NULL; *************** *** 179,182 **** --- 181,187 ---- RoadMapMessageContour = roadmap_canvas_create_pen ("message.contour"); roadmap_canvas_set_foreground ("black"); + #ifdef ROADMAP_USE_LINEFONT_FOR_SIGNS + roadmap_canvas_set_thickness (2); + #endif RoadMapConsoleBackground = *************** *** 233,238 **** --- 238,249 ---- *p1 = 0; + #ifdef ROADMAP_USE_LINEFONT_FOR_SIGNS + roadmap_linefont_text + (text_line, ROADMAP_CANVAS_LEFT|ROADMAP_CANVAS_TOP, + position, ROADMAP_DISPLAY_SIGN_SIZE, 0); + #else roadmap_canvas_draw_string (position, ROADMAP_CANVAS_LEFT|ROADMAP_CANVAS_TOP, text_line); + #endif *p1 = saved; *************** *** 243,248 **** --- 254,265 ---- } + #ifdef ROADMAP_USE_LINEFONT_FOR_SIGNS + roadmap_linefont_text + (text_line, ROADMAP_CANVAS_LEFT|ROADMAP_CANVAS_TOP, + position, ROADMAP_DISPLAY_SIGN_SIZE, 0); + #else roadmap_canvas_draw_string (position, ROADMAP_CANVAS_LEFT|ROADMAP_CANVAS_TOP, text_line); + #endif } *************** *** 285,290 **** --- 302,312 ---- roadmap_log_push ("roadmap_display_sign"); + #ifdef ROADMAP_USE_LINEFONT_FOR_SIGNS + roadmap_linefont_extents + (sign->content, ROADMAP_DISPLAY_SIGN_SIZE, &width, &ascent, &descent); + #else roadmap_canvas_get_text_extents (sign->content, -1, &width, &ascent, &descent, NULL); + #endif width += 8; /* Keep some room around the text. */ *************** *** 582,586 **** if (!format || !format[0]) ! return; if (! roadmap_message_format (text, sizeof(text), format)) { --- 604,608 ---- if (!format || !format[0]) ! return; if (! roadmap_message_format (text, sizeof(text), format)) { *************** *** 588,592 **** --- 610,619 ---- } + #ifdef ROADMAP_USE_LINEFONT_FOR_SIGNS + roadmap_linefont_extents (text, ROADMAP_DISPLAY_SIGN_SIZE, + &width, &ascent, &descent); + #else roadmap_canvas_get_text_extents (text, -1, &width, &ascent, &descent, NULL); + #endif if (corner & ROADMAP_CANVAS_RIGHT) { *************** *** 594,603 **** frame[0].x = frame[2].x - width - 6; } else { ! if (corner & ROADMAP_CANVAS_BOTTOM) { frame[0].x = 5; ! } else { /* leave room for compass */ frame[0].x = 45; ! } ! frame[2].x = frame[0].x + width + 6; } frame[1].x = frame[0].x; --- 621,630 ---- frame[0].x = frame[2].x - width - 6; } else { ! if (corner & ROADMAP_CANVAS_BOTTOM) { frame[0].x = 5; ! } else { /* leave room for compass */ frame[0].x = 45; ! } ! frame[2].x = frame[0].x + width + 6; } frame[1].x = frame[0].x; *************** *** 624,630 **** --- 651,663 ---- frame[0].y = frame[3].y + 3; + #ifdef ROADMAP_USE_LINEFONT_FOR_SIGNS + roadmap_linefont_text + (text, ROADMAP_CANVAS_RIGHT|ROADMAP_CANVAS_TOP, + frame, ROADMAP_DISPLAY_SIGN_SIZE, 0); + #else roadmap_canvas_draw_string (frame, ROADMAP_CANVAS_RIGHT|ROADMAP_CANVAS_TOP, text); + #endif } |
From: Paul F. <pg...@us...> - 2006-10-12 13:02:40
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4169 Modified Files: roadmap_label.c Log Message: add some disabled debug support for labels. Index: roadmap_label.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_label.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** roadmap_label.c 24 Aug 2006 15:29:34 -0000 1.18 --- roadmap_label.c 12 Oct 2006 13:01:49 -0000 1.19 *************** *** 83,86 **** --- 83,89 ---- PluginStreet street; char *text; + #if LABEL_USING_LINEID + char *otext; + #endif RoadMapGuiPoint text_point; /* label point */ *************** *** 472,475 **** --- 475,479 ---- sprintf(buf, "%d", cPtr->line.line_id); cPtr->text = strdup(buf); + cPtr->otext = strdup(properties.street); #else cPtr->text = strdup(properties.street); *************** *** 500,503 **** --- 504,508 ---- /* text is too long for this feature */ /* (4 times longer than feature) */ + // roadmap_log (ROADMAP_WARNING, "%s t: %s, w: %d, fsq: %d, ang: %d", cPtr->otext, cPtr->text, width, cPtr->featuresize_sq, cPtr->angle); if ((width * width / 16) > cPtr->featuresize_sq) { /* Keep this one in the cache as the feature size may change *************** *** 581,585 **** /* street already labelled */ if(roadmap_plugin_same_street(&cPtr->street, &ocPtr->street)) { ! cannot_label++; /* label is a duplicate */ break; } --- 586,590 ---- /* street already labelled */ if(roadmap_plugin_same_street(&cPtr->street, &ocPtr->street)) { ! cannot_label = 1; /* label is a duplicate */ break; } *************** *** 591,595 **** /* if labels are horizontal, bbox check is sufficient */ if(!angles) { ! cannot_label++; break; } --- 596,600 ---- /* if labels are horizontal, bbox check is sufficient */ if(!angles) { ! cannot_label = 2; break; } *************** *** 601,605 **** aang = abs(cPtr->angle); if (aang < 4 || aang > 86) { ! cannot_label++; break; } --- 606,610 ---- aang = abs(cPtr->angle); if (aang < 4 || aang > 86) { ! cannot_label = 3; break; } *************** *** 607,611 **** aang = abs(ocPtr->angle); if (aang < 4 || aang > 86) { ! cannot_label++; break; } --- 612,616 ---- aang = abs(ocPtr->angle); if (aang < 4 || aang > 86) { ! cannot_label = 4; break; } *************** *** 613,617 **** /* otherwise we do the full poly check */ if (poly_overlap (ocPtr, cPtr)) { ! cannot_label++; break; } --- 618,622 ---- /* otherwise we do the full poly check */ if (poly_overlap (ocPtr, cPtr)) { ! cannot_label = 5; break; } *************** *** 623,626 **** --- 628,632 ---- * run. Keeping it is cheaper than looking it up again. */ + // roadmap_log (ROADMAP_WARNING, "XX: %d, %s t: %s, w: %d, fsq: %d, ang: %d", cannot_label, cPtr->otext, cPtr->text, width, cPtr->featuresize_sq, cPtr->angle); roadmap_list_append (&undrawn_labels, roadmap_list_remove(&cPtr->link)); *************** *** 628,631 **** --- 634,638 ---- } + // roadmap_log (ROADMAP_WARNING, "KK: %s t: %s, w: %d, fsq: %d, ang: %d", cPtr->otext, cPtr->text, width, cPtr->featuresize_sq, cPtr->angle); roadmap_label_draw_text (cPtr->text, &cPtr->text_point, &cPtr->center_point, |
From: Ehud S. <esh...@us...> - 2006-10-08 20:05:27
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22253 Modified Files: roadmap_main.cpp Log Message: indent Index: roadmap_main.cpp =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/roadmap_main.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** roadmap_main.cpp 17 Sep 2006 20:42:59 -0000 1.20 --- roadmap_main.cpp 8 Oct 2006 20:05:20 -0000 1.21 *************** *** 894,901 **** #endif ! #ifdef FREEMAP_IL editor_main_check_map (); editor_main_set (1); ! #endif } --- 894,901 ---- #endif ! #ifdef FREEMAP_IL editor_main_check_map (); editor_main_set (1); ! #endif } |
From: Ehud S. <esh...@us...> - 2006-10-08 20:04:45
|
Update of /cvsroot/roadmap/roadmap_editor/src/gtk2 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21840 Modified Files: Makefile roadmap_main.c Log Message: Add FreeMap build. Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/gtk2/Makefile,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile 5 Jun 2006 09:19:54 -0000 1.8 --- Makefile 8 Oct 2006 20:04:42 -0000 1.9 *************** *** 56,59 **** --- 56,66 ---- endif + RUNTIME=gtkroadmap gtkroadgps + + ifeq ($(FREEMAP_IL),YES) + CFLAGS += -DFREEMAP_IL + RUNTIME=gtkroadmap + endif + CXXFLAGS = $(CFLAGS) -I/usr/include/agg2 -I/usr/include/freetype2 -I/usr/include/fribidi # --- RoadMap sources & targets ----------------------------------- *************** *** 66,71 **** RMLIBOBJS=$(RMLIBSRCS:.c=.o) roadmap_canvas_agg.o ../agg/roadmap_canvas.o ../agg/font_freetype/agg_font_freetype.o - RUNTIME=gtkroadgps gtkroadmap - # --- Conventional targets ---------------------------------------- --- 73,76 ---- Index: roadmap_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/gtk2/roadmap_main.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** roadmap_main.c 4 Sep 2006 06:54:03 -0000 1.4 --- roadmap_main.c 8 Oct 2006 20:04:42 -0000 1.5 *************** *** 45,48 **** --- 45,49 ---- #include "roadmap_gtkcanvas.h" #include "roadmap_gtkmain.h" + #include "../editor/editor_main.h" #include "roadmap_main.h" *************** *** 251,254 **** --- 252,259 ---- } RoadMapMainTitle = strdup (title); + #ifdef FREEMAP_IL + editor_main_check_map (); + editor_main_set (1); + #endif } |
From: Ehud S. <esh...@us...> - 2006-10-08 20:02:50
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/track In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20973 Modified Files: editor_track_util.c Log Message: Fix log message. Index: editor_track_util.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_util.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** editor_track_util.c 9 Aug 2006 07:30:27 -0000 1.13 --- editor_track_util.c 8 Oct 2006 20:02:46 -0000 1.14 *************** *** 1070,1074 **** if (gps_first_point == gps_last_point) { ! editor_log (ROADMAP_ERROR, "first point == gps_last_point"); editor_log_pop (); return -1; --- 1070,1074 ---- if (gps_first_point == gps_last_point) { ! editor_log (ROADMAP_ERROR, "first point == last_point"); editor_log_pop (); return -1; |
From: Ehud S. <esh...@us...> - 2006-10-08 20:02:17
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/export In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20885 Modified Files: editor_export.c Log Message: Fix counting bug. Index: editor_export.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/export/editor_export.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** editor_export.c 18 Aug 2006 17:45:33 -0000 1.16 --- editor_export.c 8 Oct 2006 20:02:13 -0000 1.17 *************** *** 612,616 **** int fips; int exported; ! int estimated_lines; stream.type = NULL_STREAM; --- 612,616 ---- int fips; int exported; ! int estimated_exports; stream.type = NULL_STREAM; *************** *** 681,685 **** export_markers (&stream, name); ! estimated_lines = editor_line_get_count (); exported = 0; while (trkseg != -1) { --- 681,685 ---- export_markers (&stream, name); ! estimated_exports = editor_trkseg_get_count (); exported = 0; while (trkseg != -1) { *************** *** 773,778 **** next_trkseg: ! if (exported < estimated_lines) exported++; ! if (callbacks) (*callbacks->progress) (85 * exported / estimated_lines); trkseg = editor_trkseg_next_in_global (trkseg); } --- 773,778 ---- next_trkseg: ! if (exported < estimated_exports) exported++; ! if (callbacks) (*callbacks->progress) (85 * exported / estimated_exports); trkseg = editor_trkseg_next_in_global (trkseg); } |
From: Ehud S. <esh...@us...> - 2006-10-08 20:01:37
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/db In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20476 Modified Files: editor_trkseg.c editor_trkseg.h Log Message: Add count method. Index: editor_trkseg.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/db/editor_trkseg.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** editor_trkseg.c 17 Jul 2006 06:31:33 -0000 1.7 --- editor_trkseg.c 8 Oct 2006 20:01:34 -0000 1.8 *************** *** 547,548 **** --- 547,558 ---- } + int editor_trkseg_get_count (void) { + + int count = ActiveTrksegDB->header.last_global_trkseg - + ActiveTrksegDB->header.next_export; + + if (count < 0) count = 0; + + return count; + } + Index: editor_trkseg.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/db/editor_trkseg.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** editor_trkseg.h 23 Apr 2006 13:22:44 -0000 1.3 --- editor_trkseg.h 8 Oct 2006 20:01:34 -0000 1.4 *************** *** 102,105 **** --- 102,106 ---- int editor_trkseg_get_next_export (void); void editor_trkseg_set_next_export (int id); + int editor_trkseg_get_count (void); extern roadmap_db_handler EditorTrksegHandler; |
From: Ehud S. <esh...@us...> - 2006-10-08 20:01:14
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/db In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20422 Modified Files: editor_db.c Log Message: Add some logging. Index: editor_db.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/db/editor_db.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** editor_db.c 3 Sep 2006 18:08:26 -0000 1.8 --- editor_db.c 8 Oct 2006 20:01:08 -0000 1.9 *************** *** 229,235 **** (editor_db_section *section, int block_id) { ! if (section->max_blocks == block_id) return -1; if (ActiveDBHeader->num_used_blocks == ActiveDBHeader->num_total_blocks) { return -1; } --- 229,242 ---- (editor_db_section *section, int block_id) { ! if (section->max_blocks == block_id) { ! editor_log (ROADMAP_ERROR, ! "editor_db_allocate_new_block - reached max section blocks."); ! return -1; ! } ! if (ActiveDBHeader->num_used_blocks == ActiveDBHeader->num_total_blocks) { + editor_log (ROADMAP_ERROR, + "editor_db_allocate_new_block - no free blocks, need to grow."); return -1; } *************** *** 769,772 **** --- 776,783 ---- char path[100]; + editor_log (ROADMAP_ERROR, "editor_db_grow - total:%d used:%d.", + ActiveDBHeader->num_total_blocks, + ActiveDBHeader->num_used_blocks); + /* NOTE that after the call to editor_db_remove(), * ActiveDBHeader pointer becomes invalid. |
From: Ehud S. <esh...@us...> - 2006-10-08 20:00:12
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19966 Modified Files: roadmap_log.c Log Message: indent Index: roadmap_log.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_log.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** roadmap_log.c 17 Mar 2006 09:49:22 -0000 1.4 --- roadmap_log.c 8 Oct 2006 20:00:08 -0000 1.5 *************** *** 119,127 **** va_list ap) { ! int i; ! #ifndef _WIN32 time_t now; ! struct tm *tms; time (&now); --- 119,127 ---- va_list ap) { ! int i; ! #ifndef _WIN32 time_t now; ! struct tm *tms; time (&now); *************** *** 130,143 **** fprintf (file, "%d:%d:%d %c%s %s, line %d ", tms->tm_hour, tms->tm_min, tms->tm_sec, ! saved, category->prefix, source, line); ! #else ! ! SYSTEMTIME st; ! GetSystemTime(&st); ! ! fprintf (file, "%d/%d %d:%d:%d %c%s %s, line %d ", ! st.wDay, st.wMonth, st.wHour, st.wMinute, st.wSecond, ! saved, category->prefix, source, line); ! #endif if (!category->show_stack && (RoadMapLogStackCursor > 0)) { --- 130,143 ---- fprintf (file, "%d:%d:%d %c%s %s, line %d ", tms->tm_hour, tms->tm_min, tms->tm_sec, ! saved, category->prefix, source, line); ! #else ! ! SYSTEMTIME st; ! GetSystemTime(&st); ! ! fprintf (file, "%d/%d %d:%d:%d %c%s %s, line %d ", ! st.wDay, st.wMonth, st.wHour, st.wMinute, st.wSecond, ! saved, category->prefix, source, line); ! #endif if (!category->show_stack && (RoadMapLogStackCursor > 0)) { *************** *** 169,176 **** if (level < roadmap_verbosity()) return; ! ! #ifdef DEBUG ! return; ! #endif debug = roadmap_debug(); --- 169,176 ---- if (level < roadmap_verbosity()) return; ! ! #ifdef DEBUG ! return; ! #endif debug = roadmap_debug(); |
From: Ehud S. <esh...@us...> - 2006-10-08 19:59:54
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19575 Modified Files: buildmap_postgres.c Log Message: Bound the area of the map creation. Index: buildmap_postgres.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_postgres.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** buildmap_postgres.c 9 Aug 2006 06:58:58 -0000 1.11 --- buildmap_postgres.c 8 Oct 2006 19:59:50 -0000 1.12 *************** *** 68,73 **** /* ROADS */ ! static const char *roads_sql = "SELECT segments.id AS id, AsText(simplify(segments.the_geom, 0.00002)) AS the_geom, segments.road_type AS layer, segments.from_node AS from_node_id, segments.to_node AS to_node_id, streets.name AS street_name, streets.text2speech as text2speech, cities.name as city_name, fraddl, toaddl, fraddr, toaddr FROM segments LEFT JOIN streets ON segments.street_id = streets.id LEFT JOIN cities ON streets.city_id = cities.id;"; ! static const char *roads_route_sql = "SELECT segments.id AS id, segments.from_car_allowed AS from_car_allowed, segments.to_car_allowed AS to_car_allowed, segments.from_max_speed AS from_max_speed, segments.to_max_speed AS to_max_speed, segments.from_cross_time AS from_cross_time, segments.to_cross_time AS to_cross_time, segments.road_type AS layer FROM segments;"; static const char *country_borders_sql = "SELECT id AS id, AsText(simplify(the_geom, 0.00002)) AS the_geom FROM borders;"; static const char *water_sql = "SELECT id AS id, AsText(simplify(the_geom, 0.00002)) AS the_geom FROM water;"; --- 68,73 ---- /* ROADS */ ! static const char *roads_sql = "SELECT segments.id AS id, AsText(simplify(segments.the_geom, 0.00002)) AS the_geom, segments.road_type AS layer, segments.from_node AS from_node_id, segments.to_node AS to_node_id, streets.name AS street_name, streets.text2speech as text2speech, cities.name as city_name, fraddl, toaddl, fraddr, toaddr FROM segments LEFT JOIN streets ON segments.street_id = streets.id LEFT JOIN cities ON streets.city_id = cities.id WHERE segments.the_geom @ SetSRID ('BOX3D(34 29.2, 36.2 33.6)'::box3d, 4326);"; ! static const char *roads_route_sql = "SELECT segments.id AS id, segments.from_car_allowed AS from_car_allowed, segments.to_car_allowed AS to_car_allowed, segments.from_max_speed AS from_max_speed, segments.to_max_speed AS to_max_speed, segments.from_cross_time AS from_cross_time, segments.to_cross_time AS to_cross_time, segments.road_type AS layer FROM segments WHERE segments.the_geom @ SetSRID ('BOX3D(34 29.2, 36.2 33.6)'::box3d, 4326);"; static const char *country_borders_sql = "SELECT id AS id, AsText(simplify(the_geom, 0.00002)) AS the_geom FROM borders;"; static const char *water_sql = "SELECT id AS id, AsText(simplify(the_geom, 0.00002)) AS the_geom FROM water;"; |
From: Paul F. <pg...@us...> - 2006-10-05 15:45:33
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv3380 Modified Files: roadmap_trip.c Log Message: make initial setting of "show inactive routes" a configurable preference Index: roadmap_trip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.c,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** roadmap_trip.c 4 Oct 2006 20:25:03 -0000 1.66 --- roadmap_trip.c 5 Oct 2006 15:45:25 -0000 1.67 *************** *** 62,65 **** --- 62,68 ---- ROADMAP_CONFIG_ITEM("Display", "Rotate"); + static RoadMapConfigDescriptor RoadMapConfigTripShowInactiveRoutes = + ROADMAP_CONFIG_ITEM("Trip", "Show Inactive Routes"); + static RoadMapConfigDescriptor RoadMapConfigTripShowRouteLines = ROADMAP_CONFIG_ITEM("Trip", "Connect Route Points"); *************** *** 98,102 **** static RoadMapPen RoadMapTripRouteLinesPen = NULL; static int RoadMapTripDrawingActiveRoute; ! static int RoadMapTripShowInactiveRoutes = 0; typedef struct roadmap_trip_focal { --- 101,105 ---- static RoadMapPen RoadMapTripRouteLinesPen = NULL; static int RoadMapTripDrawingActiveRoute; ! static int RoadMapTripShowInactiveRoutes; typedef struct roadmap_trip_focal { *************** *** 1966,1973 **** --- 1969,1981 ---- roadmap_config_declare_enumeration + ("preferences", &RoadMapConfigTripShowInactiveRoutes, "yes", "no", NULL); + + roadmap_config_declare_enumeration ("preferences", &RoadMapConfigTripShowRouteLines, "yes", "no", NULL); roadmap_config_declare ("preferences", &RoadMapConfigTripRouteLineColor, "red"); + RoadMapTripShowInactiveRoutes = + roadmap_config_match (&RoadMapConfigTripShowInactiveRoutes, "yes"); } |
From: Paul F. <pg...@us...> - 2006-10-04 20:25:13
|
Update of /cvsroot/roadmap/roadmap/src/gpx In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21403/gpx Modified Files: defs.h gpx.c waypt.c Log Message: implement smaller version of the waypoint struct (20 bytes vs. 52 bytes) for the benefit of roadmap_features.c. this reduces the memory impact of long points-of-interest lists. Index: defs.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/gpx/defs.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** defs.h 4 Oct 2006 14:56:58 -0000 1.4 --- defs.h 4 Oct 2006 20:25:04 -0000 1.5 *************** *** 259,262 **** --- 259,276 ---- } waypoint; + /* + * Smaller version of the waypoint structure with minimal + * attributes. Used only for the read-only feature lists. If + * something like this were used for standard waypoints, we'd + * risk losing data when reading from and then writing back to an + * XML file -- the full waypoint structure has the ability to + * preserve any XML data we don't specifically use or support. + */ + typedef struct { + queue Q; + RoadMapPosition pos; + char *name; + } weepoint; + typedef struct { queue Q; /* Link onto parent list. */ *************** *** 280,283 **** --- 294,301 ---- } bounds; + void weept_add (queue_head *q, weepoint *); + weepoint * weept_new(void); + void weept_free (weepoint *); + typedef void (*waypt_cb) (const waypoint *); typedef void (*route_hdr)(const route_head *); *************** *** 411,415 **** int gpx_write( FILE *ofd, queue_head *w, queue_head *r, queue_head *t); ! int gpx_read(FILE *ifile, queue_head *w, queue_head *r, queue_head *t); time_t xml_parse_time( const char *cdatastr ); --- 429,433 ---- int gpx_write( FILE *ofd, queue_head *w, queue_head *r, queue_head *t); ! int gpx_read(FILE *ifile, queue_head *w, int wee, queue_head *r, queue_head *t); time_t xml_parse_time( const char *cdatastr ); Index: waypt.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/gpx/waypt.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** waypt.c 2 Oct 2006 14:20:20 -0000 1.3 --- waypt.c 4 Oct 2006 20:25:04 -0000 1.4 *************** *** 78,85 **** } void waypt_add(queue_head *qh, waypoint *wpt) { - static int waypt_index; ENQUEUE_TAIL(qh, &wpt->Q); waypt_index++; --- 78,86 ---- } + static int waypt_index; + void waypt_add(queue_head *qh, waypoint *wpt) { ENQUEUE_TAIL(qh, &wpt->Q); waypt_index++; *************** *** 113,116 **** --- 114,130 ---- void + weept_add(queue_head *qh, weepoint *wpt) + { + ENQUEUE_TAIL(qh, &wpt->Q); + waypt_index++; + + if (*wpt->name == '\0') { + char cbuf[10]; + snprintf(cbuf, sizeof(cbuf), "WPT%03d", waypt_index); + wpt->name = xstrdup(cbuf); + } + } + + void waypt_del(waypoint *wpt) { *************** *** 138,141 **** --- 152,161 ---- } + weepoint * + weept_new(void) + { + return (weepoint *) xcalloc(sizeof (weepoint), 1); + } + void waypt_iterator(queue_head *qh, waypt_cb cb) *************** *** 274,277 **** --- 294,307 ---- void + weept_free( weepoint *wpt ) + { + if (wpt->name) { + xfree(wpt->name); + } + + xfree(wpt); + } + + void waypt_flush_queue( queue_head *qh ) { Index: gpx.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/gpx/gpx.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** gpx.c 4 Oct 2006 14:56:58 -0000 1.8 --- gpx.c 4 Oct 2006 20:25:04 -0000 1.9 *************** *** 44,47 **** --- 44,49 ---- static char *xsi_schema_loc = NULL; + static int reading_weepoints; + static int gpx_synthesize_shortnames = 0; *************** *** 758,765 **** #endif // ROADMAP_UNNEEDED case tt_wpt: ! if (doing_no_waypoints) waypt_free(wpt_tmp); ! else waypt_add(cur_waypoint_list, wpt_tmp); logpoint_ct = 0; cur_tag = NULL; --- 760,779 ---- #endif // ROADMAP_UNNEEDED case tt_wpt: ! if (doing_no_waypoints) { waypt_free(wpt_tmp); ! } else if (reading_weepoints) { ! /* copy the minimal info from waypoint to weepoint, ! * and discard the temporary waypoint ! */ ! weepoint *weept = weept_new(); ! weept->pos = wpt_tmp->pos; ! if (wpt_tmp->shortname) { ! weept->name = strdup(wpt_tmp->shortname); ! } ! weept_add(cur_waypoint_list, weept); ! waypt_free(wpt_tmp); ! } else { waypt_add(cur_waypoint_list, wpt_tmp); + } logpoint_ct = 0; cur_tag = NULL; *************** *** 975,1000 **** return; ! if ( cur_tag->child ) { ! tmp_tag = cur_tag->child; ! while ( tmp_tag->sibling ) { ! tmp_tag = tmp_tag->sibling; ! } ! cdata = &(tmp_tag->parentcdata); ! cdatalen = &(tmp_tag->parentcdatalen); ! } ! else { ! cdata = &(cur_tag->cdata); ! cdatalen = &(cur_tag->cdatalen); ! } ! estr = *cdata; ! *cdata = xcalloc( *cdatalen + len + 1, 1); ! if ( estr ) { ! memcpy( *cdata, estr, *cdatalen); ! xfree( estr ); } ! estr = *cdata + *cdatalen; ! memcpy( estr, s, len ); ! *(estr+len) = '\0'; ! *cdatalen += len; } --- 989,1013 ---- return; ! if ( cur_tag->child ) { ! tmp_tag = cur_tag->child; ! while ( tmp_tag->sibling ) { ! tmp_tag = tmp_tag->sibling; } ! cdata = &(tmp_tag->parentcdata); ! cdatalen = &(tmp_tag->parentcdatalen); ! } else { ! cdata = &(cur_tag->cdata); ! cdatalen = &(cur_tag->cdatalen); ! } ! estr = *cdata; ! *cdata = xcalloc( *cdatalen + len + 1, 1); ! if ( estr ) { ! memcpy( *cdata, estr, *cdatalen); ! xfree( estr ); ! } ! estr = *cdata + *cdatalen; ! memcpy( estr, s, len ); ! *(estr+len) = '\0'; ! *cdatalen += len; } *************** *** 1074,1078 **** int ! gpx_read(FILE *ifile, queue_head *wq, queue_head *rq, queue_head *tq) { int len; --- 1087,1091 ---- int ! gpx_read(FILE *ifile, queue_head *wq, int wee, queue_head *rq, queue_head *tq) { int len; *************** *** 1085,1088 **** --- 1098,1102 ---- doing_no_routes = (rq == NULL); doing_no_tracks = (tq == NULL); + reading_weepoints = wee; cur_waypoint_list = wq; |
From: Paul F. <pg...@us...> - 2006-10-04 20:25:07
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21403 Modified Files: roadmap_features.c roadmap_gpx.c roadmap_gpx.h roadmap_landmark.c roadmap_landmark.h roadmap_trip.c Log Message: implement smaller version of the waypoint struct (20 bytes vs. 52 bytes) for the benefit of roadmap_features.c. this reduces the memory impact of long points-of-interest lists. Index: roadmap_landmark.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_landmark.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** roadmap_landmark.c 3 Oct 2006 21:42:18 -0000 1.9 --- roadmap_landmark.c 4 Oct 2006 20:25:03 -0000 1.10 *************** *** 92,95 **** --- 92,130 ---- } + void roadmap_landmark_draw_weepoint + (const weepoint *weepointp, const char *sprite, RoadMapPen pen) { + + RoadMapGuiPoint guipoint; + + if (!roadmap_math_point_is_visible (&weepointp->pos)) + return; + + if (!sprite && !pen) + return; /* unlikely */ + + roadmap_math_coordinate (&weepointp->pos, &guipoint); + roadmap_math_rotate_coordinates (1, &guipoint); + + if (sprite) { + roadmap_sprite_draw (sprite, &guipoint, 0); + } + + if (pen) { + roadmap_canvas_select_pen (pen); + if (sprite) + guipoint.y += 15; /* space for sprite */ + + /* FIXME -- We should do label collision detection, which + * means joining in the fun in roadmap_label_add() and + * roadmap_label_draw_cache(). Landmark labels should + * probably take priority, and be positioned first. They + * should probably be drawn last, however, so that their + * labels come out on "top" of other map features. + */ + roadmap_label_draw_text(weepointp->name, + &guipoint, &guipoint, 0, 0, ROADMAP_LANDMARK_LABEL_SIZE); + } + } + static void roadmap_landmark_draw(const waypoint *waypointp) { roadmap_landmark_draw_waypoint *************** *** 198,202 **** ROADMAP_LIST_INIT(&tmp_waypoint_list); ! ret = roadmap_gpx_read_waypoints(trip_path, name, &tmp_waypoint_list); if (ret == 0) { --- 233,237 ---- ROADMAP_LIST_INIT(&tmp_waypoint_list); ! ret = roadmap_gpx_read_waypoints(trip_path, name, &tmp_waypoint_list, 0); if (ret == 0) { *************** *** 252,256 **** ROADMAP_LIST_INIT(&tmp_waypoint_list); ! ret = roadmap_gpx_read_waypoints(path, name, &tmp_waypoint_list); if (ret == 0) { --- 287,291 ---- ROADMAP_LIST_INIT(&tmp_waypoint_list); ! ret = roadmap_gpx_read_waypoints(path, name, &tmp_waypoint_list, 0); if (ret == 0) { Index: roadmap_landmark.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_landmark.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** roadmap_landmark.h 2 Oct 2006 14:50:21 -0000 1.5 --- roadmap_landmark.h 4 Oct 2006 20:25:03 -0000 1.6 *************** *** 38,41 **** --- 38,43 ---- (const waypoint *waypointp, const char *sprite, int override_sprite, RoadMapPen pen); + void roadmap_landmark_draw_weepoint + (const weepoint *weepointp, const char *sprite, RoadMapPen pen); RoadMapPen RoadMapLandmarksPen; Index: roadmap_features.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_features.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** roadmap_features.c 4 Oct 2006 14:57:44 -0000 1.4 --- roadmap_features.c 4 Oct 2006 20:25:03 -0000 1.5 *************** *** 22,25 **** --- 22,36 ---- */ + + /* + * Note -- "features" are read-only lists of waypoints. Because + * they're read-only, and have minimal attributes, they can + * use a variant of the waypoint structure called the + * "weepoint" (20 bytes vs. 52). Since waypoints tend to be + * dealt with in bulk, in the form of lists, much of the code + * that deals with the two structures is similar, but they are + * not the same. + */ + #include "roadmap.h" #include "roadmap_types.h" *************** *** 36,44 **** #include "roadmap_landmark.h" ! #define MAX_FEATUREFILES 10 /* max number of feature/point-of-interest files */ static struct { RoadMapList head; ! RoadMapListItem *southern; RoadMapPen pen; char * sprite; --- 47,56 ---- #include "roadmap_landmark.h" ! /* Max number of feature/point-of-interest files */ ! #define MAX_FEATUREFILES 20 static struct { RoadMapList head; ! weepoint *southern; RoadMapPen pen; char * sprite; *************** *** 51,78 **** ! static void roadmap_features_draw(const waypoint *w) { if (roadmap_math_declutter(RoadMapFeatureList->declutter)) { ! roadmap_landmark_draw_waypoint ! (w, RoadMapFeatureList->sprite, 1, RoadMapFeatureList->pen); } else { ! /* above a certain zoom level, turn off labels, and draw only ! * the sprite. if there was normally no sprite, provide one. */ ! roadmap_landmark_draw_waypoint (w, RoadMapFeatureList->sprite ? ! RoadMapFeatureList->sprite : "PointOfInterest", 1, NULL); } } ! static void roadmap_features_find_bounds(const waypoint *w) { ! /* some US placename files have historical places listed ! * with the long/lat zeroed out. they really throw off * any efficiency we get from our bounding boxes. */ if (w->pos.longitude == 0 && w->pos.latitude == 0) { ! waypt_del ((waypoint *)w); /* drop const -- this is safe */ ! waypt_free ((waypoint *)w); return; } --- 63,92 ---- ! static void roadmap_features_draw(const weepoint *w) { if (roadmap_math_declutter(RoadMapFeatureList->declutter)) { ! roadmap_landmark_draw_weepoint ! (w, RoadMapFeatureList->sprite, RoadMapFeatureList->pen); } else { ! /* Above a certain zoom level, turn off labels, and draw only ! * the sprite. If there was normally no sprite, provide one. */ ! roadmap_landmark_draw_weepoint (w, RoadMapFeatureList->sprite ? ! RoadMapFeatureList->sprite : "PointOfInterest", NULL); } } ! static void roadmap_features_find_bounds(const waypoint *wpt) { ! weepoint *w = (weepoint *)wpt; ! ! /* Some US placename files have historical places listed ! * with the long/lat zeroed out. They really throw off * any efficiency we get from our bounding boxes. */ if (w->pos.longitude == 0 && w->pos.latitude == 0) { ! roadmap_list_remove(&w->Q); ! weept_free (w); return; } *************** *** 91,95 **** void roadmap_features_display (void) { ! RoadMapListItem *southern, *w; RoadMapArea screen; --- 105,109 ---- void roadmap_features_display (void) { ! weepoint *w; RoadMapArea screen; *************** *** 100,126 **** RoadMapFeatureList++) { ! if (!roadmap_math_is_visible (&RoadMapFeatureList->area)) continue; ! southern = RoadMapFeatureList->southern; ! if (!southern) { ! southern = ROADMAP_LIST_FIRST(&RoadMapFeatureList->head); } ! /* Assumes there are out-of-range "flag" waypoints at the ! * start and end of the list */ ! while (((waypoint *)southern)->pos.latitude >= ! screen.south) ! southern = ROADMAP_LIST_PREV(southern); ! while (((waypoint *)southern)->pos.latitude < ! screen.south) ! southern = ROADMAP_LIST_NEXT(southern); ! RoadMapFeatureList->southern = southern; ! w = southern; ! while (((waypoint *)w)->pos.latitude < screen.north) { ! roadmap_features_draw((waypoint *)w); ! w = ROADMAP_LIST_NEXT(w); } } --- 114,142 ---- RoadMapFeatureList++) { ! if (!roadmap_math_is_visible (&RoadMapFeatureList->area)) { ! /* no features can be visible */ continue; + } ! /* start looking with the previous southern edge */ ! w = RoadMapFeatureList->southern; ! if (!w) { ! w = (weepoint *)ROADMAP_LIST_FIRST(&RoadMapFeatureList->head); } ! /* This assumes there are out-of-range "flag" waypoints at the ! * start and end of the list. */ ! while (w->pos.latitude >= screen.south) ! w = (weepoint *)ROADMAP_LIST_PREV(&w->Q); ! while (w->pos.latitude < screen.south) ! w = (weepoint *)ROADMAP_LIST_NEXT(&w->Q); ! /* Save the newly-found southern edge */ ! RoadMapFeatureList->southern = w; ! ! while (w->pos.latitude < screen.north) { ! roadmap_features_draw(w); ! w = (weepoint *)ROADMAP_LIST_NEXT(&w->Q); } } *************** *** 129,133 **** static int latitude_waypoint_cmp( RoadMapListItem *a, RoadMapListItem *b) { ! return ((waypoint *)a)->pos.latitude - ((waypoint *)b)->pos.latitude; } --- 145,149 ---- static int latitude_waypoint_cmp( RoadMapListItem *a, RoadMapListItem *b) { ! return ((weepoint *)a)->pos.latitude - ((weepoint *)b)->pos.latitude; } *************** *** 179,188 **** } ! ret = roadmap_gpx_read_waypoints(NULL, name, &tmp_waypoint_list); if (semi) *semi++ = ';'; if (ret == 0) { ! waypt_flush_queue (&tmp_waypoint_list); continue; } --- 195,209 ---- } ! ret = roadmap_gpx_read_waypoints(NULL, name, &tmp_waypoint_list, 1); if (semi) *semi++ = ';'; if (ret == 0) { ! /* can't use waypt_flush_queue() for weepoints */ ! queue *elem, *tmp; ! QUEUE_FOR_EACH(&tmp_waypoint_list, elem, tmp) { ! weepoint *q = (weepoint *) roadmap_list_remove(elem); ! weept_free(q); ! } continue; } *************** *** 267,271 **** RoadMapFeatureList++) { ! waypoint *wpt; /* Calculate the list's bounding box --- 288,292 ---- RoadMapFeatureList++) { ! weepoint *wpt; /* Calculate the list's bounding box *************** *** 285,293 **** * the search algorithm simpler. */ ! wpt = waypt_new(); wpt->pos.latitude = -91 * 1000000; roadmap_list_insert(&RoadMapFeatureList->head, &(wpt->Q)); ! wpt = waypt_new(); wpt->pos.latitude = 91 * 1000000; roadmap_list_append(&RoadMapFeatureList->head, &(wpt->Q)); --- 306,314 ---- * the search algorithm simpler. */ ! wpt = weept_new(); wpt->pos.latitude = -91 * 1000000; roadmap_list_insert(&RoadMapFeatureList->head, &(wpt->Q)); ! wpt = weept_new(); wpt->pos.latitude = 91 * 1000000; roadmap_list_append(&RoadMapFeatureList->head, &(wpt->Q)); Index: roadmap_trip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.c,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** roadmap_trip.c 3 Oct 2006 21:42:18 -0000 1.65 --- roadmap_trip.c 4 Oct 2006 20:25:03 -0000 1.66 *************** *** 2028,2032 **** ROADMAP_LIST_INIT(&tmp_track_list); ! ret = roadmap_gpx_read_file (path, name, &tmp_waypoint_list, &tmp_route_list, &tmp_track_list); --- 2028,2032 ---- ROADMAP_LIST_INIT(&tmp_track_list); ! ret = roadmap_gpx_read_file (path, name, &tmp_waypoint_list, 0, &tmp_route_list, &tmp_track_list); Index: roadmap_gpx.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_gpx.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** roadmap_gpx.h 17 Jul 2006 20:57:21 -0000 1.3 --- roadmap_gpx.h 4 Oct 2006 20:25:03 -0000 1.4 *************** *** 30,36 **** int roadmap_gpx_read_file ! (const char *path, const char *name, RoadMapList *w, RoadMapList *r, RoadMapList *t); int roadmap_gpx_read_waypoints ! (const char *path, const char *name, RoadMapList *waypoints); int roadmap_gpx_read_one_track ( const char *path, const char *name, route_head **track); --- 30,36 ---- int roadmap_gpx_read_file ! (const char *path, const char *name, RoadMapList *w, int wee, RoadMapList *r, RoadMapList *t); int roadmap_gpx_read_waypoints ! (const char *path, const char *name, RoadMapList *waypoints, int wee); int roadmap_gpx_read_one_track ( const char *path, const char *name, route_head **track); Index: roadmap_gpx.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_gpx.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** roadmap_gpx.c 17 Jul 2006 20:57:21 -0000 1.5 --- roadmap_gpx.c 4 Oct 2006 20:25:03 -0000 1.6 *************** *** 58,62 **** int roadmap_gpx_read_file(const char *path, ! const char *name, queue_head *w, queue_head *r, queue_head *t) { --- 58,62 ---- int roadmap_gpx_read_file(const char *path, ! const char *name, queue_head *w, int wee, queue_head *r, queue_head *t) { *************** *** 68,72 **** if (!ifile) return 0; ! ret = gpx_read(ifile, w, r, t); if (t) { --- 68,72 ---- if (!ifile) return 0; ! ret = gpx_read(ifile, w, wee, r, t); if (t) { *************** *** 82,92 **** } int roadmap_gpx_read_waypoints ! (const char *path, const char *name, queue_head *waypoints) { int ret; ! ret = roadmap_gpx_read_file(path, name, waypoints, NULL, NULL); return ret; --- 82,93 ---- } + /* read a list of waypoints (or optionally, weepoints) from a file */ int roadmap_gpx_read_waypoints ! (const char *path, const char *name, queue_head *waypoints, int wee) { int ret; ! ret = roadmap_gpx_read_file(path, name, waypoints, wee, NULL, NULL); return ret; *************** *** 104,108 **** QUEUE_INIT(&tracklist); ! ret = roadmap_gpx_read_file(path, name, NULL, NULL, &tracklist); if (!ret || QUEUE_EMPTY(&tracklist)) { --- 105,109 ---- QUEUE_INIT(&tracklist); ! ret = roadmap_gpx_read_file(path, name, NULL, 0, NULL, &tracklist); if (!ret || QUEUE_EMPTY(&tracklist)) { *************** *** 135,139 **** QUEUE_INIT(&routelist); ! ret = roadmap_gpx_read_file(path, name, NULL, &routelist, NULL); if (!ret || QUEUE_EMPTY(&routelist)) --- 136,140 ---- QUEUE_INIT(&routelist); ! ret = roadmap_gpx_read_file(path, name, NULL, 0, &routelist, NULL); if (!ret || QUEUE_EMPTY(&routelist)) *************** *** 171,174 **** --- 172,176 ---- } + /* write a file of waypoints. weepoints cannot be written */ int roadmap_gpx_write_waypoints(const char *path, const char *name, queue_head *waypoints) *************** *** 245,249 **** int roadmap_gpx_read_file(const char *path, ! const char *name, queue *w, queue *r, queue *t) { roadmap_gpx_tell_no_expat (); --- 247,251 ---- int roadmap_gpx_read_file(const char *path, ! const char *name, queue *w, int wee, queue *r, queue *t) { roadmap_gpx_tell_no_expat (); |