You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(92) |
Dec
(141) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(126) |
Feb
(72) |
Mar
(31) |
Apr
(200) |
May
(81) |
Jun
(130) |
Jul
(112) |
Aug
(134) |
Sep
(76) |
Oct
(89) |
Nov
(153) |
Dec
(9) |
2007 |
Jan
(59) |
Feb
(82) |
Mar
(50) |
Apr
(20) |
May
(9) |
Jun
(81) |
Jul
(41) |
Aug
(109) |
Sep
(91) |
Oct
(87) |
Nov
(33) |
Dec
(60) |
2008 |
Jan
(21) |
Feb
(15) |
Mar
(38) |
Apr
(75) |
May
(59) |
Jun
(46) |
Jul
(30) |
Aug
(20) |
Sep
(35) |
Oct
(32) |
Nov
(34) |
Dec
(19) |
2009 |
Jan
(29) |
Feb
(71) |
Mar
(54) |
Apr
(17) |
May
(4) |
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(58) |
Sep
(7) |
Oct
(7) |
Nov
(12) |
Dec
(18) |
2011 |
Jan
(17) |
Feb
(29) |
Mar
(11) |
Apr
(5) |
May
(1) |
Jun
|
Jul
|
Aug
(11) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(87) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(44) |
Jun
(79) |
Jul
(16) |
Aug
(31) |
Sep
|
Oct
(51) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Pascal F M. <pas...@us...> - 2006-01-02 08:59:59
|
Update of /cvsroot/roadmap/roadmap/src/unix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9477 Modified Files: roadmap_file.c Log Message: roadmap_file_map() does not scan the search path anymore, it maps the specified file Index: roadmap_file.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/unix/roadmap_file.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** roadmap_file.c 14 Nov 2005 07:18:31 -0000 1.16 --- roadmap_file.c 2 Jan 2006 08:59:51 -0000 1.17 *************** *** 47,50 **** --- 47,51 ---- void *base; int size; + char *name; }; *************** *** 195,201 **** ! const char *roadmap_file_map (const char *set, const char *name, - const char *sequence, const char *mode, RoadMapFileContext *file) { --- 196,201 ---- ! const char *roadmap_file_map (const char *path, const char *name, const char *mode, RoadMapFileContext *file) { *************** *** 226,295 **** } else { roadmap_log (ROADMAP_ERROR, ! "%s: invalid file access mode %s", name, mode); return NULL; } if (name[0] == '/') { ! ! context->fd = open (name, open_mode, 0666); ! sequence = ""; /* Whatever, but NULL. */ ! } else { ! ! char *full_name; ! ! size_t full_name_size; ! size_t name_size = strlen(name); ! size_t size; ! ! ! if (sequence == NULL) { ! sequence = roadmap_path_first(set); ! } else { ! sequence = roadmap_path_next(set, sequence); ! } ! if (sequence == NULL) { ! return NULL; ! } ! ! full_name_size = 512; ! full_name = malloc (full_name_size); ! roadmap_check_allocated(full_name); ! ! do { ! size = strlen(sequence) + name_size + 2; ! ! if (size >= full_name_size) { ! full_name = realloc (full_name, size); ! roadmap_check_allocated(full_name); ! full_name_size = size; ! } ! ! strcpy (full_name, sequence); ! strcat (full_name, "/"); ! strcat (full_name, name); ! ! context->fd = open (full_name, open_mode, 0666); ! ! if (context->fd >= 0) break; ! ! roadmap_log (ROADMAP_DEBUG, "could not open file %s: %s", ! full_name, ! strerror(errno)); ! ! sequence = roadmap_path_next(set, sequence); ! ! } while (sequence != NULL); ! ! if (context->fd >= 0) { ! roadmap_log (ROADMAP_DEBUG, "opened file %s", full_name); ! } ! free (full_name); } if (context->fd < 0) { ! if (sequence == 0) { ! roadmap_log (ROADMAP_INFO, "cannot open file %s", name); ! } roadmap_file_unmap (&context); return NULL; --- 226,243 ---- } else { roadmap_log (ROADMAP_ERROR, ! "invalid file access mode %s for file %s", mode, name); return NULL; } if (name[0] == '/') { ! context->name = strdup(name); } else { ! context->name = roadmap_path_join (path, name); } + context->fd = open (context->name, open_mode, 0666); + if (context->fd < 0) { ! roadmap_log (ROADMAP_INFO, "cannot open file %s", context->name); roadmap_file_unmap (&context); return NULL; *************** *** 297,303 **** if (fstat (context->fd, &state_result) != 0) { ! if (sequence == 0) { ! roadmap_log (ROADMAP_ERROR, "cannot stat file %s", name); ! } roadmap_file_unmap (&context); return NULL; --- 245,249 ---- if (fstat (context->fd, &state_result) != 0) { ! roadmap_log (ROADMAP_ERROR, "cannot stat file %s", context->name); roadmap_file_unmap (&context); return NULL; *************** *** 313,317 **** if (context->base == NULL) { ! roadmap_log (ROADMAP_ERROR, "cannot map file %s", name); roadmap_file_unmap (&context); return NULL; --- 259,263 ---- if (context->base == NULL) { ! roadmap_log (ROADMAP_ERROR, "cannot map file %s", context->name); roadmap_file_unmap (&context); return NULL; *************** *** 320,324 **** *file = context; ! return sequence; /* Indicate the next directory in the path. */ } --- 266,270 ---- *file = context; ! return context->base; } *************** *** 353,356 **** --- 299,303 ---- close (context->fd); } + free(context->name); free(context); *file = NULL; |
From: Pascal F M. <pas...@us...> - 2006-01-02 08:59:19
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9369 Modified Files: roadmap_file.h Log Message: roadmap_file_map() does not scan the search path anymore, it maps the specified file Index: roadmap_file.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_file.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** roadmap_file.h 14 Nov 2005 07:09:50 -0000 1.13 --- roadmap_file.h 2 Jan 2006 08:59:11 -0000 1.14 *************** *** 32,35 **** --- 32,43 ---- * Please note however that roadmap_file_read must return an error when * trying to read beyond the end of the file. + * + * The function roadmap_file_map() maps the given file into memory and + * returns the base address of the mapping, or NULL if the mapping failed. + * + * Any function that takes a path and name parameter follows the + * conventions as set for roadmap_path_join(), i.e. the path parameter + * is ignored if either NULL or empty. In addition, roadmap_file_map() + * ignores the path parameter if the name is a full file name. */ *************** *** 81,87 **** typedef struct RoadMapFileContextStructure *RoadMapFileContext; ! const char *roadmap_file_map (const char *set, const char *name, - const char *sequence, const char *mode, RoadMapFileContext *file); --- 89,94 ---- typedef struct RoadMapFileContextStructure *RoadMapFileContext; ! const char *roadmap_file_map (const char *path, const char *name, const char *mode, RoadMapFileContext *file); |
From: Pascal F M. <pas...@us...> - 2006-01-02 08:58:02
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9168 Added Files: roadmap_scan.h Log Message: roadmap_file_map() does not scan the search path anymore, it maps the specified file --- NEW FILE: roadmap_scan.h --- /* roadmap_scan.h - a module to scan for files using path lists. * * LICENSE: * * Copyright 2002 Pascal F. Martin * * 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 * * * DESCRIPTION: * * The roadmap_scan_first() function returns a single directory path * where the given file exists. * * The roadmap_scan_next() function returns all successive directories * where to find the given file. */ #ifndef INCLUDED__ROADMAP_SCAN__H #define INCLUDED__ROADMAP_SCAN__H const char *roadmap_scan (const char *set, const char *name); const char *roadmap_scan_next (const char *set, const char *name, const char *sequence); #endif |
From: Pascal F M. <pas...@us...> - 2006-01-02 08:57:54
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9148 Added Files: roadmap_scan.c Log Message: roadmap_file_map() does not scan the search path anymore, it maps the specified file --- NEW FILE: roadmap_scan.c --- /* roadmap_scan.c - a module to scan for files using path lists. * * LICENSE: * * Copyright 2002 Pascal F. Martin * * 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 * * * DESCRIPTION: * * The roadmap_scan_first() function returns a single directory path * where the given file exists. * * The roadmap_scan_next() function returns all successive directories * where to find the given file. */ #include "roadmap.h" #include "roadmap_path.h" #include "roadmap_file.h" #include "roadmap_scan.h" const char *roadmap_scan_next (const char *set, const char *name, const char *sequence) { if (roadmap_path_is_full_path(name)) { if (roadmap_file_exists (NULL, name)) { return ""; } } else { if (sequence == NULL) { sequence = roadmap_path_first(set); } else { sequence = roadmap_path_next(set, sequence); } while (sequence != NULL) { roadmap_log (ROADMAP_DEBUG, "searching for %s file %s in %s", set, name, sequence); if (roadmap_file_exists (sequence, name)) { roadmap_log (ROADMAP_DEBUG, "found file %s in %s", name, sequence); return sequence; } sequence = roadmap_path_next(set, sequence); } } roadmap_log (ROADMAP_DEBUG, "could not find file %s", name); return NULL; /* Could not find anything. */ } const char *roadmap_scan (const char *set, const char *name) { return roadmap_scan_next (set, name, NULL); } |
From: Pascal F M. <pas...@us...> - 2006-01-02 08:57:17
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9061 Modified Files: roadmap_copy.c Log Message: roadmap_file_map() does not scan the search path anymore, it maps the specified file Index: roadmap_copy.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/roadmap_copy.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** roadmap_copy.c 14 Nov 2005 07:07:37 -0000 1.5 --- roadmap_copy.c 2 Jan 2006 08:57:09 -0000 1.6 *************** *** 54,57 **** --- 54,58 ---- #include "roadmap.h" + #include "roadmap_scan.h" #include "roadmap_file.h" #include "roadmap_download.h" *************** *** 68,75 **** int size; RoadMapFileContext input; ! if (roadmap_file_map ("maps", source, NULL, "r", &input) == NULL) { ! callbacks->error ("Cannot find the download source file"); return 0; } --- 69,85 ---- int size; + const char *path; RoadMapFileContext input; ! path = roadmap_scan ("maps", source); ! if (path == NULL) { ! callbacks->error ("Cannot find the download source file %s", source); ! return 0; ! } ! ! if (roadmap_file_map (path, source, "r", &input) == NULL) { ! callbacks->error ("Cannot access the download source file %s in %s", ! source, ! path); return 0; } |
From: Pascal F M. <pas...@us...> - 2006-01-02 08:53:37
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8507 Modified Files: buildmap_dbwrite.c Log Message: roadmap_file_map() does not scan the search path anymore, it maps the specified file Index: buildmap_dbwrite.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_dbwrite.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** buildmap_dbwrite.c 14 Nov 2005 06:57:28 -0000 1.3 --- buildmap_dbwrite.c 2 Jan 2006 08:53:29 -0000 1.4 *************** *** 39,42 **** --- 39,43 ---- #include "roadmap_types.h" + #include "roadmap_path.h" #include "roadmap_file.h" #include "roadmap_db.h" *************** *** 93,99 **** if (roadmap_file_map ! ("maps", BuildmapCurrentDbName, - NULL, "rw", &BuildmapCurrentDbBaseMapContext) == NULL) { --- 94,99 ---- if (roadmap_file_map ! (NULL, BuildmapCurrentDbName, "rw", &BuildmapCurrentDbBaseMapContext) == NULL) { *************** *** 156,161 **** } ! BuildmapCurrentDbName = ! malloc (strlen(path) + strlen(name) + strlen(ROADMAP_DB_TYPE) + 4); if (BuildmapCurrentDbName == NULL) { --- 156,160 ---- } ! BuildmapCurrentDbName = roadmap_path_join (path, name); if (BuildmapCurrentDbName == NULL) { *************** *** 164,172 **** } - strcpy (BuildmapCurrentDbName, path); - strcat (BuildmapCurrentDbName, "/"); - strcat (BuildmapCurrentDbName, name); - strcat (BuildmapCurrentDbName, ROADMAP_DB_TYPE); - roadmap_file_save (NULL, BuildmapCurrentDbName, "", 1); --- 163,166 ---- |
From: Ehud S. <esh...@us...> - 2005-12-31 09:58:58
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/track In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10432 Modified Files: editor_track_main.c Log Message: Add an option to download an updated map. Index: editor_track_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_main.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** editor_track_main.c 25 Dec 2005 23:10:43 -0000 1.8 --- editor_track_main.c 31 Dec 2005 09:58:51 -0000 1.9 *************** *** 33,37 **** #include <string.h> #include <stdlib.h> ! #include <math.h> #include <time.h> --- 33,37 ---- #include <string.h> #include <stdlib.h> ! #include <math.h> #include <time.h> |
From: Ehud S. <esh...@us...> - 2005-12-31 09:58:49
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/export In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10400 Modified Files: editor_export.c editor_export.h Log Message: Add an option to download an updated map. Index: editor_export.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/export/editor_export.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** editor_export.h 30 Nov 2005 08:13:27 -0000 1.2 --- editor_export.h 31 Dec 2005 09:58:37 -0000 1.3 *************** *** 27,30 **** --- 27,31 ---- void editor_export_gpx (void); void editor_export_reset_dirty (void); + int editor_export_empty (int fips); #endif // INCLUDE__EDITOR_EXPORT__H Index: editor_export.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/export/editor_export.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** editor_export.c 25 Dec 2005 23:08:41 -0000 1.6 --- editor_export.c 31 Dec 2005 09:58:37 -0000 1.7 *************** *** 392,396 **** return -1; } ! editor_track_end (); --- 392,396 ---- return -1; } ! editor_track_end (); *************** *** 546,547 **** --- 546,580 ---- } + int editor_export_empty (int fips) { + + int trkseg; + int num_lines; + int i; + + if (fips < 0) { + return 1; + } + + if (editor_db_activate (fips) == -1) { + return 1; + } + + editor_track_end (); + + trkseg = editor_trkseg_get_next_export (); + + if (trkseg != -1) return 0; + + num_lines = editor_line_get_count(); + + for (i=0; i<num_lines; i++) { + + int flags; + editor_line_get (i, NULL, NULL, NULL, NULL, &flags); + + if ((flags & ED_LINE_DIRTY)) return 0; + } + + return 1; + } + |
From: Ehud S. <esh...@us...> - 2005-12-31 09:58:36
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10360 Modified Files: editor_db.c editor_db.h Log Message: Add an option to download an updated map. Index: editor_db.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/db/editor_db.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** editor_db.h 1 Dec 2005 12:15:09 -0000 1.2 --- editor_db.h 31 Dec 2005 09:58:24 -0000 1.3 *************** *** 64,67 **** --- 64,69 ---- int editor_db_activate (int fips); int editor_db_locator(const RoadMapPosition *position); + void editor_db_close (int fips); + void editor_db_delete (int fips); void editor_db_mark_cfcc (int cfcc); Index: editor_db.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/db/editor_db.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** editor_db.c 1 Dec 2005 12:15:09 -0000 1.2 --- editor_db.c 31 Dec 2005 09:58:24 -0000 1.3 *************** *** 297,300 **** --- 297,301 ---- char name[100]; + char path[100]; const char *map_creation_date; buildmap_db *root; *************** *** 319,327 **** } snprintf (name, sizeof(name), "edt%05d", fips); ! if (buildmap_db_open (roadmap_path_user(), name) == -1) { editor_log (ROADMAP_ERROR, "Can't create new database: %s/%s", ! roadmap_path_user(), name); editor_log_pop (); return -1; --- 320,331 ---- } + snprintf (path, sizeof(path), "%s/maps", roadmap_path_user()); snprintf (name, sizeof(name), "edt%05d", fips); ! roadmap_path_create (path); ! ! if (buildmap_db_open (path, name) == -1) { editor_log (ROADMAP_ERROR, "Can't create new database: %s/%s", ! path, name); editor_log_pop (); return -1; *************** *** 336,340 **** (ROADMAP_ERROR, "Can't create new database (RM map has no valid timestamp): %s/%s", ! roadmap_path_user(), name); editor_log_pop (); return -1; --- 340,344 ---- (ROADMAP_ERROR, "Can't create new database (RM map has no valid timestamp): %s/%s", ! path, name); editor_log_pop (); return -1; *************** *** 422,427 **** return -1; } ! snprintf (map_name, sizeof(map_name), "%s/edt%05d", ! roadmap_path_user(), fips); /* Look for the oldest entry in the cache. */ --- 426,430 ---- return -1; } ! snprintf (map_name, sizeof(map_name), "edt%05d", fips); /* Look for the oldest entry in the cache. */ *************** *** 497,500 **** --- 500,535 ---- + void editor_db_close (int fips) { + + int i; + + for (i = EditorCacheSize-1; i >= 0; --i) { + + if (EditorCache[i].fips == fips) { + editor_db_remove (i); + } + } + + if (EditorActiveCounty == fips) { + EditorActiveCounty = 0; + } + } + + + void editor_db_delete (int fips) { + + char name[100]; + char path[100]; + + snprintf (path, sizeof(path), "%s/maps", roadmap_path_user()); + snprintf (name, sizeof(name), "edt%05d%s", fips, ROADMAP_DB_TYPE); + + if (roadmap_file_exists (path, name)) { + + roadmap_file_remove (path, name); + } + } + + void editor_db_mark_cfcc (int cfcc) { assert ((unsigned)cfcc < 8*sizeof(cfcc)); *************** *** 671,674 **** --- 706,710 ---- int fips = ActiveDBHeader->fips; char map_name[255]; + char path[100]; /* NOTE that after the call to editor_db_remove(), *************** *** 682,686 **** } ! snprintf (map_name, sizeof(map_name), "edt%05d.rdm", ActiveDBHeader->fips); ActiveDBHeader->num_total_blocks += DB_DEFAULT_INITIAL_BLOCKS; --- 718,724 ---- } ! snprintf (path, sizeof(path), "%s/maps", roadmap_path_user()); ! snprintf (map_name, sizeof(map_name), "edt%05d%s", ! ActiveDBHeader->fips, ROADMAP_DB_TYPE); ActiveDBHeader->num_total_blocks += DB_DEFAULT_INITIAL_BLOCKS; *************** *** 700,705 **** assert (i >= 0); ! if (roadmap_file_truncate ! (roadmap_path_user(), map_name, file_size) == -1) { editor_log (ROADMAP_ERROR, "Can't grow database."); --- 738,742 ---- assert (i >= 0); ! if (roadmap_file_truncate (path, map_name, file_size) == -1) { editor_log (ROADMAP_ERROR, "Can't grow database."); |
From: Ehud S. <esh...@us...> - 2005-12-31 09:58:10
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10264 Modified Files: preferences roadmap_dialog.c roadmap_main.cpp roadmap_path.c roadmap_win32.h wince_input_mon.h Log Message: Add an option to download an updated map. Index: preferences =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/preferences,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** preferences 1 Dec 2005 16:51:38 -0000 1.4 --- preferences 31 Dec 2005 09:58:00 -0000 1.5 *************** *** 20,25 **** Map.GPS map offset longitude: 0 Map.GPS map offset latitude: 0 ! Download.Destination: \Storage Card\Roadmap\maps ! Download.Source: /usr/local/share/roadmap/usc%05d.rdm History.Depth: 100 GPS.Timeout: 10 --- 20,24 ---- Map.GPS map offset longitude: 0 Map.GPS map offset latitude: 0 ! Download.Source: http://www.eshabtai.net/roadmap/maps/usc%05d.rdm History.Depth: 100 GPS.Timeout: 10 Index: roadmap_dialog.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/roadmap_dialog.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_dialog.c 28 Nov 2005 19:36:35 -0000 1.2 --- roadmap_dialog.c 31 Dec 2005 09:58:00 -0000 1.3 *************** *** 456,460 **** psp = (PROPSHEETPAGE*) calloc(count, sizeof(*psp)); ! dialog->w = CreateDialogParam(g_hInst, (LPCWSTR)IDD_GENERIC, NULL, DialogFunc, (LPARAM)dialog); --- 456,460 ---- psp = (PROPSHEETPAGE*) calloc(count, sizeof(*psp)); ! dialog->w = CreateDialogParam(g_hInst, (LPCWSTR)IDD_GENERIC, NULL, /*RoadMapMainWindow, FIXME*/ DialogFunc, (LPARAM)dialog); *************** *** 1090,1091 **** --- 1090,1095 ---- } + int dialog_test (int i) { + UpdateWindow(RoadMapDialogCurrent->w); + return 0; + } Index: roadmap_win32.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/roadmap_win32.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_win32.h 28 Nov 2005 19:36:35 -0000 1.2 --- roadmap_win32.h 31 Dec 2005 09:58:00 -0000 1.3 *************** *** 2,6 **** #define _ROADMAP_WIN32_H_ ! #include <windows.h> #define snprintf _snprintf #define strdup _strdup --- 2,14 ---- #define _ROADMAP_WIN32_H_ ! #include <windows.h> ! ! #define MENU_ID_START WM_USER ! #define MAX_MENU_ITEMS 100 ! #define TOOL_ID_START (MENU_ID_START + MAX_MENU_ITEMS + 1) ! #define MAX_TOOL_ITEMS 100 ! #define WM_USER_DUMMY (WM_USER + TOOL_ID_START + MAX_TOOL_ITEMS + 1) ! #define WM_USER_READ (WM_USER + WM_USER_DUMMY + 1) ! #define snprintf _snprintf #define strdup _strdup *************** *** 11,15 **** LPWSTR ConvertToWideChar(LPCSTR string, UINT nCodePage); ! char* ConvertToMultiByte(const LPWSTR s, UINT nCodePage); #endif /* _ROADMAP_WIN32_H_ */ --- 19,23 ---- LPWSTR ConvertToWideChar(LPCSTR string, UINT nCodePage); ! char* ConvertToMultiByte(const LPWSTR s, UINT nCodePage); #endif /* _ROADMAP_WIN32_H_ */ Index: roadmap_main.cpp =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/roadmap_main.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** roadmap_main.cpp 17 Dec 2005 21:59:48 -0000 1.5 --- roadmap_main.cpp 31 Dec 2005 09:58:00 -0000 1.6 *************** *** 49,56 **** // Menu & toolbar defines ! #define MENU_ID_START WM_USER ! #define MAX_MENU_ITEMS 100 ! #define TOOL_ID_START (MENU_ID_START + MAX_MENU_ITEMS + 1) ! #define MAX_TOOL_ITEMS 100 struct tb_icon { char *name; --- 49,53 ---- // Menu & toolbar defines ! struct tb_icon { char *name; *************** *** 760,764 **** void roadmap_main_set_status (const char *text) {} ! void roadmap_main_flush (void) {} --- 757,764 ---- void roadmap_main_set_status (const char *text) {} ! void roadmap_main_flush (void) ! { ! UpdateWindow(GetFocus()); ! } Index: wince_input_mon.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/wince_input_mon.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wince_input_mon.h 12 Dec 2005 20:48:29 -0000 1.2 --- wince_input_mon.h 31 Dec 2005 09:58:00 -0000 1.3 *************** *** 6,11 **** #include "../roadmap_io.h" - #define WM_USER_READ WM_USER+1 - typedef struct roadmap_main_io { RoadMapIO *io; --- 6,9 ---- Index: roadmap_path.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/roadmap_path.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_path.c 28 Nov 2005 19:36:35 -0000 1.2 --- roadmap_path.c 31 Dec 2005 09:58:00 -0000 1.3 *************** *** 59,62 **** --- 59,63 ---- /* The default path for the map files (the "maps" path): */ static const char *RoadMapPathMaps[] = { + "&\\maps", "\\Program Files\\roadmap\\maps", "\\Storage Card\\roadmap\\maps", *************** *** 72,75 **** --- 73,78 ---- + static char *roadmap_path_expand (const char *item, size_t length); + static void roadmap_path_list_create(const char *name, const char *items[], *************** *** 93,99 **** for (i = 0; i < count; ++i) { ! new_path->items[i] = strdup(items[i]); } ! new_path->preferred = strdup(preferred); RoadMapPaths = new_path; --- 96,102 ---- for (i = 0; i < count; ++i) { ! new_path->items[i] = roadmap_path_expand (items[i], strlen(items[i])); } ! new_path->preferred = roadmap_path_expand (preferred, strlen(preferred)); RoadMapPaths = new_path; *************** *** 107,115 **** /* Add the hardcoded configuration. */ roadmap_path_list_create ("config", RoadMapPathConfig, RoadMapPathConfigPreferred); roadmap_path_list_create ("maps", RoadMapPathMaps, RoadMapPathMapsPreferred); - roadmap_path_list_create ("user", RoadMapPathUser, roadmap_path_user()); } --- 110,118 ---- /* Add the hardcoded configuration. */ + roadmap_path_list_create ("user", RoadMapPathUser, roadmap_path_user()); roadmap_path_list_create ("config", RoadMapPathConfig, RoadMapPathConfigPreferred); roadmap_path_list_create ("maps", RoadMapPathMaps, RoadMapPathMapsPreferred); } *************** *** 227,230 **** --- 230,256 ---- + static char *roadmap_path_expand (const char *item, size_t length) { + + const char *expansion; + size_t expansion_length; + char *expanded; + + switch (item[0]) { + case '&': expansion = roadmap_path_user(); item++; length--; break; + default: expansion = ""; + } + expansion_length = strlen(expansion); + + expanded = malloc (length + expansion_length + 1); + roadmap_check_allocated(expanded); + + strcpy (expanded, expansion); + strncat (expanded, item, length); + + expanded[length+expansion_length] = 0; + + return expanded; + } + /* Path lists operations. -------------------------------------------------- */ *************** *** 233,240 **** int i; int count; - int length; - int expand_length; const char *item; - const char *expand; const char *next_item; --- 259,263 ---- *************** *** 280,300 **** next_item = strchr (item, ','); - expand = ""; - expand_length = strlen(expand); - if (next_item == NULL) { ! length = strlen(item); } else { ! length = next_item - item; } - path_list->items[i] = malloc (length + expand_length + 1); - roadmap_check_allocated(path_list->items[i]); - - strcpy (path_list->items[i], expand); - strncat (path_list->items[i], item, length); - - (path_list->items[i])[length+expand_length] = 0; - if (roadmap_file_exists(NULL, path_list->items[i])) { ++i; --- 303,313 ---- next_item = strchr (item, ','); if (next_item == NULL) { ! path_list->items[i] = roadmap_path_expand (item, strlen(item)); } else { ! path_list->items[i] = ! roadmap_path_expand (item, (size_t)(next_item - item)); } if (roadmap_file_exists(NULL, path_list->items[i])) { ++i; |
From: Ehud S. <esh...@us...> - 2005-12-31 09:57:49
|
Update of /cvsroot/roadmap/roadmap_editor/src/unix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9756 Modified Files: roadmap_path.c Log Message: Add an option to download an updated map. Index: roadmap_path.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/unix/roadmap_path.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_path.c 28 Nov 2005 19:36:35 -0000 1.2 --- roadmap_path.c 31 Dec 2005 09:57:42 -0000 1.3 *************** *** 30,33 **** --- 30,34 ---- #include <string.h> + #include <errno.h> #include <sys/types.h> #include <sys/stat.h> *************** *** 121,124 **** --- 122,127 ---- + static char *roadmap_path_expand (const char *item, size_t length); + static void roadmap_path_list_create(const char *name, const char *items[], *************** *** 126,131 **** ! int i; ! int count; RoadMapPathList new_path; --- 129,134 ---- ! size_t i; ! size_t count; RoadMapPathList new_path; *************** *** 137,141 **** new_path->next = RoadMapPaths; new_path->name = strdup(name); ! new_path->count = count; new_path->items = calloc (count, sizeof(char *)); --- 140,144 ---- new_path->next = RoadMapPaths; new_path->name = strdup(name); ! new_path->count = (int)count; new_path->items = calloc (count, sizeof(char *)); *************** *** 143,149 **** for (i = 0; i < count; ++i) { ! new_path->items[i] = strdup(items[i]); } ! new_path->preferred = strdup(preferred); RoadMapPaths = new_path; --- 146,152 ---- for (i = 0; i < count; ++i) { ! new_path->items[i] = roadmap_path_expand (items[i], strlen(items[i])); } ! new_path->preferred = roadmap_path_expand (preferred, strlen(preferred)); RoadMapPaths = new_path; *************** *** 294,297 **** --- 297,325 ---- + static char *roadmap_path_expand (const char *item, size_t length) { + + const char *expansion; + size_t expansion_length; + char *expanded; + + switch (item[0]) { + case '~': expansion = roadmap_path_home(); item++; length--; break; + case '&': expansion = roadmap_path_user(); item++; length--; break; + default: expansion = ""; + } + expansion_length = strlen(expansion); + + expanded = malloc (length + expansion_length + 1); + roadmap_check_allocated(expanded); + + strcpy (expanded, expansion); + strncat (expanded, item, length); + + expanded[length+expansion_length] = 0; + + return expanded; + } + + /* Path lists operations. -------------------------------------------------- */ *************** *** 299,307 **** int i; ! int count; ! int length; ! int expand_length; const char *item; - const char *expand; const char *next_item; --- 327,332 ---- int i; ! size_t count; const char *item; const char *next_item; *************** *** 347,371 **** next_item = strchr (item, ','); - switch (item[0]) { - case '~': expand = roadmap_path_home(); item += 1; break; - case '&': expand = roadmap_path_user(); item += 1; break; - default: expand = ""; - } - expand_length = strlen(expand); - if (next_item == NULL) { ! length = strlen(item); } else { ! length = next_item - item; } - path_list->items[i] = malloc (length + expand_length + 1); - roadmap_check_allocated(path_list->items[i]); - - strcpy (path_list->items[i], expand); - strncat (path_list->items[i], item, length); - - (path_list->items[i])[length+expand_length] = 0; - if (roadmap_file_exists(NULL, path_list->items[i])) { ++i; --- 372,382 ---- next_item = strchr (item, ','); if (next_item == NULL) { ! path_list->items[i] = roadmap_path_expand (item, strlen(item)); } else { ! path_list->items[i] = ! roadmap_path_expand (item, (size_t)(next_item - item)); } if (roadmap_file_exists(NULL, path_list->items[i])) { ++i; *************** *** 470,478 **** char **roadmap_path_list (const char *path, const char *extension) { ! char *match; ! int length; ! int count; ! char **result; ! char **cursor; DIR *directory; --- 481,489 ---- char **roadmap_path_list (const char *path, const char *extension) { ! char *match; ! int length; ! size_t count; ! char **result; ! char **cursor; DIR *directory; *************** *** 490,500 **** rewinddir (directory); ! length = strlen(extension); while ((entry = readdir(directory)) != NULL) { ! match = entry->d_name + strlen(entry->d_name) - length; ! if (! strcmp (match, extension)) { *(cursor++) = strdup (entry->d_name); } --- 501,522 ---- rewinddir (directory); ! if (extension != NULL) { ! length = strlen(extension); ! } else { ! length = 0; ! } while ((entry = readdir(directory)) != NULL) { ! if (entry->d_name[0] == '.') continue; ! if (length > 0) { ! ! match = entry->d_name + strlen(entry->d_name) - length; ! ! if (! strcmp (match, extension)) { ! *(cursor++) = strdup (entry->d_name); ! } ! } else { *(cursor++) = strdup (entry->d_name); } *************** *** 546,549 **** --- 568,583 ---- + int roadmap_path_is_directory (const char *name) { + + struct stat file_attributes; + + if (stat (name, &file_attributes) != 0) { + return 0; + } + + return S_ISDIR(file_attributes.st_mode); + } + + const char *roadmap_path_temporary (void) { |
From: Ehud S. <esh...@us...> - 2005-12-31 09:57:39
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9724 Modified Files: editor_main.c Log Message: Add an option to download an updated map. Index: editor_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/editor_main.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** editor_main.c 1 Dec 2005 12:12:43 -0000 1.4 --- editor_main.c 31 Dec 2005 09:57:28 -0000 1.5 *************** *** 67,70 **** --- 67,75 ---- EditorEnabled = status; + if (!EditorEnabled) { + + editor_track_end (); + } + editor_screen_set (status); } |
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9668 Modified Files: roadmap_dbread.c roadmap_download.c roadmap_httpcopy.c roadmap_locator.c roadmap_screen.c roadmap_start.c roadmap_start.h Log Message: Add an option to download an updated map. Index: roadmap_download.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_download.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** roadmap_download.c 15 Oct 2005 22:19:00 -0000 1.1.1.1 --- roadmap_download.c 31 Dec 2005 09:57:09 -0000 1.2 *************** *** 84,88 **** static int RoadMapDownloadCurrentFileSize = 0; ! static int RoadMapDownloadDownloaded = 0; --- 84,88 ---- static int RoadMapDownloadCurrentFileSize = 0; ! static int RoadMapDownloadDownloaded = -1; *************** *** 112,116 **** RoadMapDownloadCurrentFileSize = size; ! RoadMapDownloadDownloaded = 0; return 1; } --- 112,116 ---- RoadMapDownloadCurrentFileSize = size; ! RoadMapDownloadDownloaded = -1; return 1; } *************** *** 167,170 **** --- 167,172 ---- RoadMapDownloadRefresh = 0; RoadMapDownloadWhenDone (); + } else { + RoadMapDownloadWhenDone (); } } *************** *** 179,183 **** ! /* Avoid updating the dialod too often: this may slowdown the download. */ if (progress == RoadMapDownloadDownloaded) return; --- 181,185 ---- ! /* Avoid updating the dialog too often: this may slowdown the download. */ if (progress == RoadMapDownloadDownloaded) return; *************** *** 204,209 **** if (loaded == RoadMapDownloadCurrentFileSize) { ! roadmap_dialog_hide (".file"); ! roadmap_download_end (); } else { roadmap_download_format_size (image, loaded); --- 206,210 ---- if (loaded == RoadMapDownloadCurrentFileSize) { ! roadmap_dialog_hide ("Downloading"); } else { roadmap_download_format_size (image, loaded); *************** *** 393,396 **** --- 394,398 ---- roadmap_start_freeze (); + roadmap_locator_close (fips); if (protocol->handler (&RoadMapDownloadCallbackFunctions, *************** *** 402,405 **** --- 404,408 ---- roadmap_download_unblock (fips); roadmap_start_unfreeze (); + roadmap_download_end (); break; } *************** *** 461,467 **** roadmap_dialog_set_data (".file", "From", source); ! snprintf (buffer, sizeof(buffer), "%s%s", roadmap_config_get (&RoadMapConfigDestination), basename); roadmap_dialog_set_data (".file", "To", buffer); --- 464,475 ---- roadmap_dialog_set_data (".file", "From", source); ! ! #ifndef _WIN32 snprintf (buffer, sizeof(buffer), "%s%s", roadmap_config_get (&RoadMapConfigDestination), basename); + #else + snprintf (buffer, sizeof(buffer), "%s\\%s", + roadmap_config_get (&RoadMapConfigDestination), basename+1); + #endif roadmap_dialog_set_data (".file", "To", buffer); *************** *** 649,657 **** for (i = 0; i < RoadMapDownloadDeleteCount; ++i) { ! snprintf (name, sizeof(name), "%s/" ROADMAP_FILE_NAME_FORMAT, roadmap_config_get (&RoadMapConfigDestination), RoadMapDownloadDeleteFips[i]); ! if (! roadmap_file_exists (NULL, name)) { --- 657,670 ---- for (i = 0; i < RoadMapDownloadDeleteCount; ++i) { ! ! #ifndef _WIN32 snprintf (name, sizeof(name), "%s/" ROADMAP_FILE_NAME_FORMAT, roadmap_config_get (&RoadMapConfigDestination), RoadMapDownloadDeleteFips[i]); ! #else ! snprintf (name, sizeof(name), "%s\\" ROADMAP_FILE_NAME_FORMAT, ! roadmap_config_get (&RoadMapConfigDestination), ! RoadMapDownloadDeleteFips[i]); ! #endif if (! roadmap_file_exists (NULL, name)) { *************** *** 691,699 **** roadmap_download_block (RoadMapDownloadDeleteSelected); ! snprintf (path, sizeof(path), "%s/" ROADMAP_FILE_NAME_FORMAT, roadmap_config_get (&RoadMapConfigDestination), RoadMapDownloadDeleteSelected); ! roadmap_locator_close (RoadMapDownloadDeleteSelected); roadmap_file_remove (NULL, path); --- 704,717 ---- roadmap_download_block (RoadMapDownloadDeleteSelected); ! ! #ifndef _WIN32 snprintf (path, sizeof(path), "%s/" ROADMAP_FILE_NAME_FORMAT, roadmap_config_get (&RoadMapConfigDestination), RoadMapDownloadDeleteSelected); ! #else ! snprintf (path, sizeof(path), "%s\\" ROADMAP_FILE_NAME_FORMAT, ! roadmap_config_get (&RoadMapConfigDestination), ! RoadMapDownloadDeleteSelected); ! #endif roadmap_locator_close (RoadMapDownloadDeleteSelected); roadmap_file_remove (NULL, path); *************** *** 767,774 **** ("preferences", &RoadMapConfigSource, ! "/usr/local/share/roadmap/" ROADMAP_FILE_NAME_FORMAT); snprintf (default_destination, sizeof(default_destination), ! "%s/maps", roadmap_path_user()); roadmap_config_declare --- 785,792 ---- ("preferences", &RoadMapConfigSource, ! "http://www.eshabtai.net/roadmap/maps/" ROADMAP_FILE_NAME_FORMAT); snprintf (default_destination, sizeof(default_destination), ! "%s\\maps", roadmap_path_user()); roadmap_config_declare Index: roadmap_start.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_start.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** roadmap_start.c 25 Dec 2005 23:08:01 -0000 1.10 --- roadmap_start.c 31 Dec 2005 09:57:09 -0000 1.11 *************** *** 72,75 **** --- 72,76 ---- #include "editor/editor_main.h" + #include "editor/db/editor_db.h" #include "editor/export/editor_export.h" *************** *** 150,156 **** "A Street navigation system\n" "for Linux & UNIX" ! "\n\nEditor Plugin 0.3.3\n" ! "Ehud Shabtai\n" ! "esh...@gm..."); } --- 151,157 ---- "A Street navigation system\n" "for Linux & UNIX" ! "\n\nEditor Plugin 0.4.0\n" ! "Ehud Shabtai\n" ! "esh...@gm..."); } *************** *** 160,163 **** --- 161,225 ---- } + 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]); + } + + + roadmap_screen_redraw (); + } + + static void roadmap_start_create_trip (void) { *************** *** 412,415 **** --- 474,480 ---- "Export editor data", roadmap_start_export_data}, + {"updatemap", "Update map", NULL, NULL, + "Export editor data", roadmap_start_download_map}, + {NULL, NULL, NULL, NULL, NULL, NULL} }; *************** *** 426,429 **** --- 491,495 ---- "exportdata", + "updatemap", RoadMapFactorySeparator, *************** *** 807,810 **** --- 873,881 ---- } + int roadmap_start_is_frozen (void) { + + return RoadMapStartFrozen; + } + void roadmap_start (int argc, char **argv) { Index: roadmap_start.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_start.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** roadmap_start.h 15 Oct 2005 22:18:53 -0000 1.1.1.1 --- roadmap_start.h 31 Dec 2005 09:57:09 -0000 1.2 *************** *** 34,37 **** --- 34,38 ---- void roadmap_start_freeze (void); void roadmap_start_unfreeze (void); + int roadmap_start_is_frozen (void); void roadmap_start (int argc, char **argv); Index: roadmap_dbread.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_dbread.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** roadmap_dbread.c 15 Oct 2005 22:19:01 -0000 1.1.1.1 --- roadmap_dbread.c 31 Dec 2005 09:57:09 -0000 1.2 *************** *** 578,587 **** roadmap_db_database *database; ! for (database = RoadmapDatabaseFirst; ! database != NULL; ! database = database->next) { roadmap_db_close_database (database); } } --- 578,588 ---- roadmap_db_database *database; + roadmap_db_database *next; ! for (database = RoadmapDatabaseFirst; database != NULL; ) { + next = database->next; roadmap_db_close_database (database); + database = next; } } Index: roadmap_locator.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_locator.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** roadmap_locator.c 12 Dec 2005 20:35:42 -0000 1.4 --- roadmap_locator.c 31 Dec 2005 09:57:09 -0000 1.5 *************** *** 249,252 **** --- 249,256 ---- } } + + if (RoadMapActiveCounty == fips) { + RoadMapActiveCounty = 0; + } } Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_screen.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** roadmap_screen.c 12 Dec 2005 20:36:32 -0000 1.4 --- roadmap_screen.c 31 Dec 2005 09:57:09 -0000 1.5 *************** *** 815,819 **** ! if (!RoadMapScreenDragging && RoadMapScreenFrozen) return; if (RoadMapScreenDragging && --- 815,819 ---- ! if (RoadMapScreenFrozen) return; if (RoadMapScreenDragging && Index: roadmap_httpcopy.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_httpcopy.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** roadmap_httpcopy.c 15 Oct 2005 22:18:50 -0000 1.1.1.1 --- roadmap_httpcopy.c 31 Dec 2005 09:57:09 -0000 1.2 *************** *** 53,58 **** #include "roadmap_httpcopy.h" ! ! #define ROADMAP_HTTP_MAX_CHUNK 32768 --- 53,62 ---- #include "roadmap_httpcopy.h" ! ! #ifndef _WIN32 ! #define ROADMAP_HTTP_MAX_CHUNK 32768 ! #else ! #define ROADMAP_HTTP_MAX_CHUNK 4096 ! #endif *************** *** 270,273 **** --- 274,278 ---- } + callbacks->progress (received); roadmap_file_remove (NULL, destination); |
From: Ehud S. <esh...@us...> - 2005-12-25 23:10:57
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/track In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5917 Modified Files: editor_track_filter.c editor_track_known.c editor_track_main.c editor_track_unknown.c editor_track_util.c Log Message: Detect U-turns on known roads correctly. Fix split when connecting to a known road. Index: editor_track_util.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_util.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** editor_track_util.c 17 Dec 2005 21:59:17 -0000 1.5 --- editor_track_util.c 25 Dec 2005 23:10:43 -0000 1.6 *************** *** 215,218 **** --- 215,225 ---- * much as possible. */ + + if (abs (last_azymuth_diff - current_azymuth_diff) > 10) { + break; + } + + last_azymuth_diff = current_azymuth_diff; + if (roadmap_fuzzy_is_acceptable (current_fuzzy)) { start_point_id = i; Index: editor_track_filter.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_filter.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** editor_track_filter.c 17 Dec 2005 21:59:17 -0000 1.4 --- editor_track_filter.c 25 Dec 2005 23:10:43 -0000 1.5 *************** *** 136,141 **** azymuth = roadmap_math_azymuth ! ((RoadMapPosition *) &filter->normalized_gps_point, ! (RoadMapPosition *) &filter->last_gps_point); filter->normalized_gps_point.steering = azymuth; --- 136,141 ---- azymuth = roadmap_math_azymuth ! ((RoadMapPosition *) &filter->last_gps_point, ! (RoadMapPosition *) &filter->normalized_gps_point); filter->normalized_gps_point.steering = azymuth; Index: editor_track_known.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_known.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** editor_track_known.c 17 Dec 2005 21:59:17 -0000 1.3 --- editor_track_known.c 25 Dec 2005 23:10:43 -0000 1.4 *************** *** 206,216 **** current_fuzzy = roadmap_navigate_fuzzify ! (confirmed_street, confirmed_line, confirmed_line, gps_position->steering); } ! if ((current_fuzzy >= before) || ! roadmap_fuzzy_is_certain(current_fuzzy)) { confirmed_street->fuzzyfied = current_fuzzy; --- 206,218 ---- current_fuzzy = roadmap_navigate_fuzzify ! (new_street, ! confirmed_line, confirmed_line, gps_position->steering); } ! if ((new_street->line_direction == confirmed_street->line_direction) && ! ((current_fuzzy >= before) || ! roadmap_fuzzy_is_certain(current_fuzzy))) { confirmed_street->fuzzyfied = current_fuzzy; *************** *** 254,258 **** (&confirmed_line->line, &RoadMapNeighbourhood[found].line) || (confirmed_street->opposite_street_direction != ! new_street->opposite_street_direction))) { *new_line = RoadMapNeighbourhood[found]; --- 256,262 ---- (&confirmed_line->line, &RoadMapNeighbourhood[found].line) || (confirmed_street->opposite_street_direction != ! new_street->opposite_street_direction) || ! (confirmed_street->line_direction != ! new_street->line_direction))) { *new_line = RoadMapNeighbourhood[found]; Index: editor_track_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_main.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** editor_track_main.c 17 Dec 2005 21:59:17 -0000 1.7 --- editor_track_main.c 25 Dec 2005 23:10:43 -0000 1.8 *************** *** 317,320 **** --- 317,325 ---- pos.latitude = (pos1->latitude + pos2->latitude) / 2; + if (cur_node.plugin_id == ROADMAP_PLUGIN_ID) { + cur_node.id = editor_point_roadmap_to_editor (cur_node.id); + cur_node.plugin_id = EditorPluginID; + } + editor_point_set_pos (cur_node.id, &pos); *************** *** 327,330 **** --- 332,340 ---- case TRACK_ROAD_ROUNDABOUT: + if (cur_node.plugin_id == ROADMAP_PLUGIN_ID) { + cur_node.id = editor_point_roadmap_to_editor (cur_node.id); + cur_node.plugin_id = EditorPluginID; + } + create_new_line (start_point, end_point, cur_node.id, cur_node.id, 4); *************** *** 343,350 **** (&TrackConfirmedLine, track_point_pos (end_point), ! points_count-1, TrackConfirmedStreet.opposite_street_direction, &end_node); end_node_id = end_node.id; } --- 353,365 ---- (&TrackConfirmedLine, track_point_pos (end_point), ! end_point, TrackConfirmedStreet.opposite_street_direction, &end_node); + if (end_node.plugin_id == ROADMAP_PLUGIN_ID) { + end_node.id = editor_point_roadmap_to_editor (end_node.id); + end_node.plugin_id = EditorPluginID; + } + end_node_id = end_node.id; } *************** *** 361,365 **** ! static void track_rec_locate_point(int point_id) { int i; --- 376,380 ---- ! static void track_rec_locate_point(int point_id, int force_unknown) { int i; *************** *** 367,370 **** --- 382,387 ---- TrackNewSegment new_segments[10]; + assert (!force_unknown || cur_active_line); + if (!cur_active_line) { *************** *** 390,394 **** for (i=0; i<points_count; i++) { ! track_rec_locate_point (i); } } --- 407,411 ---- for (i=0; i<points_count; i++) { ! track_rec_locate_point (i, 1); } } *************** *** 404,408 **** new_segments, sizeof(new_segments) / sizeof(new_segments[0]), ! 0); if (count) { --- 421,425 ---- new_segments, sizeof(new_segments) / sizeof(new_segments[0]), ! force_unknown); if (count) { *************** *** 423,433 **** /* After creating a new line, we need to check if the current ! * point_is still known. ! * This is not an efficent way to do it... */ for (i=0; i<points_count; i++) { ! track_rec_locate_point (i); } } --- 440,449 ---- /* After creating a new line, we need to check if the current ! * point_is still unknown. */ for (i=0; i<points_count; i++) { ! track_rec_locate_point (i, 0); } } *************** *** 485,489 **** roadmap_fuzzy_set_cycle_params (40, 150); ! track_rec_locate_point (point_id); } --- 501,505 ---- roadmap_fuzzy_set_cycle_params (40, 150); ! track_rec_locate_point (point_id, 0); } Index: editor_track_unknown.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_unknown.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** editor_track_unknown.c 16 Dec 2005 14:46:26 -0000 1.2 --- editor_track_unknown.c 25 Dec 2005 23:10:43 -0000 1.3 *************** *** 397,401 **** int count; - #if 0 if (force) { /* this point is already known to be unknown */ --- 397,400 ---- *************** *** 403,407 **** (point_id, gps_position, new_segment, max_segments); } - #endif /* let's see if we got to a known street line */ --- 402,405 ---- |
From: Ehud S. <esh...@us...> - 2005-12-25 23:09:33
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/static In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5577 Modified Files: editor_dialog.c Log Message: Code indent. Index: editor_dialog.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/static/editor_dialog.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** editor_dialog.c 16 Dec 2005 14:45:00 -0000 1.4 --- editor_dialog.c 25 Dec 2005 23:09:19 -0000 1.5 *************** *** 249,253 **** if (line->line.plugin_id != EditorPluginID) { ! int new_line = editor_line_copy (line->line.line_id, line->line.cfcc, line->line.fips); if (new_line == -1) { editor_log --- 249,254 ---- if (line->line.plugin_id != EditorPluginID) { ! int new_line = editor_line_copy ! (line->line.line_id, line->line.cfcc, line->line.fips); if (new_line == -1) { editor_log |
From: Ehud S. <esh...@us...> - 2005-12-25 23:08:49
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/export In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5385 Modified Files: editor_export.c Log Message: Fix time export when it's not available. Index: editor_export.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/export/editor_export.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** editor_export.c 17 Dec 2005 21:59:00 -0000 1.5 --- editor_export.c 25 Dec 2005 23:08:41 -0000 1.6 *************** *** 77,81 **** } ! add_timestamp (file, time); fprintf (file, "</trkpt>\n"); --- 77,83 ---- } ! if (time != (time_t) -1) { ! add_timestamp (file, time); ! } fprintf (file, "</trkpt>\n"); *************** *** 153,157 **** for (i=first_shape; i<=last_shape; i++) { editor_shape_position (i, &trkseg_pos); ! editor_shape_time (i, &start_time); add_trkpt --- 155,162 ---- for (i=first_shape; i<=last_shape; i++) { editor_shape_position (i, &trkseg_pos); ! ! if (start_time != (time_t) -1) { ! editor_shape_time (i, &start_time); ! } add_trkpt *************** *** 236,239 **** --- 241,246 ---- roadmap_line_points (line_id, &roadmap_from_id, &roadmap_to_id); + roadmap_from_id = roadmap_point_db_id (roadmap_from_id); + roadmap_to_id = roadmap_point_db_id (roadmap_to_id); } |
From: Ehud S. <esh...@us...> - 2005-12-25 23:08:09
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5263 Modified Files: roadmap_start.c Log Message: Bump editor version. Index: roadmap_start.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_start.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** roadmap_start.c 17 Dec 2005 21:57:36 -0000 1.9 --- roadmap_start.c 25 Dec 2005 23:08:01 -0000 1.10 *************** *** 150,154 **** "A Street navigation system\n" "for Linux & UNIX" ! "\n\nEditor Plugin 0.3.1\n" "Ehud Shabtai\n" "esh...@gm..."); --- 150,154 ---- "A Street navigation system\n" "for Linux & UNIX" ! "\n\nEditor Plugin 0.3.3\n" "Ehud Shabtai\n" "esh...@gm..."); |
From: Ehud S. <esh...@us...> - 2005-12-25 23:07:43
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5211 Modified Files: roadmap_navigate.c roadmap_navigate.h Log Message: Detect U-turns on known roads correctly. Index: roadmap_navigate.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_navigate.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** roadmap_navigate.c 16 Dec 2005 14:40:35 -0000 1.5 --- roadmap_navigate.c 25 Dec 2005 23:07:36 -0000 1.6 *************** *** 221,230 **** (RoadMapTracking *tracked, RoadMapNeighbour *previous_line, ! RoadMapNeighbour *line, int direction) { RoadMapFuzzy fuzzyfied_distance; RoadMapFuzzy fuzzyfied_direction; RoadMapFuzzy connected; int line_direction = 0; int symetric = 0; --- 221,235 ---- (RoadMapTracking *tracked, RoadMapNeighbour *previous_line, ! RoadMapNeighbour *line, ! int direction) { RoadMapFuzzy fuzzyfied_distance; RoadMapFuzzy fuzzyfied_direction; + RoadMapFuzzy fuzzyfied_direction_with_line = 0; + RoadMapFuzzy fuzzyfied_direction_against_line = 0; RoadMapFuzzy connected; int line_direction = 0; + int azymuth_with_line; + int azymuth_against_line; int symetric = 0; *************** *** 244,254 **** if (symetric || (line_direction == ROUTE_DIRECTION_WITH_LINE)) { ! tracked->direction = roadmap_math_azymuth (&line->from, &line->to); ! } else { ! tracked->direction = roadmap_math_azymuth (&line->to, &line->from); } ! fuzzyfied_direction = ! roadmap_fuzzy_direction (tracked->direction, direction, symetric); if (! roadmap_fuzzy_is_acceptable (fuzzyfied_direction)) { --- 249,276 ---- if (symetric || (line_direction == ROUTE_DIRECTION_WITH_LINE)) { ! azymuth_with_line = roadmap_math_azymuth (&line->from, &line->to); ! fuzzyfied_direction_with_line = ! roadmap_fuzzy_direction (azymuth_with_line, direction, 0); ! ! } ! ! if (symetric || (line_direction == ROUTE_DIRECTION_AGAINST_LINE)) { ! azymuth_against_line = roadmap_math_azymuth (&line->to, &line->from); ! fuzzyfied_direction_against_line = ! roadmap_fuzzy_direction (azymuth_against_line, direction, 0); } + + if (fuzzyfied_direction_against_line > + fuzzyfied_direction_with_line) { + + fuzzyfied_direction = fuzzyfied_direction_against_line; + tracked->azymuth = azymuth_against_line; + tracked->line_direction = ROUTE_DIRECTION_AGAINST_LINE; + } else { ! fuzzyfied_direction = fuzzyfied_direction_with_line; ! tracked->azymuth = azymuth_with_line; ! tracked->line_direction = ROUTE_DIRECTION_WITH_LINE; ! } if (! roadmap_fuzzy_is_acceptable (fuzzyfied_direction)) { *************** *** 282,286 **** delta = roadmap_math_delta_direction (position->steering, ! RoadMapConfirmedStreet.direction); return (delta < 90 && delta > -90); --- 304,308 ---- delta = roadmap_math_delta_direction (position->steering, ! RoadMapConfirmedStreet.azymuth); return (delta < 90 && delta > -90); Index: roadmap_navigate.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_navigate.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_navigate.h 28 Nov 2005 19:36:34 -0000 1.2 --- roadmap_navigate.h 25 Dec 2005 23:07:36 -0000 1.3 *************** *** 40,44 **** PluginStreet street; ! int direction; int opposite_street_direction; --- 40,45 ---- PluginStreet street; ! int azymuth; ! int line_direction; int opposite_street_direction; *************** *** 53,57 **** } RoadMapTracking; ! #define ROADMAP_TRACKING_NULL {0, PLUGIN_STREET_NULL, 0, 0, 0, PLUGIN_LINE_NULL, {0, 0}, {0, 0, 0}}; void roadmap_navigate_disable (void); --- 54,58 ---- } RoadMapTracking; ! #define ROADMAP_TRACKING_NULL {0, PLUGIN_STREET_NULL, 0, 0, 0, 0, PLUGIN_LINE_NULL, {0, 0}, {0, 0, 0}}; void roadmap_navigate_disable (void); |
From: Ehud S. <esh...@us...> - 2005-12-25 23:07:19
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5114 Modified Files: buildmap_postgres.c Log Message: Support the different layers. Index: buildmap_postgres.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_postgres.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** buildmap_postgres.c 12 Dec 2005 20:35:41 -0000 1.2 --- buildmap_postgres.c 25 Dec 2005 23:07:08 -0000 1.3 *************** *** 99,102 **** --- 99,108 ---- static int pg2layer (int layer) { + switch (layer) { + case 1: return ROADMAP_ROAD_STREET; + case 2: return ROADMAP_ROAD_MAIN; + case 3: return ROADMAP_ROAD_FREEWAY; + } + return ROADMAP_ROAD_STREET; } |
From: Pascal F M. <pas...@us...> - 2005-12-20 09:15:35
|
Update of /cvsroot/roadmap/roadmap/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5175 Modified Files: download.html Log Message: Replace 1.0.12p1 with 1.0.12p2, add reference to latest zroadmap. Index: download.html =================================================================== RCS file: /cvsroot/roadmap/roadmap/web/download.html,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** download.html 18 Nov 2005 20:42:46 -0000 1.36 --- download.html 20 Dec 2005 09:15:25 -0000 1.37 *************** *** 49,65 **** <CENTER> <P> ! A version of RoadMap for the Sharp Zaurus is also available from ! <A class="norma;" href="http://downloads.zaurususergroup.com/community/66.180.235.230/projects/zroadmap/"> ! Sharp's Zaurus user's group web site </A>. <P> ! The latest Roadmap sources are also available from <A class=normal ! href="http://sourceforge.net/projects/roadmap/">Sourceforge</A>. </CENTER> <HR> The RoadMap files below are tar files compressed using <b>gzip</b>. ! <P>RoadMap v1.0.12p1: ! <A class=normal href="roadmap/roadmap_1_0_12p1_src.tar.gz">1.0.12 Patch with full PocketPC sources</A>. <P>RoadMap v1.0.12: --- 49,68 ---- <CENTER> <P> ! A version of RoadMap 1.0.12 for the Sharp Zaurus is also available from ! Wendell Turner's ! <A class="normal" ! href="http://www.halcyon.com/wturner/zroadmap_1.0.12-r2_armv5te.ipk"> ! Sharp Zaurus ipk </A>. <P> ! The latest Roadmap sources are also available from ! <A class="normal" ! href="http://sourceforge.net/projects/roadmap/">Sourceforge</A>. </CENTER> <HR> The RoadMap files below are tar files compressed using <b>gzip</b>. ! <P>RoadMap v1.0.12p2: ! <A class=normal href="roadmap/roadmap_1_0_12p2_src.tar.gz">1.0.12 full sources plus missing PocketPC sources</A>. <P>RoadMap v1.0.12: |
From: Ehud S. <esh...@us...> - 2005-12-17 22:00:20
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6697 Modified Files: time.c Log Message: Fix bug in mktime. Index: time.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/time.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** time.c 16 Dec 2005 14:41:32 -0000 1.2 --- time.c 17 Dec 2005 22:00:08 -0000 1.3 *************** *** 98,102 **** mktime(struct tm *_tm) { ! return _mktime(_tm->tm_year, _tm->tm_mon, _tm->tm_mday, _tm->tm_hour, _tm->tm_min, _tm->tm_sec) + get_bias() * 60; } --- 98,102 ---- mktime(struct tm *_tm) { ! return _mktime(_tm->tm_year + 1900, _tm->tm_mon + 1, _tm->tm_mday, _tm->tm_hour, _tm->tm_min, _tm->tm_sec) + get_bias() * 60; } |
From: Ehud S. <esh...@us...> - 2005-12-17 21:59:56
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6543 Modified Files: roadmap_main.cpp roadmap_serial.c win32_serial.h wince_input_mon.c Log Message: Serial communication fix. Index: wince_input_mon.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/wince_input_mon.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wince_input_mon.c 16 Dec 2005 14:41:32 -0000 1.3 --- wince_input_mon.c 17 Dec 2005 21:59:48 -0000 1.4 *************** *** 23,32 **** */ ! #include <windows.h> #include <assert.h> #include "../roadmap.h" #include "../roadmap_io.h" #include "../roadmap_serial.h" ! #include "wince_input_mon.h" #include "win32_serial.h" --- 23,32 ---- */ ! #include <windows.h> #include <assert.h> #include "../roadmap.h" #include "../roadmap_io.h" #include "../roadmap_serial.h" ! #include "wince_input_mon.h" #include "win32_serial.h" *************** *** 39,43 **** HANDLE hCommPort = INVALID_HANDLE_VALUE; LPWSTR url_unicode = ConvertToWideChar(name, CP_UTF8); ! DCB dcb; COMMTIMEOUTS ct; --- 39,43 ---- HANDLE hCommPort = INVALID_HANDLE_VALUE; LPWSTR url_unicode = ConvertToWideChar(name, CP_UTF8); ! DCB dcb; COMMTIMEOUTS ct; *************** *** 62,73 **** } - // dcb.fBinary = TRUE; dcb.BaudRate = baud_rate; - // dcb.fOutxCtsFlow = TRUE; dcb.fRtsControl = RTS_CONTROL_DISABLE; dcb.fDtrControl = DTR_CONTROL_DISABLE; - // dcb.fOutxDsrFlow = FALSE; - // dcb.fOutX = FALSE; - // dcb.fInX = FALSE; dcb.ByteSize = 8; dcb.fParity = FALSE; --- 62,68 ---- *************** *** 115,138 **** Win32SerialConn *conn = data->io->os.serial; ! conn->handle = serial_open (conn->name, conn->mode, conn->baud_rate); ! ! if (conn->handle == INVALID_HANDLE_VALUE) { ! /* Send a message to main window. A read attempt will fail ! * and this input will be removed. */ ! conn->data_count = -1; ! SendMessage(RoadMapMainWindow, WM_USER_READ, (WPARAM)data, (LPARAM)conn); } while(conn->handle != INVALID_HANDLE_VALUE) { ! if (conn->data_count == 0) { ! ! do { conn->data_count = ! serial_read (conn->handle, conn->data, sizeof(conn->data)); ! } while (conn->data_count == 0); } --- 110,139 ---- Win32SerialConn *conn = data->io->os.serial; ! conn->handle = serial_open (conn->name, conn->mode, conn->baud_rate); ! ! if (conn->handle == INVALID_HANDLE_VALUE) { ! ! /* Send a message to main window. A read attempt will fail ! * and this input will be removed. ! */ ! /* Sleep to avoid busy loop, as RoadMap will try to create ! * a new connection as soon as the message is sent */ ! Sleep(3000); ! ! conn->data_count = -1; ! SendMessage(RoadMapMainWindow, WM_USER_READ, (WPARAM)data, (LPARAM)conn); } while(conn->handle != INVALID_HANDLE_VALUE) { ! if (conn->data_count == 0) { ! ! do { conn->data_count = ! serial_read (conn->handle, conn->data, sizeof(conn->data)); ! } while (conn->data_count == 0); } *************** *** 141,145 **** * sleeping. */ ! if (conn->handle == INVALID_HANDLE_VALUE) { break; } --- 142,146 ---- * sleeping. */ ! if (!conn->valid) { break; } Index: win32_serial.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/win32_serial.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** win32_serial.h 16 Dec 2005 14:42:05 -0000 1.1 --- win32_serial.h 17 Dec 2005 21:59:48 -0000 1.2 *************** *** 13,16 **** --- 13,17 ---- int data_count; int ref_count; + int valid; } Win32SerialConn; Index: roadmap_serial.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/roadmap_serial.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** roadmap_serial.c 16 Dec 2005 14:41:32 -0000 1.3 --- roadmap_serial.c 17 Dec 2005 21:59:48 -0000 1.4 *************** *** 45,48 **** --- 45,49 ---- conn->data_count = 0; conn->ref_count = 1; + conn->valid = 1; return conn; *************** *** 52,64 **** void roadmap_serial_close(RoadMapSerial serial) { ! if (ROADMAP_SERIAL_IS_VALID (serial) && ! (serial->handle != INVALID_HANDLE_VALUE)) { ! CloseHandle(serial->handle); ! serial->handle = INVALID_HANDLE_VALUE; ! if (!--serial->ref_count) { free (serial); } ! } } --- 53,68 ---- void roadmap_serial_close(RoadMapSerial serial) { ! if (ROADMAP_SERIAL_IS_VALID (serial)) { ! ! if (serial->handle != INVALID_HANDLE_VALUE) { ! CloseHandle(serial->handle); ! serial->handle = INVALID_HANDLE_VALUE; ! } ! ! serial->valid = 0; if (!--serial->ref_count) { free (serial); } ! } } Index: roadmap_main.cpp =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/roadmap_main.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** roadmap_main.cpp 16 Dec 2005 14:41:32 -0000 1.4 --- roadmap_main.cpp 17 Dec 2005 21:59:48 -0000 1.5 *************** *** 396,400 **** Win32SerialConn *conn = (Win32SerialConn *) lParam; ! if (conn->handle == INVALID_HANDLE_VALUE) { /* An old input which was removed */ break; --- 396,400 ---- Win32SerialConn *conn = (Win32SerialConn *) lParam; ! if (!ROADMAP_SERIAL_IS_VALID (conn)) { /* An old input which was removed */ break; |
Update of /cvsroot/roadmap/roadmap_editor/src/editor/track In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6420 Modified Files: editor_track_filter.c editor_track_known.c editor_track_main.c editor_track_main.h editor_track_util.c editor_track_util.h Log Message: Modified trkseg to work for RoadMap internal DB. Index: editor_track_util.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_util.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** editor_track_util.c 12 Dec 2005 20:47:53 -0000 1.4 --- editor_track_util.c 17 Dec 2005 21:59:17 -0000 1.5 *************** *** 302,307 **** int from, to; ! if (roadmap_plugin_get_id (line) != EditorPluginID) { roadmap_line_points (roadmap_plugin_get_line_id (line), &from, &to); } else { --- 302,308 ---- int from, to; + int plugin_id = roadmap_plugin_get_id (line); ! if (plugin_id != EditorPluginID) { roadmap_line_points (roadmap_plugin_get_line_id (line), &from, &to); } else { *************** *** 316,320 **** } ! connect_point->plugin_id = EditorPluginID; } --- 317,321 ---- } ! connect_point->plugin_id = plugin_id; } *************** *** 516,520 **** } ! if (roadmap_fuzzy_is_acceptable (*best)) return count; /* search for a line in the opposite direction */ --- 517,522 ---- } ! if (roadmap_fuzzy_is_acceptable (*best) && ! !previous_street->opposite_street_direction) return count; /* search for a line in the opposite direction */ *************** *** 683,688 **** ! int editor_track_util_create_trkseg ! (int line_id, int first_point, int last_point, int flags) { int trk_from; --- 685,693 ---- ! int editor_track_util_create_trkseg (int line_id, ! int plugin_id, ! int first_point, ! int last_point, ! int flags) { int trk_from; *************** *** 691,695 **** int trkseg_id; int i; ! int gps_time = track_point_time (first_point); RoadMapPosition *pos = track_point_pos (first_point); --- 696,700 ---- int trkseg_id; int i; ! time_t gps_time = track_point_time (first_point); RoadMapPosition *pos = track_point_pos (first_point); *************** *** 702,706 **** (shape_pos->longitude - pos->longitude, shape_pos->latitude - pos->latitude, ! track_point_time (i) - gps_time); if (last_shape == -1) { --- 707,711 ---- (shape_pos->longitude - pos->longitude, shape_pos->latitude - pos->latitude, ! (short) (track_point_time (i) - gps_time)); if (last_shape == -1) { *************** *** 719,728 **** trkseg_id = editor_trkseg_add (line_id, ! trk_from, ! first_shape, ! last_shape, ! track_point_time (first_point), ! track_point_time (last_point), ! flags); if (trkseg_id == -1) return -1; --- 724,734 ---- trkseg_id = editor_trkseg_add (line_id, ! plugin_id, ! trk_from, ! first_shape, ! last_shape, ! track_point_time (first_point), ! track_point_time (last_point), ! flags); if (trkseg_id == -1) return -1; *************** *** 735,741 **** void editor_track_add_trkseg (PluginLine *line, ! int trkseg, ! int direction, ! int who) { int first; --- 741,747 ---- void editor_track_add_trkseg (PluginLine *line, ! int trkseg, ! int direction, ! int who) { int first; *************** *** 745,749 **** int plugin_id = roadmap_plugin_get_id (line); ! if (direction != 0) { LineRouteFlag from_flags = 0; --- 751,755 ---- int plugin_id = roadmap_plugin_get_id (line); ! if (direction != ROUTE_DIRECTION_NONE) { LineRouteFlag from_flags = 0; *************** *** 752,756 **** if (plugin_id == ROADMAP_PLUGIN_ID) { ! route = editor_override_line_get_route (roadmap_plugin_get_line_id (line)); } else { route = editor_line_get_route (roadmap_plugin_get_line_id (line)); --- 758,763 ---- if (plugin_id == ROADMAP_PLUGIN_ID) { ! route = editor_override_line_get_route ! (roadmap_plugin_get_line_id (line)); } else { route = editor_line_get_route (roadmap_plugin_get_line_id (line)); *************** *** 858,862 **** trkseg = editor_track_util_create_trkseg ! (-1, gps_first_point+1, gps_last_point-1, ED_TRKSEG_FAKE|ED_TRKSEG_NO_GLOBAL); --- 865,869 ---- trkseg = editor_track_util_create_trkseg ! (-1, EditorPluginID, gps_first_point+1, gps_last_point-1, ED_TRKSEG_FAKE|ED_TRKSEG_NO_GLOBAL); *************** *** 875,879 **** } ! editor_trkseg_set_line (trkseg, line_id); /* this is the second trkseg of the line */ --- 882,886 ---- } ! editor_trkseg_set_line (trkseg, line_id, EditorPluginID); /* this is the second trkseg of the line */ *************** *** 884,888 **** trkseg2 = editor_track_util_create_trkseg ! (line_id, gps_first_point, gps_last_point, trk_flags); if (trkseg2 == -1) { --- 891,895 ---- trkseg2 = editor_track_util_create_trkseg ! (line_id, EditorPluginID, gps_first_point, gps_last_point, trk_flags); if (trkseg2 == -1) { Index: editor_track_filter.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_filter.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** editor_track_filter.c 16 Dec 2005 14:46:26 -0000 1.3 --- editor_track_filter.c 17 Dec 2005 21:59:17 -0000 1.4 *************** *** 135,145 **** gps_position->speed; - filter->normalized_gps_point.steering = - gps_position->steering; - azymuth = roadmap_math_azymuth ((RoadMapPosition *) &filter->normalized_gps_point, (RoadMapPosition *) &filter->last_gps_point); /* ignore consecutive points which generate a big curve */ if (roadmap_math_delta_direction (azymuth, filter->last_azymuth) > 90) { --- 135,144 ---- gps_position->speed; azymuth = roadmap_math_azymuth ((RoadMapPosition *) &filter->normalized_gps_point, (RoadMapPosition *) &filter->last_gps_point); + filter->normalized_gps_point.steering = azymuth; + /* ignore consecutive points which generate a big curve */ if (roadmap_math_delta_direction (azymuth, filter->last_azymuth) > 90) { Index: editor_track_util.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_util.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** editor_track_util.h 1 Dec 2005 12:19:00 -0000 1.2 --- editor_track_util.h 17 Dec 2005 21:59:17 -0000 1.3 *************** *** 71,76 **** int editor_track_util_length (int first, int last); ! int editor_track_util_create_trkseg ! (int line_id, int first_point, int last_point, int flags); void editor_track_add_trkseg --- 71,79 ---- int editor_track_util_length (int first, int last); ! int editor_track_util_create_trkseg (int line_id, ! int plugin_id, ! int first_point, ! int last_point, ! int flags); void editor_track_add_trkseg Index: editor_track_known.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_known.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** editor_track_known.c 12 Dec 2005 20:47:53 -0000 1.2 --- editor_track_known.c 17 Dec 2005 21:59:17 -0000 1.3 *************** *** 66,69 **** --- 66,70 ---- int trkseg; int trkseg_line_id; + int trkseg_plugin_id; int line_length; int segment_length; *************** *** 86,98 **** roadmap_plugin_line_from (line, &from); roadmap_plugin_line_to (line, &to); ! if (roadmap_plugin_get_id (line) == EditorPluginID) { ! line_length = editor_line_length (roadmap_plugin_get_line_id (line)); ! trkseg_line_id = roadmap_plugin_get_line_id (line); } else { ! line_length = roadmap_line_length (roadmap_plugin_get_line_id (line)); ! trkseg_line_id = -1; } --- 87,99 ---- roadmap_plugin_line_from (line, &from); roadmap_plugin_line_to (line, &to); + trkseg_plugin_id = roadmap_plugin_get_id (line); + trkseg_line_id = roadmap_plugin_get_line_id (line); ! if (trkseg_plugin_id == EditorPluginID) { ! line_length = editor_line_length (trkseg_line_id); } else { ! line_length = roadmap_line_length (trkseg_line_id); } *************** *** 102,106 **** (ROADMAP_INFO, "Ending line %d (plugin_id:%d). Line length:%d, Segment length:%d", ! roadmap_plugin_get_line_id (line), roadmap_plugin_get_id (line), line_length, segment_length); /* End current segment if we really passed through it --- 103,107 ---- (ROADMAP_INFO, "Ending line %d (plugin_id:%d). Line length:%d, Segment length:%d", ! trkseg_line_id, trkseg_plugin_id, line_length, segment_length); /* End current segment if we really passed through it *************** *** 112,116 **** if (line_length == 0) { editor_log (ROADMAP_ERROR, "line %d (plugin_id:%d) has length of zero.", ! roadmap_plugin_get_line_id (line), roadmap_plugin_get_id (line)); editor_log_pop (); return 0; --- 113,117 ---- if (line_length == 0) { editor_log (ROADMAP_ERROR, "line %d (plugin_id:%d) has length of zero.", ! trkseg_line_id, trkseg_plugin_id); editor_log_pop (); return 0; *************** *** 131,138 **** trkseg = editor_track_util_create_trkseg ! (trkseg_line_id, 0, last_point_id, flags|ED_TRKSEG_IGNORE|ED_TRKSEG_END_TRACK); ! editor_track_add_trkseg (line, trkseg, 0, ROUTE_CAR_ALLOWED); editor_log_pop (); return 1; --- 132,140 ---- trkseg = editor_track_util_create_trkseg ! (trkseg_line_id, trkseg_plugin_id, 0, last_point_id, flags|ED_TRKSEG_IGNORE|ED_TRKSEG_END_TRACK); ! editor_track_add_trkseg ! (line, trkseg, ROUTE_DIRECTION_NONE, ROUTE_CAR_ALLOWED); editor_log_pop (); return 1; *************** *** 140,145 **** trkseg = editor_track_util_create_trkseg ! (trkseg_line_id, 0, last_point_id, flags|ED_TRKSEG_IGNORE); ! editor_track_add_trkseg (line, trkseg, 0, ROUTE_CAR_ALLOWED); editor_log_pop (); return 0; --- 142,149 ---- trkseg = editor_track_util_create_trkseg ! (trkseg_line_id, trkseg_plugin_id, ! 0, last_point_id, flags|ED_TRKSEG_IGNORE); ! editor_track_add_trkseg ! (line, trkseg, ROUTE_DIRECTION_NONE, ROUTE_CAR_ALLOWED); editor_log_pop (); return 0; *************** *** 153,166 **** trkseg = editor_track_util_create_trkseg ! (trkseg_line_id, 0, last_point_id, flags); if (flags & ED_TRKSEG_OPPOSITE_DIR) { editor_log (ROADMAP_INFO, "Updating route direction: to -> from"); ! editor_track_add_trkseg (line, trkseg, 2, ROUTE_CAR_ALLOWED); } else { editor_log (ROADMAP_INFO, "Updating route direction: from -> to"); ! editor_track_add_trkseg (line, trkseg, 1, ROUTE_CAR_ALLOWED); } --- 157,172 ---- trkseg = editor_track_util_create_trkseg ! (trkseg_line_id, trkseg_plugin_id, 0, last_point_id, flags); if (flags & ED_TRKSEG_OPPOSITE_DIR) { editor_log (ROADMAP_INFO, "Updating route direction: to -> from"); ! editor_track_add_trkseg ! (line, trkseg, ROUTE_DIRECTION_AGAINST_LINE, ROUTE_CAR_ALLOWED); } else { editor_log (ROADMAP_INFO, "Updating route direction: from -> to"); ! editor_track_add_trkseg ! (line, trkseg, ROUTE_DIRECTION_WITH_LINE, ROUTE_CAR_ALLOWED); } *************** *** 258,261 **** --- 264,268 ---- *confirmed_line = RoadMapNeighbourhood[found]; + *confirmed_street = *new_street; confirmed_street->fuzzyfied = best; Index: editor_track_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_main.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** editor_track_main.c 16 Dec 2005 14:46:26 -0000 1.6 --- editor_track_main.c 17 Dec 2005 21:59:17 -0000 1.7 *************** *** 33,37 **** #include <string.h> #include <stdlib.h> ! #include <math.h> #include "roadmap.h" --- 33,38 ---- #include <string.h> #include <stdlib.h> ! #include <math.h> ! #include <time.h> #include "roadmap.h" *************** *** 87,91 **** } ! int track_point_time (int index) { return TrackPoints[index].time; --- 88,92 ---- } ! time_t track_point_time (int index) { return TrackPoints[index].time; *************** *** 208,211 **** --- 209,227 ---- RoadMapNeighbour *new_line) { + int fips = roadmap_plugin_get_fips (&TrackConfirmedLine.line); + + if (editor_db_activate (fips) == -1) { + + editor_db_create (fips); + if (editor_db_activate (fips) == -1) { + roadmap_log (ROADMAP_ERROR, "Can't end known segment."); + + track_reset_points (-1); + TrackConfirmedLine = *new_line; + TrackConfirmedStreet = *new_street; + return; + } + } + if (new_street->valid) { *************** *** 467,471 **** } ! roadmap_fuzzy_set_cycle_params (40, 300); track_rec_locate_point (point_id); --- 483,487 ---- } ! roadmap_fuzzy_set_cycle_params (40, 150); track_rec_locate_point (point_id); Index: editor_track_main.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_main.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** editor_track_main.h 1 Dec 2005 12:19:00 -0000 1.3 --- editor_track_main.h 17 Dec 2005 21:59:17 -0000 1.4 *************** *** 53,57 **** RoadMapPosition *track_point_pos (int index); RoadMapGpsPosition *track_point_gps (int index); ! int track_point_time (int index); int editor_track_draw_current (RoadMapPen pen); void editor_track_end (void); --- 53,57 ---- RoadMapPosition *track_point_pos (int index); RoadMapGpsPosition *track_point_gps (int index); ! time_t track_point_time (int index); int editor_track_draw_current (RoadMapPen pen); void editor_track_end (void); |
From: Ehud S. <esh...@us...> - 2005-12-17 21:59:08
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/export In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6382 Modified Files: editor_export.c Log Message: Modified trkseg to work for RoadMap internal DB. Index: editor_export.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/export/editor_export.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** editor_export.c 12 Dec 2005 20:46:01 -0000 1.4 --- editor_export.c 17 Dec 2005 21:59:00 -0000 1.5 *************** *** 36,43 **** --- 36,46 ---- #include "roadmap_layer.h" #include "roadmap_point.h" + #include "roadmap_line.h" + #include "roadmap_locator.h" #include "roadmap_line_route.h" #include "roadmap_fileselection.h" #include "../editor_log.h" + #include "../editor_main.h" #include "../db/editor_db.h" *************** *** 47,50 **** --- 50,54 ---- #include "../db/editor_trkseg.h" #include "../db/editor_street.h" + #include "../db/editor_override.h" #include "../db/editor_route.h" *************** *** 127,135 **** static void add_trkpts (FILE *file, ! int trkseg, ! int line_id, ! int flags, ! RoadMapPosition *from, ! RoadMapPosition *to) { RoadMapPosition trkseg_pos; --- 131,135 ---- static void add_trkpts (FILE *file, ! int trkseg) { RoadMapPosition trkseg_pos; *************** *** 182,185 **** --- 182,186 ---- static void add_line_data (FILE *file, int line_id, + int plugin_id, int cfcc, int flags, *************** *** 217,233 **** } ! editor_line_get_points (line_id, &from_point_id, &to_point_id); ! editor_point_roadmap_id (from_point_id, &roadmap_from_id); ! editor_point_roadmap_id (to_point_id, &roadmap_to_id); ! if (roadmap_from_id >= 0) ! roadmap_from_id = roadmap_point_db_id (roadmap_from_id); ! if (roadmap_to_id >= 0) ! roadmap_to_id = roadmap_point_db_id (roadmap_to_id); ! if (roadmap_from_id == -1) roadmap_from_id = -from_point_id-2; ! if (roadmap_to_id == -1) roadmap_to_id = -to_point_id-2; fprintf (file, "<line from_id=\"%d\" to_id=\"%d\">\n", --- 218,240 ---- } ! if (plugin_id == EditorPluginID) { ! editor_line_get_points (line_id, &from_point_id, &to_point_id); ! editor_point_roadmap_id (from_point_id, &roadmap_from_id); ! editor_point_roadmap_id (to_point_id, &roadmap_to_id); ! if (roadmap_from_id >= 0) ! roadmap_from_id = roadmap_point_db_id (roadmap_from_id); ! if (roadmap_to_id >= 0) ! roadmap_to_id = roadmap_point_db_id (roadmap_to_id); ! ! if (roadmap_from_id == -1) roadmap_from_id = -from_point_id-2; ! if (roadmap_to_id == -1) roadmap_to_id = -to_point_id-2; ! } else { ! ! roadmap_line_points (line_id, &roadmap_from_id, &roadmap_to_id); ! } fprintf (file, "<line from_id=\"%d\" to_id=\"%d\">\n", *************** *** 244,248 **** fprintf (file, "</line>\n"); ! if ((line_id != -1) && (flags & ED_LINE_DIRTY)) { fprintf (file, "<attributes>\n"); --- 251,255 ---- fprintf (file, "</line>\n"); ! if ((plugin_id == EditorPluginID) && (flags & ED_LINE_DIRTY)) { fprintf (file, "<attributes>\n"); *************** *** 321,325 **** editor_line_get_trksegs (i, &trkseg, &last_trkseg); ! add_trkpts (file, trkseg, i, flags, &from, &to); editor_trkseg_get_time (trkseg, &start_time, &end_time); --- 328,332 ---- editor_line_get_trksegs (i, &trkseg, &last_trkseg); ! add_trkpts (file, trkseg); editor_trkseg_get_time (trkseg, &start_time, &end_time); *************** *** 328,336 **** if (trkseg_flags & ED_TRKSEG_OPPOSITE_DIR) { ! add_line_data (file, i, cfcc, flags, trkseg_flags, &to, &from, start_time, end_time); } else { ! add_line_data (file, i, cfcc, flags, trkseg_flags, &from, &to, start_time, end_time); } --- 335,343 ---- 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); } *************** *** 358,362 **** --- 365,371 ---- int trkseg; int line_id; + int plugin_id; int current_trk_open = 0; + int fips; if (file == NULL) { *************** *** 365,368 **** --- 374,389 ---- } + fips = roadmap_locator_active (); + + if (fips < 0) { + editor_log (ROADMAP_ERROR, "Can't locate current fips"); + return -1; + } + + if (editor_db_activate (fips) == -1) { + editor_log (ROADMAP_ERROR, "Can't load editor db"); + return -1; + } + editor_track_end (); *************** *** 388,394 **** time_t end_time; ! line_id = editor_trkseg_get_line (trkseg); ! if (line_id != -1) { editor_line_get (line_id, &from, &to, NULL, &cfcc, &flags); --- 409,421 ---- time_t end_time; ! editor_trkseg_get_line (trkseg, &line_id, &plugin_id); ! if (line_id == -1) { ! roadmap_log (ROADMAP_ERROR, "trkseg has an unknwon line_id."); ! ! goto close_trk; ! } ! ! if (plugin_id == EditorPluginID) { editor_line_get (line_id, &from, &to, NULL, &cfcc, &flags); *************** *** 399,409 **** (line_id, cfcc, flags & ~ED_LINE_DIRTY); ! if (current_trk_open) { ! close_trk (file); ! current_trk_open = 0; ! } ! goto next_trkseg; } } --- 426,443 ---- (line_id, cfcc, flags & ~ED_LINE_DIRTY); ! goto close_trk; ! } ! } else { ! flags = editor_override_line_get_flags (line_id); ! ! if (flags & ED_LINE_DELETED) { ! ! goto close_trk; } + + roadmap_line_from (line_id, &from); + roadmap_line_to (line_id, &to); + cfcc = 4; } *************** *** 427,431 **** open_trkseg (file); ! add_trkpts (file, trkseg, line_id, flags, &from, &to); editor_trkseg_get_time (trkseg, &start_time, &end_time); --- 461,465 ---- open_trkseg (file); ! add_trkpts (file, trkseg); editor_trkseg_get_time (trkseg, &start_time, &end_time); *************** *** 433,441 **** if (trkseg_flags & ED_TRKSEG_OPPOSITE_DIR) { ! add_line_data (file, line_id, cfcc, flags, trkseg_flags, &to, &from, start_time, end_time); } else { ! add_line_data (file, line_id, cfcc, flags, trkseg_flags, &from, &to, start_time, end_time); } --- 467,475 ---- 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); } *************** *** 443,456 **** close_trkseg (file); ! next_trkseg: ! if (trkseg_flags & ED_TRKSEG_END_TRACK) { ! if (current_trk_open) { ! close_trk (file); ! current_trk_open = 0; ! } } trkseg = editor_trkseg_next_in_global (trkseg); } --- 477,492 ---- close_trkseg (file); ! if (!(trkseg_flags & ED_TRKSEG_END_TRACK)) { ! goto next_trkseg; ! } ! close_trk: ! if (current_trk_open) { ! close_trk (file); ! current_trk_open = 0; } + next_trkseg: trkseg = editor_trkseg_next_in_global (trkseg); } |
From: Ehud S. <esh...@us...> - 2005-12-17 21:58:52
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6335 Modified Files: editor_line.c editor_route.c editor_street.c editor_trkseg.c editor_trkseg.h Log Message: Modified trkseg to work for RoadMap internal DB. Index: editor_trkseg.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/db/editor_trkseg.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** editor_trkseg.c 1 Dec 2005 16:48:13 -0000 1.3 --- editor_trkseg.c 17 Dec 2005 21:58:44 -0000 1.4 *************** *** 100,103 **** --- 100,104 ---- int editor_trkseg_add (int line_id, + int plugin_id, int p_from, int first_shape, *************** *** 111,114 **** --- 112,116 ---- track.line_id = line_id; + track.plugin_id = plugin_id; track.point_from = p_from; track.first_shape = first_shape; *************** *** 274,278 **** return editor_trkseg_add ! (-1, i, -1, -1, trk_middle_time, trk_end_time, flags|ED_TRKSEG_NO_GLOBAL); } --- 276,280 ---- return editor_trkseg_add ! (-1, -1, i, -1, -1, trk_middle_time, trk_end_time, flags|ED_TRKSEG_NO_GLOBAL); } *************** *** 334,338 **** new_trkseg_id = editor_trkseg_add ! (-1, i, first_shape, last_shape, split_time, trk_end_time, flags|ED_TRKSEG_NO_GLOBAL); --- 336,340 ---- new_trkseg_id = editor_trkseg_add ! (-1, -1, i, first_shape, last_shape, split_time, trk_end_time, flags|ED_TRKSEG_NO_GLOBAL); *************** *** 357,361 **** new_trkseg_id = editor_trkseg_add ! (-1, i, -1, -1, split_time, trk_end_time, flags|ED_TRKSEG_NO_GLOBAL); --- 359,363 ---- new_trkseg_id = editor_trkseg_add ! (-1, -1, i, -1, -1, split_time, trk_end_time, flags|ED_TRKSEG_NO_GLOBAL); *************** *** 379,382 **** --- 381,385 ---- editor_trkseg_add (-1, + -1, i, split_shape_point, *************** *** 402,406 **** ! void editor_trkseg_set_line (int trkseg, int line_id) { editor_db_trkseg *track; --- 405,409 ---- ! void editor_trkseg_set_line (int trkseg, int line_id, int plugin_id) { editor_db_trkseg *track; *************** *** 414,417 **** --- 417,421 ---- track->line_id = line_id; + track->plugin_id = plugin_id; trkseg = track->next_road_trkseg; *************** *** 420,424 **** ! int editor_trkseg_get_line (int trkseg) { editor_db_trkseg *track; --- 424,428 ---- ! void editor_trkseg_get_line (int trkseg, int *line_id, int *plugin_id) { editor_db_trkseg *track; *************** *** 429,433 **** assert (track != NULL); ! return track->line_id; } --- 433,438 ---- assert (track != NULL); ! *line_id = track->line_id; ! *plugin_id = track->plugin_id; } *************** *** 489,494 **** return editor_trkseg_add ! (track->line_id, new_from_point, new_first_shape, new_last_shape, ! track->gps_start_time, track->gps_end_time, track->flags); } --- 494,505 ---- return editor_trkseg_add ! (track->line_id, ! track->plugin_id, ! new_from_point, ! new_first_shape, ! new_last_shape, ! track->gps_start_time, ! track->gps_end_time, ! track->flags); } Index: editor_street.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/db/editor_street.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** editor_street.c 12 Dec 2005 20:45:10 -0000 1.3 --- editor_street.c 17 Dec 2005 21:58:44 -0000 1.4 *************** *** 242,245 **** --- 242,249 ---- RoadMapNeighbour *result) { + int fips = editor_db_locator (position); + + if (editor_db_activate (fips) == -1) return 0; + return editor_street_get_distance_with_shape (position, *************** *** 328,331 **** --- 332,337 ---- int fips = roadmap_locator_active (); + if (editor_db_activate (fips) == -1) return 0; + editor_square_find_by_position (crossing, &square, 1, 0); square_cfccs = editor_square_get_cfccs (square); Index: editor_route.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/db/editor_route.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** editor_route.c 12 Dec 2005 20:45:10 -0000 1.3 --- editor_route.c 17 Dec 2005 21:58:44 -0000 1.4 *************** *** 96,99 **** --- 96,102 ---- } else { + int route_flags; + int route_speed; + LineRouteFlag from_flags = 0; LineRouteFlag to_flags = 0; *************** *** 101,110 **** LineRouteMax to_speed_limit = 0; ! if (plugin_id != 0) return; /* No route info */ ! if (!roadmap_line_route_get_flags ! (source_line, &from_flags, &to_flags) && ! !roadmap_line_route_get_speed_limit ! (source_line, &from_speed_limit, &to_speed_limit)) { return; --- 104,117 ---- LineRouteMax to_speed_limit = 0; ! if (plugin_id != ROADMAP_PLUGIN_ID) return; /* No route info */ ! route_flags = ! roadmap_line_route_get_flags ! (source_line, &from_flags, &to_flags); ! route_speed = ! roadmap_line_route_get_speed_limit ! (source_line, &from_speed_limit, &to_speed_limit); ! ! if ((route_flags == -1) && (route_speed == -1)) { return; Index: editor_trkseg.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/db/editor_trkseg.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** editor_trkseg.h 28 Nov 2005 19:47:50 -0000 1.1 --- editor_trkseg.h 17 Dec 2005 21:58:44 -0000 1.2 *************** *** 51,54 **** --- 51,55 ---- typedef struct editor_db_trkseg_s { int line_id; + int plugin_id; int point_from; int point_to; *************** *** 62,68 **** } editor_db_trkseg; ! void editor_trkseg_set_line (int trkseg, int line_id); int editor_trkseg_add (int line_id, int p_from, int first_shape, --- 63,70 ---- } editor_db_trkseg; ! void editor_trkseg_set_line (int trkseg, int line_id, int plugin_id); int editor_trkseg_add (int line_id, + int plugin_id, int p_from, int first_shape, *************** *** 78,82 **** int *flags); ! int editor_trkseg_get_line (int trkseg); void editor_trkseg_get_time (int trkseg, --- 80,84 ---- int *flags); ! void editor_trkseg_get_line (int trkseg, int *line_id, int *plugin_id); void editor_trkseg_get_time (int trkseg, *************** *** 89,94 **** int editor_trkseg_next_in_global (int trkseg); - int editor_trkseg_roadmap_line (int line_id, int *first, int *last); - int editor_trkseg_split (int trkseg, RoadMapPosition *line_from, --- 91,94 ---- Index: editor_line.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/db/editor_line.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** editor_line.c 12 Dec 2005 20:45:10 -0000 1.2 --- editor_line.c 17 Dec 2005 21:58:44 -0000 1.3 *************** *** 319,322 **** --- 319,323 ---- trkseg = editor_trkseg_add (-1, + EditorPluginID, trkseg_from, editor_first_shape, *************** *** 349,353 **** editor_trkseg_connect_roads (trkseg, j); ! editor_trkseg_set_line (line_db->first_trkseg, line_id); /* Add roadmap line trksegs to copied line */ --- 350,354 ---- editor_trkseg_connect_roads (trkseg, j); ! editor_trkseg_set_line (line_db->first_trkseg, line_id, EditorPluginID); /* Add roadmap line trksegs to copied line */ *************** *** 363,369 **** line_db->first_trkseg = trkseg; ! editor_route_segment_copy (line, 0, line_id); ! editor_street_copy_street (line, 0, line_id); ! editor_street_copy_range (line, 0, line_id); //TODO: copy street --- 364,370 ---- line_db->first_trkseg = trkseg; ! editor_route_segment_copy (line, ROADMAP_PLUGIN_ID, line_id); ! editor_street_copy_street (line, ROADMAP_PLUGIN_ID, line_id); ! editor_street_copy_range (line, ROADMAP_PLUGIN_ID, line_id); //TODO: copy street *************** *** 496,506 **** line_db->flags |= ED_LINE_EXPLICIT_SPLIT; ! editor_trkseg_set_line (new_trkseg_first, new_line_id); editor_line_set_trksegs (new_line_id, new_trkseg_first, new_trkseg_curr); ! editor_trkseg_set_line (old_trkseg_first, line_id); editor_line_set_trksegs (line_id, old_trkseg_first, old_trkseg_curr); ! editor_route_segment_copy (line_id, 1, new_line_id); ! editor_street_copy_street (line_id, 1, new_line_id); editor_street_get_properties (line_id, &properties); --- 497,507 ---- line_db->flags |= ED_LINE_EXPLICIT_SPLIT; ! editor_trkseg_set_line (new_trkseg_first, new_line_id, EditorPluginID); editor_line_set_trksegs (new_line_id, new_trkseg_first, new_trkseg_curr); ! editor_trkseg_set_line (old_trkseg_first, line_id, EditorPluginID); editor_line_set_trksegs (line_id, old_trkseg_first, old_trkseg_curr); ! editor_route_segment_copy (line_id, EditorPluginID, new_line_id); ! editor_street_copy_street (line_id, EditorPluginID, new_line_id); editor_street_get_properties (line_id, &properties); |