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-07-13 06:40:08
|
Update of /cvsroot/roadmap/roadmap_editor/src/navigate In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6825 Modified Files: navigate_dglib.c Log Message: Add missing include (win32). Index: navigate_dglib.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/navigate/navigate_dglib.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** navigate_dglib.c 21 May 2006 12:44:15 -0000 1.3 --- navigate_dglib.c 13 Jul 2006 06:40:04 -0000 1.4 *************** *** 27,31 **** #include <stdio.h> ! #include <stdlib.h> #include "type.h" --- 27,31 ---- #include <stdio.h> ! #include <time.h> #include <stdlib.h> #include "type.h" |
From: Ehud S. <esh...@us...> - 2006-07-13 06:39:29
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/export In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6677 Modified Files: editor_export.c Log Message: Add compression support for exported data. Index: editor_export.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/export/editor_export.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** editor_export.c 10 Jun 2006 08:27:05 -0000 1.11 --- editor_export.c 13 Jul 2006 06:39:24 -0000 1.12 *************** *** 27,33 **** #include <assert.h> ! #include "stdlib.h" #include "time.h" - #include "string.h" #include "roadmap.h" --- 27,35 ---- #include <assert.h> ! #include <stdlib.h> ! #include <stdarg.h> ! #include <string.h> ! #include <zlib.h> #include "time.h" #include "roadmap.h" *************** *** 61,64 **** --- 63,73 ---- #define NO_ELEVATION 1000000 + enum StreamType {NULL_STREAM, FILE_STREAM, ZLIB_STREAM}; + + typedef struct { + enum StreamType type; + void *stream; + } ExportStream; + static RoadMapConfigDescriptor RoadMapConfigAutoUpload = ROADMAP_CONFIG_ITEM("FreeMap", "Upload file after export"); *************** *** 72,80 **** ! static void add_timestamp(FILE *file, time_t time) { struct tm *tms = gmtime (&time); ! fprintf (file, "<time>%04d-%02d-%02dT%02d:%02d:%02dZ</time>\n", tms->tm_year+1900, tms->tm_mon+1, tms->tm_mday, tms->tm_hour, tms->tm_min, tms->tm_sec); --- 81,113 ---- ! static void export_write (ExportStream *stream, char *format, ...) { ! ! char buf[1024]; ! va_list ap; ! ! va_start(ap, format); ! vsnprintf (buf, sizeof(buf), format, ap); ! va_end(ap); ! ! switch (stream->type) { ! case FILE_STREAM: ! fwrite (buf, sizeof(char), strlen(buf), (FILE *)stream->stream); ! break; ! case ZLIB_STREAM: ! gzwrite ((gzFile)stream->stream, buf, strlen(buf)); ! break; ! default: ! break; ! } ! ! return; ! } ! ! ! static void add_timestamp(ExportStream *stream, time_t time) { struct tm *tms = gmtime (&time); ! export_write (stream, "<time>%04d-%02d-%02dT%02d:%02d:%02dZ</time>\n", tms->tm_year+1900, tms->tm_mon+1, tms->tm_mday, tms->tm_hour, tms->tm_min, tms->tm_sec); *************** *** 82,159 **** ! static void add_trkpt(FILE *file, int lon, int lat, int ele, time_t time) { ! fprintf (file, "<trkpt lat=\"%d.%06d\" lon=\"%d.%06d\">\n", lat / 1000000, lat % 1000000, lon / 1000000, lon % 1000000); if (ele != NO_ELEVATION) { ! fprintf (file, "<ele>%d</ele>\n", ele); } if (time != (time_t) -1) { ! add_timestamp (file, time); } ! fprintf (file, "</trkpt>\n"); } ! static void open_trk(FILE *file) { ! fprintf (file, "<trk>\n"); } ! static void close_trk(FILE *file) { ! fprintf (file, "</trk>\n"); } ! static void open_trkseg(FILE *file) { ! fprintf (file, "<trkseg>\n"); } ! static void close_trkseg(FILE *file) { ! fprintf (file, "</trkseg>\n"); } ! static FILE *create_export_file(const char *name) { ! FILE *file = roadmap_file_fopen (NULL, name, "w"); ! if (file == NULL) { ! editor_log (ROADMAP_ERROR, "Can't create file: %s", name); ! roadmap_messagebox ("Export Error", "Can't create file."); ! return NULL; } ! ! fprintf (file, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); ! fprintf (file, "<gpx\nversion=\"1.1\"\ncreator=\"RoadMap Editor (%s) - http://roadmap.digitalomaha.net/editor.html\"\n", editor_main_get_version ()); ! fprintf (file, "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"); ! fprintf (file, "xmlns:freemap=\"http://www.freemap.co.il/xmlns/freemap\"\n"); ! fprintf (file, "xmlns=\"http://www.topografix.com/GPX/1/1\"\n"); ! fprintf (file, "xsi:schemaLocation=\"http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd\">\n"); ! fprintf (file, "<metadata>\n"); ! add_timestamp (file, time(NULL)); ! fprintf (file, "</metadata>\n"); ! return file; } ! static void close_export_file(FILE *file) { ! fprintf (file, "</gpx>\n"); ! fclose (file); } ! static void add_trkpts (FILE *file, int trkseg) { --- 115,221 ---- ! static void add_trkpt(ExportStream *stream, int lon, int lat, int ele, ! time_t time) { ! export_write (stream, "<trkpt lat=\"%d.%06d\" lon=\"%d.%06d\">\n", lat / 1000000, lat % 1000000, lon / 1000000, lon % 1000000); if (ele != NO_ELEVATION) { ! export_write (stream, "<ele>%d</ele>\n", ele); } if (time != (time_t) -1) { ! add_timestamp (stream, time); } ! export_write (stream, "</trkpt>\n"); } ! static void open_trk(ExportStream *stream) { ! export_write (stream, "<trk>\n"); } ! static void close_trk(ExportStream *stream) { ! export_write (stream, "</trk>\n"); } ! static void open_trkseg(ExportStream *stream) { ! export_write (stream, "<trkseg>\n"); } ! static void close_trkseg(ExportStream *stream) { ! export_write (stream, "</trkseg>\n"); } ! static int create_export_stream (ExportStream *stream, const char *name) { ! FILE *file; ! gzFile gz_file; ! ! if ((strlen(name) < 3) || strcmp(name + strlen(name) - 3, ".gz")) { ! file = roadmap_file_fopen (NULL, name, "w"); ! if (file == NULL) { ! editor_log (ROADMAP_ERROR, "Can't create file: %s", name); ! roadmap_messagebox ("Export Error", "Can't create file."); ! return -1; ! } ! ! stream->type = FILE_STREAM; ! stream->stream = file; ! } else { ! ! gz_file = gzopen(name, "w"); ! if (gz_file == NULL) { ! editor_log (ROADMAP_ERROR, "Can't create file: %s", name); ! roadmap_messagebox ("Export Error", "Can't create file."); ! return -1; ! } ! ! stream->type = ZLIB_STREAM; ! stream->stream = gz_file; } ! export_write (stream, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); ! export_write (stream, "<gpx\nversion=\"1.1\"\ncreator=\"RoadMap Editor (%s) - http://roadmap.digitalomaha.net/editor.html\"\n", editor_main_get_version ()); ! export_write (stream, "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"); ! export_write (stream, "xmlns:freemap=\"http://www.freemap.co.il/xmlns/freemap\"\n"); ! export_write (stream, "xmlns=\"http://www.topografix.com/GPX/1/1\"\n"); ! export_write (stream, "xsi:schemaLocation=\"http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd\">\n"); ! export_write (stream, "<metadata>\n"); ! add_timestamp (stream, time(NULL)); ! export_write (stream, "</metadata>\n"); ! return 0; } ! static void close_export_stream(ExportStream *stream) { ! export_write (stream, "</gpx>\n"); ! ! switch (stream->type) { ! case FILE_STREAM: ! fclose ((FILE *)stream->stream); ! break; ! case ZLIB_STREAM: ! gzclose ((gzFile)stream->stream); ! break; ! default: ! break; ! } } ! static void add_trkpts (ExportStream *stream, int trkseg) { *************** *** 184,188 **** add_trkpt ! (file, trkseg_pos.longitude, trkseg_pos.latitude, NO_ELEVATION, start_time); } --- 246,250 ---- add_trkpt ! (stream, trkseg_pos.longitude, trkseg_pos.latitude, NO_ELEVATION, start_time); } *************** *** 202,206 **** ! static void add_attribute (FILE *file, const char *name, const char *value) { char str[500]; --- 264,268 ---- ! static void add_attribute (ExportStream *stream, const char *name, const char *value) { char str[500]; *************** *** 244,252 **** *itr = 0; ! fprintf (file, "<%s>%s</%s>\n", name, str, name); } ! static void add_line_data (FILE *file, int line_id, int plugin_id, --- 306,314 ---- *itr = 0; ! export_write (stream, "<%s>%s</%s>\n", name, str, name); } ! static void add_line_data (ExportStream *stream, int line_id, int plugin_id, *************** *** 268,276 **** /* LineRouteMax speed_limit; */ ! fprintf (file, "<extensions>\n"); if (flags & ED_LINE_DELETED) { ! fprintf (file, "<freemap:action trk_type=\"fake\">Delete</freemap:action>\n"); } else { --- 330,338 ---- /* LineRouteMax speed_limit; */ ! export_write (stream, "<extensions>\n"); if (flags & ED_LINE_DELETED) { ! export_write (stream, "<freemap:action trk_type=\"fake\">Delete</freemap:action>\n"); } else { *************** *** 283,287 **** } ! fprintf (file, "<freemap:action trk_type=\"%s\">Update</freemap:action>\n", trk_type); } --- 345,349 ---- } ! export_write (stream, "<freemap:action trk_type=\"%s\">Update</freemap:action>\n", trk_type); } *************** *** 308,339 **** } ! fprintf (file, "<freemap:line from_id=\"%d\" to_id=\"%d\">\n", roadmap_from_id, roadmap_to_id); add_trkpt ! (file, line_from->longitude, line_from->latitude, NO_ELEVATION, start_time); add_trkpt ! (file, line_to->longitude, line_to->latitude, NO_ELEVATION, end_time); ! fprintf (file, "</freemap:line>\n"); if ((plugin_id == EditorPluginID) && (flags & ED_LINE_DIRTY)) { ! fprintf (file, "<freemap:attributes>\n"); editor_street_get_properties (line_id, &properties); ! add_attribute (file, "road_type", cfcc2type (cfcc)); ! add_attribute (file, "street_name", editor_street_get_street_fename (&properties)); ! add_attribute (file, "text2speech", editor_street_get_street_t2s (&properties)); ! add_attribute (file, "city_name", editor_street_get_street_city (&properties, ED_STREET_LEFT_SIDE)); --- 370,401 ---- } ! export_write (stream, "<freemap:line from_id=\"%d\" to_id=\"%d\">\n", roadmap_from_id, roadmap_to_id); add_trkpt ! (stream, line_from->longitude, line_from->latitude, NO_ELEVATION, start_time); add_trkpt ! (stream, line_to->longitude, line_to->latitude, NO_ELEVATION, end_time); ! export_write (stream, "</freemap:line>\n"); if ((plugin_id == EditorPluginID) && (flags & ED_LINE_DIRTY)) { ! export_write (stream, "<freemap:attributes>\n"); editor_street_get_properties (line_id, &properties); ! add_attribute (stream, "road_type", cfcc2type (cfcc)); ! add_attribute (stream, "street_name", editor_street_get_street_fename (&properties)); ! add_attribute (stream, "text2speech", editor_street_get_street_t2s (&properties)); ! add_attribute (stream, "city_name", editor_street_get_street_city (&properties, ED_STREET_LEFT_SIDE)); *************** *** 350,358 **** char str[100]; snprintf (str, sizeof(str), "%d", speed_limit); ! add_attribute (file, "speed_limit", str); } } #endif ! fprintf (file, "</freemap:attributes>\n"); editor_line_modify_properties --- 412,420 ---- char str[100]; snprintf (str, sizeof(str), "%d", speed_limit); ! add_attribute (stream, "speed_limit", str); } } #endif ! export_write (stream, "</freemap:attributes>\n"); editor_line_modify_properties *************** *** 360,368 **** } ! fprintf (file, "</extensions>\n"); } ! static int export_dirty_lines(FILE **file, const char *name) { int num_lines = editor_line_get_count(); --- 422,430 ---- } ! export_write (stream, "</extensions>\n"); } ! static int export_dirty_lines(ExportStream *stream, const char *name) { int num_lines = editor_line_get_count(); *************** *** 387,394 **** if (!(flags & ED_LINE_DIRTY)) continue; ! if (*file == NULL) { ! *file = create_export_file (name); ! if (*file == NULL) { return 0; } --- 449,455 ---- if (!(flags & ED_LINE_DIRTY)) continue; ! if (stream->type == NULL_STREAM) { ! if (create_export_stream (stream, name) != 0) { return 0; } *************** *** 399,411 **** if (!current_trk_open) { ! open_trk (*file); current_trk_open = 1; } ! open_trkseg (*file); editor_line_get_trksegs (i, &trkseg, &last_trkseg); ! add_trkpts (*file, trkseg); editor_trkseg_get_time (trkseg, &start_time, &end_time); --- 460,472 ---- if (!current_trk_open) { ! open_trk (stream); current_trk_open = 1; } ! open_trkseg (stream); editor_line_get_trksegs (i, &trkseg, &last_trkseg); ! add_trkpts (stream, trkseg); editor_trkseg_get_time (trkseg, &start_time, &end_time); *************** *** 414,426 **** if (trkseg_flags & ED_TRKSEG_OPPOSITE_DIR) { ! add_line_data (*file, i, EditorPluginID, cfcc, flags, trkseg_flags, &to, &from, start_time, end_time); } else { ! add_line_data (*file, i, EditorPluginID, cfcc, flags, trkseg_flags, &from, &to, start_time, end_time); } ! close_trkseg (*file); found++; --- 475,487 ---- if (trkseg_flags & ED_TRKSEG_OPPOSITE_DIR) { ! add_line_data (stream, i, EditorPluginID, cfcc, flags, trkseg_flags, &to, &from, start_time, end_time); } else { ! add_line_data (stream, i, EditorPluginID, cfcc, flags, trkseg_flags, &from, &to, start_time, end_time); } ! close_trkseg (stream); found++; *************** *** 432,436 **** if (current_trk_open) { ! close_trk (*file); } --- 493,497 ---- if (current_trk_open) { ! close_trk (stream); } *************** *** 441,445 **** static int editor_export_data(const char *name) { ! FILE *file = NULL; int trkseg; int line_id; --- 502,506 ---- static int editor_export_data(const char *name) { ! ExportStream stream; int trkseg; int line_id; *************** *** 448,451 **** --- 509,514 ---- int fips; + stream.type = NULL_STREAM; + fips = roadmap_locator_active (); *************** *** 468,487 **** if (trkseg == -1) { ! if (!export_dirty_lines (&file, name)) { editor_log (ROADMAP_INFO, "No trksegs are available for export."); roadmap_messagebox ("Export Error", "No new data to export."); ! if (file != NULL) { ! close_export_file (file); roadmap_file_remove (NULL, name); } return 0; } ! close_export_file (file); editor_export_upload (name); return 0; } ! file = create_export_file (name); ! if (file == NULL) { return -1; } --- 531,550 ---- if (trkseg == -1) { ! if (!export_dirty_lines (&stream, name)) { editor_log (ROADMAP_INFO, "No trksegs are available for export."); roadmap_messagebox ("Export Error", "No new data to export."); ! ! if (stream.type != NULL_STREAM) { ! close_export_stream (&stream); roadmap_file_remove (NULL, name); } return 0; } ! close_export_stream (&stream); editor_export_upload (name); return 0; } ! if (create_export_stream (&stream, name) != 0) { return -1; } *************** *** 536,540 **** if (current_trk_open) { ! close_trk (file); current_trk_open = 0; } --- 599,603 ---- if (current_trk_open) { ! close_trk (&stream); current_trk_open = 0; } *************** *** 543,553 **** if (!current_trk_open) { ! open_trk (file); current_trk_open = 1; } ! open_trkseg (file); ! add_trkpts (file, trkseg); editor_trkseg_get_time (trkseg, &start_time, &end_time); --- 606,616 ---- if (!current_trk_open) { ! open_trk (&stream); current_trk_open = 1; } ! open_trkseg (&stream); ! add_trkpts (&stream, trkseg); editor_trkseg_get_time (trkseg, &start_time, &end_time); *************** *** 555,567 **** if (trkseg_flags & ED_TRKSEG_OPPOSITE_DIR) { ! add_line_data (file, line_id, plugin_id, cfcc, flags, trkseg_flags, &to, &from, start_time, end_time); } else { ! add_line_data (file, line_id, plugin_id, cfcc, flags, trkseg_flags, &from, &to, start_time, end_time); } ! close_trkseg (file); if (!(trkseg_flags & ED_TRKSEG_END_TRACK)) { --- 618,630 ---- if (trkseg_flags & ED_TRKSEG_OPPOSITE_DIR) { ! add_line_data (&stream, line_id, plugin_id, cfcc, flags, trkseg_flags, &to, &from, start_time, end_time); } else { ! add_line_data (&stream, line_id, plugin_id, cfcc, flags, trkseg_flags, &from, &to, start_time, end_time); } ! close_trkseg (&stream); if (!(trkseg_flags & ED_TRKSEG_END_TRACK)) { *************** *** 572,576 **** close_trk: if (current_trk_open) { ! close_trk (file); current_trk_open = 0; } --- 635,639 ---- close_trk: if (current_trk_open) { ! close_trk (&stream); current_trk_open = 0; } *************** *** 581,589 **** if (current_trk_open) { ! close_trk (file); } ! export_dirty_lines (&file, name); ! close_export_file (file); editor_trkseg_reset_next_export (); --- 644,652 ---- if (current_trk_open) { ! close_trk (&stream); } ! export_dirty_lines (&stream, name); ! close_export_stream (&stream); editor_trkseg_reset_next_export (); *************** *** 642,646 **** roadmap_fileselection_new ("Export data", ! "gpx", roadmap_path_user (), "w", --- 705,709 ---- roadmap_fileselection_new ("Export data", ! "gpx.gz", roadmap_path_user (), "w", |
From: Ehud S. <esh...@us...> - 2006-07-13 06:38:56
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/export In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6296 Added Files: editor_download.c editor_download.h Log Message: Change download interfaces to allow auto download. --- NEW FILE: editor_download.h --- /* editor_download.h - download map updates * * LICENSE: * * Copyright 2005 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef INCLUDE__EDITOR_DOWNLOAD_H #define INCLUDE__EDITOR_DOWNLOAD_H #define EDITOR_DOWNLOAD_NORMAL 1 #define EDITOR_DOWNLOAD_AUTO 2 int editor_download_update_map (int mode); #endif // INCLUDE__EDITOR_DOWNLOAD_H --- NEW FILE: editor_download.c --- /* editor_download.c - Download map updates. * * LICENSE: * * (c) Copyright 2006 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * SYNOPSYS: */ #include <stdlib.h> #include "roadmap.h" #include "roadmap_httpcopy.h" #include "roadmap_download.h" #include "roadmap_screen.h" #include "roadmap_locator.h" #include "roadmap_messagebox.h" #include "roadmap_display.h" #include "../editor_main.h" #include "../db/editor_db.h" #include "editor_export.h" #include "editor_download.h" static void download_map_done (void) { editor_main_set (1); roadmap_download_subscribe_when_done (NULL); roadmap_screen_unfreeze (); roadmap_screen_redraw (); } static int editor_download_map (int mode) { static int *fips = NULL; static int ProtocolInitialized = 0; RoadMapPosition center; int count; int i; if (! ProtocolInitialized) { /* PLUGINS NOT SUPPORTED YET. * roadmap_plugin_load_all * ("download", roadmap_download_subscribe_protocol); */ roadmap_httpcopy_init (roadmap_download_subscribe_protocol); ProtocolInitialized = 1; } roadmap_screen_get_center (¢er); count = roadmap_locator_by_position (¢er, &fips); if (count == 0) { if (mode == EDITOR_DOWNLOAD_AUTO) { fips[0] = 77001; count = 1; } else { roadmap_display_text("Info", "No map available"); return -1; } } for (i = count-1; i >= 0; --i) { if (!editor_export_empty (fips[i])) { if (mode == EDITOR_DOWNLOAD_NORMAL) { roadmap_messagebox("Info", "You must first export your data."); } return -1; } } roadmap_screen_freeze (); editor_main_set (0); roadmap_download_subscribe_when_done (download_map_done); roadmap_download_unblock_all (); for (i = count-1; i >= 0; --i) { int res; editor_db_close (fips[i]); editor_db_delete (fips[i]); res = roadmap_download_get_county (fips[i], i ? 0 : 1, mode == EDITOR_DOWNLOAD_NORMAL ? 1 : 0); if (res != 0) return -1; } return 0; } int editor_download_update_map (int mode) { return editor_download_map (mode); } |
From: Ehud S. <esh...@us...> - 2006-07-13 06:38:21
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/db In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6236 Modified Files: editor_shape.h Log Message: Add missing include (win32). Index: editor_shape.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/db/editor_shape.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** editor_shape.h 28 Nov 2005 19:47:50 -0000 1.1 --- editor_shape.h 13 Jul 2006 06:38:18 -0000 1.2 *************** *** 24,28 **** #ifndef INCLUDE__EDITOR_SHAPE__H #define INCLUDE__EDITOR_SHAPE__H ! #include "roadmap_types.h" #include "roadmap_dbread.h" --- 24,29 ---- #ifndef INCLUDE__EDITOR_SHAPE__H #define INCLUDE__EDITOR_SHAPE__H ! ! #include <time.h> #include "roadmap_types.h" #include "roadmap_dbread.h" |
From: Ehud S. <esh...@us...> - 2006-07-13 06:37:46
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5799 Modified Files: editor_main.c Log Message: Bump version. Index: editor_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/editor_main.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** editor_main.c 22 Jun 2006 18:44:45 -0000 1.10 --- editor_main.c 13 Jul 2006 06:37:43 -0000 1.11 *************** *** 41,45 **** int EditorPluginID = -1; ! const char *EDITOR_VERSION = "0.7.0_pre3"; int editor_is_enabled (void) { --- 41,45 ---- int EditorPluginID = -1; ! const char *EDITOR_VERSION = "0.7.1"; int editor_is_enabled (void) { |
From: Ehud S. <esh...@us...> - 2006-07-13 06:37:01
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5353 Added Files: md5.c md5.h Log Message: Add md5 implementation. --- NEW FILE: md5.c --- /* * This code implements the MD5 message-digest algorithm. * The algorithm is due to Ron Rivest. This code was * written by Colin Plumb in 1993, no copyright is claimed. * This code is in the public domain; do with it what you wish. * * Equivalent code is available from RSA Data Security, Inc. * This code has been tested against that, and is equivalent, * except that you don't need to include two pages of legalese * with every copy. * * To compute the message digest of a chunk of bytes, declare an * MD5Context structure, pass it to MD5Init, call MD5Update as * needed on buffers full of bytes, and then call MD5Final, which * will fill a supplied 16-byte array with the digest. */ #include "md5.h" #include <string.h> #ifdef WORDS_BIGENDIAN /* * Note: this code is harmless on little-endian machines. */ void byteReverse(unsigned char *buf, unsigned longs) { uint32 t; do { t = (uint32) ((unsigned) buf[3] << 8 | buf[2]) << 16 | ((unsigned) buf[1] << 8 | buf[0]); *(uint32 *) buf = t; buf += 4; } while (--longs); } #endif /* * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious * initialization constants. */ void MD5Init(struct MD5Context *ctx) { ctx->buf[0] = 0x67452301; ctx->buf[1] = 0xefcdab89; ctx->buf[2] = 0x98badcfe; ctx->buf[3] = 0x10325476; ctx->bits[0] = 0; ctx->bits[1] = 0; } /* * Update context to reflect the concatenation of another buffer full * of bytes. */ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len) { uint32 t; /* Update bitcount */ t = ctx->bits[0]; if ((ctx->bits[0] = t + ((uint32) len << 3)) < t) ctx->bits[1]++; /* Carry from low to high */ ctx->bits[1] += len >> 29; t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */ /* Handle any leading odd-sized chunks */ if (t) { unsigned char *p = (unsigned char *) ctx->in + t; t = 64 - t; if (len < t) { memcpy(p, buf, len); return; } memcpy(p, buf, t); byteReverse(ctx->in, 16); MD5Transform(ctx->buf, (uint32 *) ctx->in); buf += t; len -= t; } /* Process data in 64-byte chunks */ while (len >= 64) { memcpy(ctx->in, buf, 64); byteReverse(ctx->in, 16); MD5Transform(ctx->buf, (uint32 *) ctx->in); buf += 64; len -= 64; } /* Handle any remaining bytes of data. */ memcpy(ctx->in, buf, len); } /* * Final wrapup - pad to 64-byte boundary with the bit pattern * 1 0* (64-bit count of bits processed, MSB-first) */ void MD5Final(unsigned char digest[16], struct MD5Context *ctx) { unsigned count; unsigned char *p; /* Compute number of bytes mod 64 */ count = (ctx->bits[0] >> 3) & 0x3F; /* Set the first char of padding to 0x80. This is safe since there is always at least one byte free */ p = ctx->in + count; *p++ = 0x80; /* Bytes of padding needed to make 64 bytes */ count = 64 - 1 - count; /* Pad out to 56 mod 64 */ if (count < 8) { /* Two lots of padding: Pad the first block to 64 bytes */ memset(p, 0, count); byteReverse(ctx->in, 16); MD5Transform(ctx->buf, (uint32 *) ctx->in); /* Now fill the next block with 56 bytes */ memset(ctx->in, 0, 56); } else { /* Pad block to 56 bytes */ memset(p, 0, count - 8); } byteReverse(ctx->in, 14); /* Append length in bits and transform */ ((uint32 *) ctx->in)[14] = ctx->bits[0]; ((uint32 *) ctx->in)[15] = ctx->bits[1]; MD5Transform(ctx->buf, (uint32 *) ctx->in); byteReverse((unsigned char *) ctx->buf, 4); memcpy(digest, ctx->buf, 16); memset((char *) ctx, 0, sizeof(ctx)); /* In case it's sensitive */ } /* The four core functions - F1 is optimized somewhat */ /* #define F1(x, y, z) (x & y | ~x & z) */ #define F1(x, y, z) (z ^ (x & (y ^ z))) #define F2(x, y, z) F1(z, x, y) #define F3(x, y, z) (x ^ y ^ z) #define F4(x, y, z) (y ^ (x | ~z)) /* This is the central step in the MD5 algorithm. */ #define MD5STEP(f, w, x, y, z, data, s) \ ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x ) /* * The core of the MD5 algorithm, this alters an existing MD5 hash to * reflect the addition of 16 longwords of new data. MD5Update blocks * the data and converts bytes into longwords for this routine. */ void MD5Transform(uint32 buf[4], uint32 const in[16]) { register uint32 a, b, c, d; a = buf[0]; b = buf[1]; c = buf[2]; d = buf[3]; MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7); MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12); MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17); MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22); MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7); MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12); MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17); MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22); MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5); MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9); MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14); MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20); MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5); MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9); MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14); MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20); MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5); MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9); MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14); MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20); MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5); MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9); MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14); MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4); MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11); MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16); MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23); MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4); MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11); MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16); MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23); MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4); MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11); MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16); MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23); MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4); MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11); MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23); MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6); MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10); MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15); MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21); MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6); MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10); MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15); MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21); MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6); MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15); MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21); MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6); MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10); MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21); buf[0] += a; buf[1] += b; buf[2] += c; buf[3] += d; } --- NEW FILE: md5.h --- #ifndef MD5_H #define MD5_H #ifdef __alpha typedef unsigned int uint32; #else typedef unsigned long uint32; #endif struct MD5Context { uint32 buf[4]; uint32 bits[2]; unsigned char in[64]; }; void MD5Init(struct MD5Context *context); void MD5Update(struct MD5Context *context, unsigned char const *buf, unsigned len); void MD5Final(unsigned char digest[16], struct MD5Context *context); void MD5Transform(uint32 buf[4], uint32 const in[16]); /* * This is needed to make RSAREF happy on some MS-DOS compilers. */ typedef struct MD5Context MD5_CTX; #ifdef WORDS_BIGENDIAN void byteReverse(unsigned char *buf, unsigned longs); #else #define byteReverse(buf, len) /* Nothing */ #endif #endif /* !MD5_H */ |
From: Ehud S. <esh...@us...> - 2006-07-13 06:36:11
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5233 Modified Files: roadmap_screen.c roadmap_start.c Log Message: Change download interfaces to allow auto download. Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_screen.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** roadmap_screen.c 11 Jun 2006 11:18:05 -0000 1.16 --- roadmap_screen.c 13 Jul 2006 06:36:08 -0000 1.17 *************** *** 1046,1050 **** ! if (RoadMapScreenFrozen) return; dbg_time_start(DBG_TIME_FULL); --- 1046,1050 ---- ! if (!RoadMapScreenInitialized || RoadMapScreenFrozen) return; dbg_time_start(DBG_TIME_FULL); Index: roadmap_start.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_start.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** roadmap_start.c 5 Jun 2006 09:16:54 -0000 1.20 --- roadmap_start.c 13 Jul 2006 06:36:08 -0000 1.21 *************** *** 78,81 **** --- 78,82 ---- #include "editor/export/editor_export.h" #include "editor/export/editor_upload.h" + #include "editor/export/editor_download.h" static const char *RoadMapMainTitle = "RoadMap"; *************** *** 178,238 **** } - static void roadmap_start_download_map_done (void) { - - editor_main_set (1); - roadmap_download_subscribe_when_done (NULL); - roadmap_screen_redraw (); - } - static void roadmap_start_download_map (void) { ! static int *fips = NULL; ! static int ProtocolInitialized = 0; ! RoadMapPosition center; ! int count; ! int i; ! ! if (! ProtocolInitialized) { ! ! /* PLUGINS NOT SUPPORTED YET. ! * roadmap_plugin_load_all ! * ("download", roadmap_download_subscribe_protocol); ! */ ! ! roadmap_copy_init (roadmap_download_subscribe_protocol); ! roadmap_httpcopy_init (roadmap_download_subscribe_protocol); ! ! ProtocolInitialized = 1; ! } ! ! roadmap_screen_get_center (¢er); ! count = roadmap_locator_by_position (¢er, &fips); ! ! if (count == 0) { ! roadmap_display_text("Info", "No map available"); ! return; ! } ! ! for (i = count-1; i >= 0; --i) { ! ! if (!editor_export_empty (fips[i])) { ! roadmap_messagebox("Info", "You must first export your data."); ! return; ! } ! } ! ! editor_main_set (0); ! ! roadmap_download_subscribe_when_done (roadmap_start_download_map_done); ! roadmap_download_unblock_all (); ! ! for (i = count-1; i >= 0; --i) { ! ! editor_db_close (fips[i]); ! editor_db_delete (fips[i]); ! roadmap_download_get_county (fips[i], i ? 0 : 1); ! } ! ! roadmap_screen_redraw (); } --- 179,185 ---- } static void roadmap_start_download_map (void) { ! editor_download_update_map (EDITOR_DOWNLOAD_NORMAL); } |
From: Ehud S. <esh...@us...> - 2006-07-13 06:35:27
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4820 Modified Files: roadmap_nmea.c roadmap_nmea.h Log Message: Add support for the VTG sentence. Index: roadmap_nmea.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_nmea.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_nmea.c 11 Jun 2006 11:18:05 -0000 1.2 --- roadmap_nmea.c 13 Jul 2006 06:35:23 -0000 1.3 *************** *** 106,110 **** } ! if (ddmmyy != NULL) { if (sscanf (ddmmyy, "%02d%02d%02d", --- 106,110 ---- } ! if ((ddmmyy != NULL) && *ddmmyy) { if (sscanf (ddmmyy, "%02d%02d%02d", *************** *** 119,124 **** } else if (tm.tm_year == 0) { ! return -1; /* The date is not yet known. */ } --- 119,139 ---- } else if (tm.tm_year == 0) { + /* The date is not yet known. + * Use the system clock but return failure. + * This gives a chance for the GPS to update + * the date before the next cycle. + */ ! time_t cur_time; ! struct tm *cur_tm; ! ! time (&cur_time); ! cur_tm = gmtime (&cur_time); ! ! tm.tm_mday = cur_tm->tm_mday; ! tm.tm_mon = cur_tm->tm_mon; ! tm.tm_year = cur_tm->tm_year; ! ! return -1; } *************** *** 360,363 **** --- 375,392 ---- + static int roadmap_nmea_vtg (int argc, char *argv[]) { + + if (argc <= 5) return 0; + + RoadMapNmeaReceived.vtg.steering = + roadmap_nmea_decode_numeric (argv[1], 1); + + RoadMapNmeaReceived.vtg.speed = + roadmap_nmea_decode_numeric (argv[5], 1); + + return 1; + } + + static int roadmap_nmea_gsv (int argc, char *argv[]) { *************** *** 564,567 **** --- 593,597 ---- {NULL, "GSV", roadmap_nmea_gsv}, {NULL, "GLL", roadmap_nmea_gll}, + {NULL, "VTG", roadmap_nmea_vtg}, /* We don't care about these ones (waypoints). */ Index: roadmap_nmea.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_nmea.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** roadmap_nmea.h 15 Oct 2005 22:18:50 -0000 1.1.1.1 --- roadmap_nmea.h 13 Jul 2006 06:35:23 -0000 1.2 *************** *** 98,101 **** --- 98,106 ---- } gsv; + struct { + int steering; + int speed; + } vtg; + /* The following structures match Garmin extensions: */ |
From: Ehud S. <esh...@us...> - 2006-07-13 06:34:52
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4409 Modified Files: roadmap_net.h Log Message: Unique ID generator. Index: roadmap_net.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_net.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** roadmap_net.h 15 Oct 2005 22:19:00 -0000 1.1.1.1 --- roadmap_net.h 13 Jul 2006 06:34:47 -0000 1.2 *************** *** 54,57 **** --- 54,59 ---- RoadMapSocket roadmap_net_accept(RoadMapSocket server_socket); + int roadmap_net_unique_id (unsigned char *buffer, unsigned int size); + void roadmap_net_close (RoadMapSocket s); |
From: Ehud S. <esh...@us...> - 2006-07-13 06:34:28
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4362 Modified Files: roadmap_gps.c Log Message: Fix GPS timeout problem. Index: roadmap_gps.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_gps.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** roadmap_gps.c 21 May 2006 16:35:43 -0000 1.10 --- roadmap_gps.c 13 Jul 2006 06:34:25 -0000 1.11 *************** *** 304,307 **** --- 304,308 ---- RoadMapGpsReceivedPosition.latitude = fields->gll.latitude; RoadMapGpsReceivedPosition.longitude = fields->gll.longitude; + /* speed not available: keep previous value. */ /* altitude not available: keep previous value. */ *************** *** 313,316 **** --- 314,323 ---- + static void roadmap_gps_vtg (void *context, const RoadMapNmeaFields *fields) { + RoadMapGpsReceivedPosition.speed = fields->vtg.speed; + RoadMapGpsReceivedPosition.steering = fields->vtg.steering; + } + + static void roadmap_gps_rmc (void *context, const RoadMapNmeaFields *fields) { *************** *** 438,441 **** --- 445,451 ---- roadmap_nmea_subscribe + (NULL, "VTG", roadmap_gps_vtg, RoadMapGpsNmeaAccount); + + roadmap_nmea_subscribe ("GRM", "E", roadmap_gps_pgrme, RoadMapGpsNmeaAccount); *************** *** 841,845 **** RoadMapGpsConnectedSince = time(NULL); ! //RoadMapGpsLatestData = time(NULL); (*RoadMapGpsPeriodicAdd) (roadmap_gps_keep_alive); --- 851,855 ---- RoadMapGpsConnectedSince = time(NULL); ! RoadMapGpsLatestData = time(NULL); (*RoadMapGpsPeriodicAdd) (roadmap_gps_keep_alive); |
From: Ehud S. <esh...@us...> - 2006-07-13 06:34:01
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv3961 Modified Files: roadmap_file.h Log Message: Add missing include (win32). Index: roadmap_file.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_file.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** roadmap_file.h 15 May 2006 19:26:39 -0000 1.4 --- roadmap_file.h 13 Jul 2006 06:33:57 -0000 1.5 *************** *** 36,39 **** --- 36,40 ---- #include <windows.h> + #include <stdio.h> typedef HANDLE RoadMapFile; /* WIN32 style. */ |
From: Ehud S. <esh...@us...> - 2006-07-13 06:32:05
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv3050 Modified Files: Makefile roadmap_download.c roadmap_download.h Log Message: Change download interfaces to allow auto download. Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/Makefile,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Makefile 5 Jun 2006 09:17:28 -0000 1.15 --- Makefile 13 Jul 2006 06:32:00 -0000 1.16 *************** *** 182,190 **** editor/db/editor_route.c \ editor/db/editor_dictionary.c \ ! buildmap_dbwrite.c \ ! buildmap_metadata.c \ ! buildmap_messages.c \ ! editor/db/editor_override.c \ ! editor/export/editor_export.c \ editor/export/editor_upload.c \ editor/db/editor_trkseg.c \ --- 182,191 ---- editor/db/editor_route.c \ editor/db/editor_dictionary.c \ ! buildmap_dbwrite.c \ ! buildmap_metadata.c \ ! buildmap_messages.c \ ! editor/db/editor_override.c \ ! editor/export/editor_export.c \ ! editor/export/editor_download.c \ editor/export/editor_upload.c \ editor/db/editor_trkseg.c \ *************** *** 194,203 **** editor/track/editor_track_unknown.c \ editor/track/editor_track_known.c \ ! editor/db/editor_db.c \ ! navigate/navigate_main.c \ ! navigate/navigate_instr.c \ ! navigate/navigate_bar.c \ ! navigate/navigate_plugin.c \ ! navigate/navigate_dglib.c \ RMPLUGINOBJS=$(RMPLUGINSRCS:.c=.o) --- 195,204 ---- editor/track/editor_track_unknown.c \ editor/track/editor_track_known.c \ ! editor/db/editor_db.c \ ! navigate/navigate_main.c \ ! navigate/navigate_instr.c \ ! navigate/navigate_bar.c \ ! navigate/navigate_plugin.c \ ! navigate/navigate_dglib.c \ RMPLUGINOBJS=$(RMPLUGINSRCS:.c=.o) Index: roadmap_download.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_download.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** roadmap_download.c 12 May 2006 13:14:17 -0000 1.6 --- roadmap_download.c 13 Jul 2006 06:32:00 -0000 1.7 *************** *** 98,102 **** ! static void roadmap_download_next_county (void); static void roadmap_download_no_handler (void) {} --- 98,102 ---- ! static int roadmap_download_next_county (int ui); static void roadmap_download_no_handler (void) {} *************** *** 149,153 **** ! static void roadmap_download_end (void) { --- 149,153 ---- ! static int roadmap_download_end () { *************** *** 158,162 **** /* The queue is not yet empty: start the next download. */ ! roadmap_download_next_county (); } else if (RoadMapDownloadRefresh) { --- 158,165 ---- /* The queue is not yet empty: start the next download. */ ! if (roadmap_download_next_county (0) != 0) { ! RoadMapDownloadWhenDone (); ! return -1; ! } } else if (RoadMapDownloadRefresh) { *************** *** 166,173 **** --- 169,180 ---- */ RoadMapDownloadRefresh = 0; + roadmap_dialog_hide ("Downloading"); RoadMapDownloadWhenDone (); } else { + roadmap_dialog_hide ("Downloading"); RoadMapDownloadWhenDone (); } + + return 0; } *************** *** 196,199 **** --- 203,207 ---- roadmap_dialog_new_label (".file", "Size"); roadmap_dialog_new_label (".file", "Download"); + roadmap_dialog_new_label (".file", "Status"); roadmap_dialog_complete (0); *************** *** 210,218 **** } roadmap_download_format_size (image, RoadMapDownloadCurrentFileSize); roadmap_dialog_set_data (".file", "Size", image); if (loaded == RoadMapDownloadCurrentFileSize) { ! roadmap_dialog_hide ("Downloading"); } else { roadmap_download_format_size (image, loaded); --- 218,227 ---- } + roadmap_dialog_set_data (".file", "Status", "Downloading..."); roadmap_download_format_size (image, RoadMapDownloadCurrentFileSize); roadmap_dialog_set_data (".file", "Size", image); if (loaded == RoadMapDownloadCurrentFileSize) { ! roadmap_dialog_set_data (".file", "Status", "Completed."); } else { roadmap_download_format_size (image, loaded); *************** *** 362,369 **** ! static void roadmap_download_ok (const char *name, void *context) { int fips = RoadMapDownloadQueue[RoadMapDownloadQueueConsumer]; struct roadmap_download_protocol *protocol; char source[256]; --- 371,379 ---- ! static int roadmap_download_start (const char *name) { int fips = RoadMapDownloadQueue[RoadMapDownloadQueueConsumer]; struct roadmap_download_protocol *protocol; + int error = 0; char source[256]; *************** *** 424,430 **** --- 434,443 ---- roadmap_messagebox ("Error", "Error downloading navigation data."); + error = 1; } } } + } else { + error = 1; } roadmap_download_unblock (fips); *************** *** 444,447 **** --- 457,468 ---- roadmap_download_progress (RoadMapDownloadCurrentFileSize); } + + return error; + } + + + static void roadmap_download_ok (const char *name, void *context) { + + roadmap_download_start (name); } *************** *** 460,466 **** ! static void roadmap_download_usdir (void) { struct roadmap_download_protocol *protocol; char source[256]; --- 481,488 ---- ! static int roadmap_download_usdir (void) { struct roadmap_download_protocol *protocol; + int error = 0; char source[256]; *************** *** 479,483 **** roadmap_log (ROADMAP_WARNING, "invalid download source %s", source); roadmap_download_end (); ! return; } --- 501,505 ---- roadmap_log (ROADMAP_WARNING, "invalid download source %s", source); roadmap_download_end (); ! return -1; } *************** *** 519,522 **** --- 541,546 ---- roadmap_download_uncompress (destination); RoadMapDownloadRefresh = 1; + } else { + error = -1; } roadmap_start_unfreeze (); *************** *** 531,547 **** roadmap_log (ROADMAP_WARNING, "invalid download source %s", source); roadmap_download_end (); ! return; } if (RoadMapDownloadCurrentFileSize > 0) { roadmap_download_progress (RoadMapDownloadCurrentFileSize); - } else { - roadmap_download_end (); - return; } } ! static void roadmap_download_next_county (void) { int fips = RoadMapDownloadQueue[RoadMapDownloadQueueConsumer]; --- 555,570 ---- roadmap_log (ROADMAP_WARNING, "invalid download source %s", source); roadmap_download_end (); ! return -1; } if (RoadMapDownloadCurrentFileSize > 0) { roadmap_download_progress (RoadMapDownloadCurrentFileSize); } + + return error; } ! static int roadmap_download_next_county (int ui) { int fips = RoadMapDownloadQueue[RoadMapDownloadQueueConsumer]; *************** *** 553,558 **** if (fips == -1) { ! roadmap_download_usdir (); ! return; } --- 576,580 ---- if (fips == -1) { ! return roadmap_download_usdir (); } *************** *** 561,565 **** if (basename == NULL) { roadmap_messagebox ("Download Error", "Bad source file name (no path)"); ! return; } --- 583,587 ---- if (basename == NULL) { roadmap_messagebox ("Download Error", "Bad source file name (no path)"); ! return -1; } *************** *** 590,597 **** roadmap_dialog_set_data (".file", "To", buffer); } ! int roadmap_download_get_county (int fips, int download_usdir) { int next; --- 612,625 ---- roadmap_dialog_set_data (".file", "To", buffer); + + if (!ui) { + return roadmap_download_start ("Download a Map"); + } + + return 0; } ! int roadmap_download_get_county (int fips, int download_usdir, int ui) { int next; *************** *** 604,608 **** * avoid requesting a download while we are downloading this county. */ ! if (roadmap_download_blocked (fips)) return 0; roadmap_download_block (fips); --- 632,636 ---- * avoid requesting a download while we are downloading this county. */ ! if (roadmap_download_blocked (fips)) return -1; roadmap_download_block (fips); *************** *** 615,619 **** if (next == RoadMapDownloadQueueConsumer) { /* The queue is full: stop downloading more. */ ! return 0; } --- 643,647 ---- if (next == RoadMapDownloadQueueConsumer) { /* The queue is full: stop downloading more. */ ! return -1; } *************** *** 634,639 **** RoadMapDownloadQueueProducer = next; ! roadmap_download_next_county(); ! return 0; } --- 662,666 ---- RoadMapDownloadQueueProducer = next; ! return roadmap_download_next_county(ui); } Index: roadmap_download.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_download.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_download.h 17 Mar 2006 09:48:04 -0000 1.2 --- roadmap_download.h 13 Jul 2006 06:32:00 -0000 1.3 *************** *** 64,68 **** ! int roadmap_download_get_county (int fips, int download_usdir); void roadmap_download_show_space (void); --- 64,68 ---- ! int roadmap_download_get_county (int fips, int download_usdir, int ui); void roadmap_download_show_space (void); |
From: Paul F. <pg...@us...> - 2006-07-11 22:52:36
|
Update of /cvsroot/roadmap/roadmap/src/agg_support In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9127 Modified Files: roadmap_canvas.cpp Log Message: remove commented debug line Index: roadmap_canvas.cpp =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/agg_support/roadmap_canvas.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** roadmap_canvas.cpp 26 Jun 2006 19:51:56 -0000 1.1 --- roadmap_canvas.cpp 11 Jul 2006 22:52:32 -0000 1.2 *************** *** 336,341 **** #endif - //pgf fast_draw = 1; - raso.round_cap(true); if (!fast_draw) { --- 336,339 ---- |
From: Paul F. <pg...@us...> - 2006-07-11 02:03:52
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13313 Modified Files: roadmap_trip.c Log Message: better protection against null focals Index: roadmap_trip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.c,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** roadmap_trip.c 6 Jul 2006 15:33:30 -0000 1.50 --- roadmap_trip.c 11 Jul 2006 02:03:33 -0000 1.51 *************** *** 450,458 **** } ! if (!focal->has_value) { focal = fallback; } ! if (!focal->has_value) { roadmap_trip_set_focus_waypoint (NULL); } else { --- 450,458 ---- } ! if (focal == NULL || !focal->has_value) { focal = fallback; } ! if (focal == NULL || !focal->has_value) { roadmap_trip_set_focus_waypoint (NULL); } else { |
From: Paul F. <pg...@us...> - 2006-07-06 15:33:38
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10655 Modified Files: roadmap_trip.c roadmap_trip.h Log Message: fix "new trip" behavior, to choose an unused name for the trip. Index: roadmap_trip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.c,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** roadmap_trip.c 4 Jul 2006 18:50:11 -0000 1.49 --- roadmap_trip.c 6 Jul 2006 15:33:30 -0000 1.50 *************** *** 973,987 **** ! void roadmap_trip_clear (void) { - if (RoadMapTripModified) { - // FIXME -- We're blowing away possibly modified data here. - // RoadMapTripModified should be checked, and the user - // should confirm the action. - // ...or, we should do the write, particularly if we're changing - // trips. - } - waypt_flush_queue (&RoadMapTripWaypointHead); route_flush_queue (&RoadMapTripRouteHead); --- 973,979 ---- ! static void roadmap_trip_clear (void) { waypt_flush_queue (&RoadMapTripWaypointHead); route_flush_queue (&RoadMapTripRouteHead); *************** *** 1841,1848 **** void roadmap_trip_new (void) { roadmap_trip_clear (); ! // FIXME choose a unique-ish name ! roadmap_config_set (&RoadMapConfigTripName, "default.gpx"); roadmap_trip_set_modified(1); --- 1833,1858 ---- void roadmap_trip_new (void) { + const char *path = roadmap_path_trips(); + char name[50]; + int i; + + strcpy (name, "NewTrip"); + + i = 1; + while (roadmap_file_exists(path, name) && i < 1000) { + sprintf(name, "NewTrip-%d", i++); + } + if (i == 1000) { + roadmap_log (ROADMAP_WARNING, "over 1000 new trips!"); + strcpy (name, "NewTrip"); + } + + if (RoadMapTripModified) { + roadmap_trip_save (0); + } + roadmap_trip_clear (); ! roadmap_config_set (&RoadMapConfigTripName, name); roadmap_trip_set_modified(1); *************** *** 1969,1972 **** --- 1979,1991 ---- } else { + // FIXME if we happen to be loading the file we're about + // to save to, then we'll either a) clobber what we want + // to load, or b) potentially lose data we wanted to save. + // we default to saving, but this means if you load a trip, + // delete some stuff, and reload to get it back, that won't + // work. + if (RoadMapTripModified) { + roadmap_trip_save (0); + } roadmap_trip_clear(); Index: roadmap_trip.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** roadmap_trip.h 4 Jul 2006 16:01:45 -0000 1.21 --- roadmap_trip.h 6 Jul 2006 15:33:30 -0000 1.22 *************** *** 73,77 **** void roadmap_trip_initialize (void); - void roadmap_trip_clear (void); /* In the two primitives that follow, the name is either NULL (i.e. --- 73,76 ---- |
From: Paul F. <pg...@us...> - 2006-07-05 15:34:02
|
Update of /cvsroot/roadmap/roadmap/src/gpx In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21523/gpx Modified Files: gpx.c Log Message: fix "no expat" builds Index: gpx.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/gpx/gpx.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gpx.c 21 Apr 2006 18:38:25 -0000 1.3 --- gpx.c 5 Jul 2006 15:33:59 -0000 1.4 *************** *** 22,26 **** */ ! #ifndef NO_EXPAT #include "defs.h" --- 22,26 ---- */ ! #ifdef ROADMAP_USES_EXPAT #include "defs.h" *************** *** 1608,1611 **** #endif ! #endif // ifndef NO_EXPAT --- 1608,1611 ---- #endif ! #endif // ifndef ROADMAP_USES_EXPAT |
From: Paul F. <pg...@us...> - 2006-07-05 15:34:02
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21523 Modified Files: roadmap_gpx.h Log Message: fix "no expat" builds Index: roadmap_gpx.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_gpx.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** roadmap_gpx.h 7 Dec 2005 14:06:03 -0000 1.1 --- roadmap_gpx.h 5 Jul 2006 15:33:59 -0000 1.2 *************** *** 22,26 **** --- 22,29 ---- */ + #ifdef ROADMAP_USES_EXPAT # include <expat.h> + #endif + #define ROADMAP 1 # include "gpx/defs.h" |
From: Paul F. <pg...@us...> - 2006-07-05 15:32:18
|
Update of /cvsroot/roadmap/roadmap/src/icons In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20313/icons Modified Files: Makefile Log Message: clean up icon conversions/installation, mainly so build rules don't run at install time. (that's a bad time to find you don't have "convert".) Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/icons/Makefile,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile 26 Jun 2006 19:47:49 -0000 1.8 --- Makefile 5 Jul 2006 15:32:09 -0000 1.9 *************** *** 1,3 **** --- 1,6 ---- + TOP = .. + include $(TOP)/options.mk + # Those hand-made icons (the others are official road signs): ICONSRC= rm_hold.xpm \ *************** *** 9,14 **** ICONS=$(ICONSRC:.xpm=.png) - CONVERT=convert - .PHONY: all install uninstall icons clean --- 12,15 ---- *************** *** 17,24 **** install: $(ICONS) rm -f temp.png ! cp rm_*.png $(ICONDIR) uninstall: ! cd $(ICONDIR) && rm -f rm_*.png icons: $(ICONS) --- 18,25 ---- install: $(ICONS) rm -f temp.png ! cp rm_*.png $(DESTDIR)$(ICONDIR) uninstall: ! cd $(DESTDIR)$(ICONDIR) && rm -f rm_*.png icons: $(ICONS) |
From: Paul F. <pg...@us...> - 2006-07-05 15:32:17
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20313 Modified Files: Makefile options.mk Log Message: clean up icon conversions/installation, mainly so build rules don't run at install time. (that's a bad time to find you don't have "convert".) Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/Makefile,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** Makefile 28 Jun 2006 23:25:06 -0000 1.80 --- Makefile 5 Jul 2006 15:32:08 -0000 1.81 *************** *** 158,161 **** --- 158,171 ---- XCHGOBJS=$(XCHGSRCS:.c=.o) + ICONS_PNG = roadmap-16.png \ + roadmap-32.png \ + roadmap-48.png \ + roadmap-64.png \ + roadmap-right.png \ + roadmap-small.png \ + roadmap.png + + ICONS_XPM=$(ICONS_PNG:.png=.xpm) + PKGDATAFILES=sprites preferences session drivers roadmap.popup *************** *** 210,226 **** done topclean: rm -f *.o *.a *.da $(BUILD) $(TOOLS) $(DRIVERS) ! rm -f roadmap-32.xpm roadmap.xpm # Clean up CVS backup files as well. $(RM) .#* clean: topclean ! for module in icons $(RDMODULES) ; \ do \ $(MAKE) -C $$module clean || exit 1; \ done - $(MAKE) -C unix clean - $(MAKE) -C gpx clean rm -f agg_support/*.o --- 220,237 ---- done + icons: $(ICONS_XPM) + $(MAKE) -C icons all + topclean: rm -f *.o *.a *.da $(BUILD) $(TOOLS) $(DRIVERS) ! rm -f $(ICONS_XPM) # Clean up CVS backup files as well. $(RM) .#* clean: topclean ! for module in icons unix gpx $(RDMODULES) ; \ do \ $(MAKE) -C $$module clean || exit 1; \ done rm -f agg_support/*.o *************** *** 260,271 **** installicons: mkdir -p $(DESTDIR)$(ICONDIR) ! cd icons && $(MAKE) ICONDIR="$(DESTDIR)$(ICONDIR)" install ! cp -f roadmap*.png $(DESTDIR)$(ICONDIR)/. ! for icon in roadmap*.png ; \ ! do \ ! icon2=`basename $$icon .png` ; \ ! convert $$icon $${icon2}.xpm ; \ ! cp -f $${icon2}.xpm $(DESTDIR)$(ICONDIR)/. ; \ ! done installdoc: --- 271,276 ---- installicons: mkdir -p $(DESTDIR)$(ICONDIR) ! $(MAKE) -C icons install ! cp -f $(ICONS_PNG) $(ICONS_XPM) $(DESTDIR)$(ICONDIR)/. installdoc: *************** *** 279,283 **** cd $(DESTDIR)$(pkgbindir) && rm -f $(BUILD) $(SCRIPTS) $(DRIVERS) if [ -d $(menudir) ] ; then rm -f $(menudir)/roadmap; fi ! cd icons && $(MAKE) ICONDIR="$(DESTDIR)$(ICONDIR)" uninstall cd $(DESTDIR)$(ICONDIR) && rm -f roadmap*.png cd $(DESTDIR)$(desktopdir) && rm -f roadmap.desktop --- 284,288 ---- cd $(DESTDIR)$(pkgbindir) && rm -f $(BUILD) $(SCRIPTS) $(DRIVERS) if [ -d $(menudir) ] ; then rm -f $(menudir)/roadmap; fi ! $(MAKE) -C icons uninstall cd $(DESTDIR)$(ICONDIR) && rm -f roadmap*.png cd $(DESTDIR)$(desktopdir) && rm -f roadmap.desktop *************** *** 290,296 **** done - icons: - $(MAKE) -C icons STDCFLAGS="$(CFLAGS)" all - # --- The real targets -------------------------------------------- --- 295,298 ---- *************** *** 348,349 **** --- 350,356 ---- $(CC) $(LDFLAGS) $(BPOBJS) -o buildplace $(LIBS) + + # icon rule -- create xpm from png + %.xpm : %.png + $(CONVERT) $< $@ + Index: options.mk =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/options.mk,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** options.mk 30 Jun 2006 13:41:43 -0000 1.3 --- options.mk 5 Jul 2006 15:32:09 -0000 1.4 *************** *** 21,25 **** INSTALL = install INSTALL_DATA = install -m644 ! # --- Build options ------------------------------------------------ --- 21,27 ---- INSTALL = install INSTALL_DATA = install -m644 ! RANLIB = ranlib ! STRIP = strip ! CONVERT = convert # --- Build options ------------------------------------------------ *************** *** 48,54 **** - RANLIB=ranlib - STRIP=strip - ifeq ($(strip $(MODE)),DEBUG) # Memory leak detection using mtrace: --- 50,53 ---- |
From: Paul F. <pg...@us...> - 2006-07-05 14:29:40
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14471 Modified Files: roadmap_start.c Log Message: forgot to lowercase both instances of the horizon controls Index: roadmap_start.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_start.c,v retrieving revision 1.99 retrieving revision 1.100 diff -C2 -d -r1.99 -r1.100 *** roadmap_start.c 4 Jul 2006 16:01:45 -0000 1.99 --- roadmap_start.c 5 Jul 2006 14:29:33 -0000 1.100 *************** *** 574,579 **** "toggleorientation", "toggleview", ! "IncHorizon", ! "DecHorizon", "full", --- 574,579 ---- "toggleorientation", "toggleview", ! "increasehorizon", ! "decreasehorizon", "full", |
From: Paul F. <pg...@us...> - 2006-07-04 18:53:54
|
Update of /cvsroot/roadmap/roadmap/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2282 Added Files: roadmap_canvas_agg.cpp Log Message: agg support from roadmap_editor branch, with initial changes for the trunk branch. completely untested. (initial version from Luigi Marinucci apparently worked, but i've touched it since.) --- NEW FILE: roadmap_canvas_agg.cpp --- /* roadmap_canvas.cpp - manage the canvas that is used to draw the map with agg * * LICENSE: * * Copyright 2006 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * SYNOPSYS: * * See roadmap_canvas.h. */ #include <windows.h> #define USE_FRIBIDI #ifdef WIN32_PROFILE #include <C:\Program Files\Windows CE Tools\Common\Platman\sdk\wce500\include\cecap.h> #endif #include "agg_rendering_buffer.h" #include "agg_curves.h" #include "agg_conv_stroke.h" #include "agg_conv_contour.h" #include "agg_conv_transform.h" #include "agg_rasterizer_scanline_aa.h" #include "agg_rasterizer_outline_aa.h" #include "agg_rasterizer_outline.h" #include "agg_renderer_primitives.h" #include "agg_ellipse.h" #include "agg_renderer_scanline.h" #include "agg_scanline_p.h" #include "agg_renderer_outline_aa.h" #include "agg_pixfmt_rgb_packed.h" #include "agg_path_storage.h" #include "util/agg_color_conv_rgb8.h" #include "platform/win32/agg_win32_bmp.h" extern "C" { #include "../roadmap.h" #include "../roadmap_canvas.h" #include "../roadmap_messagebox.h" #include "../roadmap_math.h" #include "../roadmap_config.h" #include "../roadmap_path.h" #include "../roadmap_screen.h" #include "roadmap_wincecanvas.h" #include "colors.h" } #include "../roadmap_canvas_agg.h" static HWND RoadMapDrawingArea; static HDC RoadMapDrawingBuffer; static RECT ClientRect; static HBITMAP OldBitmap = NULL; int roadmap_canvas_agg_to_wchar (const char *text, wchar_t *output, int size) { LPWSTR text_unicode = ConvertToWideChar(text, CP_UTF8); wcsncpy(output, text_unicode, size); output[size - 1] = 0; return wcslen(output); } agg::rgba8 roadmap_canvas_agg_parse_color (const char *color) { int high, i, low; if (*color == '#') { int r, g, b, a; int count; count = sscanf(color, "#%2x%2x%2x%2x", &r, &g, &b, &a); if (count == 4) { return agg::rgba8(r, g, b, a); } else { return agg::rgba8(r, g, b); } } else { /* Do binary search on color table */ for (low=(-1), high=sizeof(color_table)/sizeof(color_table[0]); high-low > 1;) { i = (high+low) / 2; if (strcmp(color, color_table[i].name) <= 0) { high = i; } else { low = i; } } if (!strcmp(color, color_table[high].name)) { return agg::rgba8(color_table[high].r, color_table[high].g, color_table[high].b); } else { return agg::rgba8(0, 0, 0); } } } void roadmap_canvas_button_pressed(int button, POINT *data) { RoadMapGuiPoint point; point.x = (short)data->x; point.y = (short)data->y; (*RoadMapCanvasMouseButtonPressed) (button, &point); } void roadmap_canvas_button_released(int button, POINT *data) { RoadMapGuiPoint point; point.x = (short)data->x; point.y = (short)data->y; (*RoadMapCanvasMouseButtonReleased) (button, &point); } void roadmap_canvas_mouse_moved(POINT *data) { RoadMapGuiPoint point; point.x = (short)data->x; point.y = (short)data->y; (*RoadMapCanvasMouseMoved) (0, &point); } void roadmap_canvas_mouse_scroll(int direction, POINT *data) { RoadMapGuiPoint point; point.x = (short)data->x; point.y = (short)data->y; direction = (direction > 0) ? 1 : ((direction < 0) ? -1 : 0); (*RoadMapCanvasMouseScroll) (direction, &point); } void roadmap_canvas_refresh (void) { HDC hdc; if (RoadMapDrawingArea == NULL) return; dbg_time_start(DBG_TIME_FLIP); hdc = GetDC(RoadMapDrawingArea); BitBlt(hdc, ClientRect.left, ClientRect.top, ClientRect.right - ClientRect.left + 1, ClientRect.bottom - ClientRect.top + 1, RoadMapDrawingBuffer, 0, 0, SRCCOPY); DeleteDC(hdc); dbg_time_end(DBG_TIME_FLIP); } HWND roadmap_canvas_new (HWND hWnd, HWND tool_bar) { HDC hdc; static BITMAPINFO* bmp_info = (BITMAPINFO*) malloc(sizeof(BITMAPINFO) + (sizeof(RGBQUAD)*3)); HBITMAP bmp; void* buf = 0; memset(bmp_info, 0, sizeof(BITMAPINFO) + sizeof(RGBQUAD)*3); if ((RoadMapDrawingBuffer != NULL) && IsWindowVisible(tool_bar)) { DeleteObject(SelectObject(RoadMapDrawingBuffer, OldBitmap)); DeleteDC(RoadMapDrawingBuffer); } hdc = GetDC(RoadMapDrawingArea); RoadMapDrawingArea = hWnd; GetClientRect(hWnd, &ClientRect); if (tool_bar != NULL) { RECT tb_rect; GetClientRect(tool_bar, &tb_rect); ClientRect.top += tb_rect.bottom; } RoadMapDrawingBuffer = CreateCompatibleDC(hdc); bmp_info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bmp_info->bmiHeader.biWidth = ClientRect.right - ClientRect.left + 1; bmp_info->bmiHeader.biHeight = ClientRect.bottom - ClientRect.top + 1; bmp_info->bmiHeader.biPlanes = 1; bmp_info->bmiHeader.biBitCount = 16; bmp_info->bmiHeader.biCompression = BI_BITFIELDS; bmp_info->bmiHeader.biSizeImage = 0; bmp_info->bmiHeader.biXPelsPerMeter = 0; bmp_info->bmiHeader.biYPelsPerMeter = 0; bmp_info->bmiHeader.biClrUsed = 0; bmp_info->bmiHeader.biClrImportant = 0; ((DWORD*)bmp_info->bmiColors)[0] = 0xF800; ((DWORD*)bmp_info->bmiColors)[1] = 0x07E0; ((DWORD*)bmp_info->bmiColors)[2] = 0x001F; bmp = CreateDIBSection( RoadMapDrawingBuffer, bmp_info, DIB_RGB_COLORS, &buf, 0, 0 ); int stride = (((ClientRect.right - ClientRect.left + 1) * 2 + 3) >> 2) << 2; roadmap_canvas_agg_configure((unsigned char*)buf, ClientRect.right - ClientRect.left + 1, ClientRect.bottom - ClientRect.top + 1, -stride); OldBitmap = (HBITMAP)SelectObject(RoadMapDrawingBuffer, bmp); DeleteDC(hdc); (*RoadMapCanvasConfigure) (); return RoadMapDrawingArea; } RoadMapImage roadmap_canvas_agg_load_image (const char *path, const char *file_name) { char *full_name = roadmap_path_join (path, file_name); agg::pixel_map pmap_tmp; if(!pmap_tmp.load_from_bmp(full_name)) { free(full_name); return NULL; } free(full_name); if (pmap_tmp.bpp() != 24) { return NULL; } int width = pmap_tmp.width(); int height = pmap_tmp.height(); int stride = pmap_tmp.stride(); unsigned char *buf = (unsigned char *)malloc (width * height * 4); agg::rendering_buffer tmp_rbuf (pmap_tmp.buf(), width, height, -pmap_tmp.stride()); RoadMapImage image = new roadmap_canvas_image(); image->rbuf.attach (buf, width, height, width * 4); agg::color_conv(&image->rbuf, &tmp_rbuf, agg::color_conv_bgr24_to_rgba32()); return image; } |
From: Paul F. <pg...@us...> - 2006-07-04 18:50:15
|
Update of /cvsroot/roadmap/roadmap/src/gtk2 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1044/src/gtk2 Modified Files: roadmap_canvas_agg.cpp Log Message: warning suppression on 64bit platforms. (from Oleg Gusev) Index: roadmap_canvas_agg.cpp =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/gtk2/roadmap_canvas_agg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_canvas_agg.cpp 28 Jun 2006 12:22:32 -0000 1.2 --- roadmap_canvas_agg.cpp 4 Jul 2006 18:50:11 -0000 1.3 *************** *** 210,214 **** point.y = (short)event->y; ! switch ((int) data) { case 1: (*RoadMapCanvasMouseButtonPressed) (event->button, &point); break; case 2: (*RoadMapCanvasMouseButtonReleased) (event->button, &point); break; --- 210,215 ---- point.y = (short)event->y; ! /* (long) cast to suppress warning on 64-bit platforms */ ! switch ((long) data) { case 1: (*RoadMapCanvasMouseButtonPressed) (event->button, &point); break; case 2: (*RoadMapCanvasMouseButtonReleased) (event->button, &point); break; |
From: Paul F. <pg...@us...> - 2006-07-04 18:50:15
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1044/src Modified Files: roadmap_trip.c Log Message: warning suppression on 64bit platforms. (from Oleg Gusev) Index: roadmap_trip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.c,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** roadmap_trip.c 4 Jul 2006 16:01:45 -0000 1.48 --- roadmap_trip.c 4 Jul 2006 18:50:11 -0000 1.49 *************** *** 477,481 **** point_name = (char *) roadmap_dialog_get_data ("Name", "Name:"); ! where = (int) roadmap_dialog_get_data ("Name", ".placements"); if (point_name && point_name[0] != 0) { --- 477,482 ---- point_name = (char *) roadmap_dialog_get_data ("Name", "Name:"); ! /* (long) cast to suppress warning on 64-bit platforms */ ! where = (long) roadmap_dialog_get_data ("Name", ".placements"); if (point_name && point_name[0] != 0) { |
From: Paul F. <pg...@us...> - 2006-07-04 16:01:50
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29391 Modified Files: roadmap_trip.h roadmap_trip.c roadmap_start.c Log Message: rework the track/route/trip UI elements just a little. new commands for adding the current GPS track to the current trip, and for converting a track to a route. better (i hope) wording for some command labels and the tooltips. Index: roadmap_trip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.c,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** roadmap_trip.c 26 Jun 2006 19:55:33 -0000 1.47 --- roadmap_trip.c 4 Jul 2006 16:01:45 -0000 1.48 *************** *** 485,491 **** } ! #define PLACE_NEW_ROUTE 0 ! #define PLACE_PERSONAL_MARK 1 ! #define PLACE_TRIP_MARK 2 #define PLACE_ROUTE_MARK_DEST 3 #define PLACE_ROUTE_MARK_INSERT 4 --- 485,491 ---- } ! #define PLACE_PERSONAL_MARK 0 ! #define PLACE_TRIP_MARK 1 ! #define PLACE_NEW_ROUTE 2 #define PLACE_ROUTE_MARK_DEST 3 #define PLACE_ROUTE_MARK_INSERT 4 *************** *** 500,506 **** static char *Placement_Choices [] = { - "Start a new route", "Add to personal landmarks", "Add to trip's landmarks", "Place at route end", "Insert in closest route segment", --- 500,506 ---- static char *Placement_Choices [] = { "Add to personal landmarks", "Add to trip's landmarks", + "Start a new route", "Place at route end", "Insert in closest route segment", *************** *** 509,515 **** static void *Placement_Vals [] = { - (void *)PLACE_NEW_ROUTE, (void *)PLACE_PERSONAL_MARK, (void *)PLACE_TRIP_MARK, (void *)PLACE_ROUTE_MARK_DEST, (void *)PLACE_ROUTE_MARK_INSERT, --- 509,515 ---- static void *Placement_Vals [] = { (void *)PLACE_PERSONAL_MARK, (void *)PLACE_TRIP_MARK, + (void *)PLACE_NEW_ROUTE, (void *)PLACE_ROUTE_MARK_DEST, (void *)PLACE_ROUTE_MARK_INSERT, *************** *** 2132,2136 **** } ! if (abs (ab_dist + bc_dist - ac_dist) < 20) { wb = wa; bc_dist = ac_dist; --- 2132,2136 ---- } ! if (abs (ab_dist + bc_dist - ac_dist) < 10) { wb = wa; bc_dist = ac_dist; *************** *** 2153,2167 **** } static void roadmap_trip_route_convert_worker ! (route_head *orig_route, char *new_name) { ! int dropped; route_head *new_route; new_route = route_head_alloc(); ! dropped = roadmap_trip_simplify_route (orig_route, new_route); ! if (dropped > 0) { if (new_name) { --- 2153,2181 ---- } + void roadmap_trip_copy_route + (const route_head *orig_route, route_head *new_route) { + queue *elem, *tmp; + + QUEUE_FOR_EACH (&orig_route->waypoint_list, elem, tmp) { + waypt_add(&new_route->waypoint_list, waypt_dupe( (waypoint *)elem )); + } + + } + static void roadmap_trip_route_convert_worker ! (route_head *orig_route, char *new_name, int simplify, int wanttrack) { ! int dropped = 0; route_head *new_route; new_route = route_head_alloc(); ! if (simplify) { ! dropped = roadmap_trip_simplify_route (orig_route, new_route); ! } else { ! roadmap_trip_copy_route (orig_route, new_route); ! } ! if (!simplify || dropped > 0) { if (new_name) { *************** *** 2169,2173 **** } ! route_add(&RoadMapTripRouteHead, new_route); RoadMapCurrentRoute = new_route; --- 2183,2193 ---- } ! ! if (wanttrack) { ! new_route->rte_is_track = 1; ! route_add(&RoadMapTripTrackHead, new_route); ! } else { ! route_add(&RoadMapTripRouteHead, new_route); ! } RoadMapCurrentRoute = new_route; *************** *** 2185,2193 **** } ! void roadmap_trip_route_convert (void) { char name[50]; char *namep = NULL; if (RoadMapCurrentRoute->rte_name) { snprintf(name, 50, "Simple %s", RoadMapCurrentRoute->rte_name); --- 2205,2239 ---- } ! void roadmap_trip_track_to_route (void) { char name[50]; char *namep = NULL; + if (RoadMapCurrentRoute == NULL) { + return; + } + + if (! RoadMapCurrentRoute->rte_is_track) { + return; + } + + if (RoadMapCurrentRoute->rte_name) { + snprintf(name, 50, "TrackRoute %s", RoadMapCurrentRoute->rte_name); + namep = name; + } + + roadmap_trip_route_convert_worker (RoadMapCurrentRoute, namep, 0, 0); + + } + + void roadmap_trip_route_simplify (void) { + + char name[50]; + char *namep = NULL; + + if (RoadMapCurrentRoute == NULL) { + return; + } + if (RoadMapCurrentRoute->rte_name) { snprintf(name, 50, "Simple %s", RoadMapCurrentRoute->rte_name); *************** *** 2195,2204 **** } ! roadmap_trip_route_convert_worker (RoadMapCurrentRoute, namep); } ! void roadmap_trip_track_convert (void) { char name[40]; --- 2241,2263 ---- } ! roadmap_trip_route_convert_worker (RoadMapCurrentRoute, namep, 1, 0); } + void roadmap_trip_currenttrack_to_route (void) { ! char name[40]; ! time_t now; ! ! ! time(&now); ! strftime(name, sizeof(name), "Backtrack-%Y-%m-%d-%H:%M:%S", ! localtime(&now)); ! ! roadmap_trip_route_convert_worker (RoadMapTrack, name, 0, 0); ! ! } ! ! void roadmap_trip_currenttrack_to_track (void) { char name[40]; *************** *** 2207,2214 **** time(&now); ! strftime(name, sizeof(name), "Trail-%Y-%m-%d-%H:%M:%S", localtime(&now)); ! roadmap_trip_route_convert_worker (RoadMapTrack, name); } --- 2266,2273 ---- time(&now); ! strftime(name, sizeof(name), "Track-%Y-%m-%d-%H:%M:%S", localtime(&now)); ! roadmap_trip_route_convert_worker (RoadMapTrack, name, 0, 1); } Index: roadmap_trip.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_trip.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** roadmap_trip.h 3 Jan 2006 19:33:44 -0000 1.20 --- roadmap_trip.h 4 Jul 2006 16:01:45 -0000 1.21 *************** *** 48,52 **** void roadmap_trip_restore_focus (void); void roadmap_trip_set_focus (const char *name); - // void roadmap_trip_set_focus_waypoint (const char *name); int roadmap_trip_is_focus_changed (void); --- 48,51 ---- *************** *** 88,93 **** void roadmap_trip_route_manage_dialog (void); ! void roadmap_trip_track_convert (void); ! void roadmap_trip_route_convert (void); #endif // INCLUDE__ROADMAP_TRIP__H --- 87,94 ---- void roadmap_trip_route_manage_dialog (void); ! void roadmap_trip_track_to_route (void); ! void roadmap_trip_route_simplify (void); ! void roadmap_trip_currenttrack_to_route (void); ! void roadmap_trip_currenttrack_to_track (void); #endif // INCLUDE__ROADMAP_TRIP__H Index: roadmap_start.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_start.c,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -d -r1.98 -r1.99 *** roadmap_start.c 28 Jun 2006 01:23:27 -0000 1.98 --- roadmap_start.c 4 Jul 2006 16:01:45 -0000 1.99 *************** *** 448,455 **** roadmap_screen_toggle_orientation_mode}, ! {"IncHorizon", "Increase Horizon", "I", NULL, "Increase the 3D horizon", roadmap_screen_increase_horizon}, ! {"DecHorizon", "Decrease Horizon", "DI", NULL, "Decrease the 3D horizon", roadmap_screen_decrease_horizon}, --- 448,455 ---- roadmap_screen_toggle_orientation_mode}, ! {"increasehorizon", "Increase Horizon", "I", NULL, "Increase the 3D horizon", roadmap_screen_increase_horizon}, ! {"decreasehorizon", "Decrease Horizon", "DI", NULL, "Decrease the 3D horizon", roadmap_screen_decrease_horizon}, *************** *** 463,469 **** "Clear the current GPS breadcrumb track", roadmap_track_clear}, ! {"tracktoroute", "Make route from current track", "Track Back", NULL, ! "Convert the current GPS track to a new route", ! roadmap_trip_track_convert }, {"resumeroute", "Resume Route", "Resume", NULL, --- 463,477 ---- "Clear the current GPS breadcrumb track", roadmap_track_clear}, ! {"backtrackroute", "Create Backtrack Route", "BackTrack", NULL, ! "Convert the current GPS breadcrumb track to a new route", ! roadmap_trip_currenttrack_to_route }, ! ! {"trackroute", "Convert Track to Route", "RouteToTrack", NULL, ! "Create a new route from the currently selected track", ! roadmap_trip_track_to_route }, ! ! {"addtrack", "Add Current Track to Trip", "AddTrack", NULL, ! "Add a copy of the current GPS breadcrumb track to the trip", ! roadmap_trip_currenttrack_to_track }, {"resumeroute", "Resume Route", "Resume", NULL, *************** *** 480,490 **** {"simplifyroute", "Simplify Route", NULL, NULL, ! "Create simplified version of current route", roadmap_trip_route_convert }, ! {"createroute", "Create new route", NULL, NULL, "Start new route using last selected street or place", roadmap_start_create_route}, ! {"setasdestination", "Quick destination", NULL, NULL, "Show distance and direction to the last selected street or place", roadmap_trip_set_as_destination}, --- 488,499 ---- {"simplifyroute", "Simplify Route", NULL, NULL, ! "Create simplified version of current route", ! roadmap_trip_route_simplify }, ! {"createroute", "New route using selection", NULL, NULL, "Start new route using last selected street or place", roadmap_start_create_route}, ! {"setasdestination", "Goto selection", NULL, NULL, "Show distance and direction to the last selected street or place", roadmap_trip_set_as_destination}, *************** *** 494,501 **** {"gpsaswaypoint", "New place from GPS...", "GPS Place", "GW", ! "Create new place using current GPS position", roadmap_start_create_gps_waypoint}, {"addaswaypoint", "New place from selected...", "Place", "W", ! "Create new place using last selected street or place", roadmap_start_create_waypoint}, {"editroutewaypoints", "Route Waypoints...", NULL, NULL, --- 503,512 ---- {"gpsaswaypoint", "New place from GPS...", "GPS Place", "GW", ! "Create new place using current GPS position", ! roadmap_start_create_gps_waypoint}, {"addaswaypoint", "New place from selected...", "Place", "W", ! "Create new place using last selected street or place", ! roadmap_start_create_waypoint}, {"editroutewaypoints", "Route Waypoints...", NULL, NULL, *************** *** 563,566 **** --- 574,579 ---- "toggleorientation", "toggleview", + "IncHorizon", + "DecHorizon", "full", *************** *** 611,614 **** --- 624,628 ---- "reverseroute", "simplifyroute", + "trackroute", "createroute", "setasdestination", *************** *** 627,631 **** "tracksave", "trackclear", ! "tracktoroute", "tracktoggle", --- 641,646 ---- "tracksave", "trackclear", ! "backtrackroute", ! "addtrack", "tracktoggle", |
From: Paul F. <pg...@us...> - 2006-07-04 15:48:19
|
Update of /cvsroot/roadmap/roadmap/src/qt In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23588/qt Modified Files: Makefile Log Message: strip the targets after installation, not before. (otherwise no copy remains with symbols.) (could use "install -s", i suppose.) Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/qt/Makefile,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Makefile 3 Jul 2006 12:37:45 -0000 1.23 --- Makefile 4 Jul 2006 15:48:09 -0000 1.24 *************** *** 64,67 **** --- 64,68 ---- ln -s qtroadmap $(DESTDIR)$(bindir)/roadmap ln -s qtroadgps $(DESTDIR)$(bindir)/roadgps + cd $(DESTDIR)$(bindir) ; $(STRIP) $(TARGETS) install-ipkg: install |