You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(92) |
Dec
(141) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(126) |
Feb
(72) |
Mar
(31) |
Apr
(200) |
May
(81) |
Jun
(130) |
Jul
(112) |
Aug
(134) |
Sep
(76) |
Oct
(89) |
Nov
(153) |
Dec
(9) |
2007 |
Jan
(59) |
Feb
(82) |
Mar
(50) |
Apr
(20) |
May
(9) |
Jun
(81) |
Jul
(41) |
Aug
(109) |
Sep
(91) |
Oct
(87) |
Nov
(33) |
Dec
(60) |
2008 |
Jan
(21) |
Feb
(15) |
Mar
(38) |
Apr
(75) |
May
(59) |
Jun
(46) |
Jul
(30) |
Aug
(20) |
Sep
(35) |
Oct
(32) |
Nov
(34) |
Dec
(19) |
2009 |
Jan
(29) |
Feb
(71) |
Mar
(54) |
Apr
(17) |
May
(4) |
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(58) |
Sep
(7) |
Oct
(7) |
Nov
(12) |
Dec
(18) |
2011 |
Jan
(17) |
Feb
(29) |
Mar
(11) |
Apr
(5) |
May
(1) |
Jun
|
Jul
|
Aug
(11) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(87) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(44) |
Jun
(79) |
Jul
(16) |
Aug
(31) |
Sep
|
Oct
(51) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Ehud S. <esh...@us...> - 2006-08-10 20:54:43
|
Update of /cvsroot/roadmap/roadmap_editor/src/gtk2 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19102 Modified Files: roadmap_dialog.c Log Message: Multiple lines entry widget. Index: roadmap_dialog.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/gtk2/roadmap_dialog.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** roadmap_dialog.c 9 Aug 2006 07:33:10 -0000 1.5 --- roadmap_dialog.c 10 Aug 2006 20:54:39 -0000 1.6 *************** *** 52,55 **** --- 52,56 ---- #define ROADMAP_WIDGET_LABEL 5 #define ROADMAP_WIDGET_PASSWORD 6 + #define ROADMAP_WIDGET_MUL_ENTRY 7 enum { *************** *** 403,406 **** --- 404,421 ---- + void roadmap_dialog_new_mul_entry (const char *frame, const char *name, + RoadMapDialogCallback callback) { + + GtkWidget *w = gtk_text_view_new (); + RoadMapDialogItem child = roadmap_dialog_new_item (frame, name, w, 0); + child->callback = callback; + child->widget_type = ROADMAP_WIDGET_MUL_ENTRY; + + g_signal_connect (w, "activate", + (GCallback) roadmap_dialog_action, child); + + } + + void roadmap_dialog_new_progress (const char *frame, const char *name) { *************** *** 408,412 **** name = "Progress"; RoadMapDialogItem child = roadmap_dialog_new_item (frame, name, w, 0); ! child->widget_type = ROADMAP_WIDGET_ENTRY; } --- 423,427 ---- name = "Progress"; RoadMapDialogItem child = roadmap_dialog_new_item (frame, name, w, 0); ! child->widget_type = ROADMAP_WIDGET_LABEL; } *************** *** 781,784 **** --- 796,810 ---- return (void *)gtk_entry_get_text (GTK_ENTRY(this_item->w)); + + case ROADMAP_WIDGET_MUL_ENTRY: + { + GtkTextIter start, end; + gtk_text_buffer_get_bounds + (gtk_text_view_get_buffer (GTK_ENTRY(this_item->w)), &start, &end ); + return gtk_text_buffer_get_text + (gtk_text_view_get_buffer (GTK_ENTRY(this_item->w)), + &start, &end, TRUE); + } + break; } *************** *** 806,809 **** --- 832,844 ---- break; + case ROADMAP_WIDGET_MUL_ENTRY: + { + GtkTextBuffer *buffer = gtk_text_buffer_new (NULL); + gtk_text_buffer_set_text (buffer, (const char *)data, strlen(data)); + gtk_text_view_set_buffer (GTK_ENTRY(this_item->w), buffer); + g_object_unref (buffer); + } + break; + case ROADMAP_WIDGET_LABEL: |
From: Ehud S. <esh...@us...> - 2006-08-10 20:54:10
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/static In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19049 Modified Files: update_range.c update_range.h Log Message: Update street range dialog. Index: update_range.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/static/update_range.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** update_range.h 9 Aug 2006 07:27:58 -0000 1.1 --- update_range.h 10 Aug 2006 20:54:07 -0000 1.2 *************** *** 25,29 **** #define INCLUDE__UPDATE_RANGE__H ! void update_range_dialog (void); #endif // INCLUDE__UPDATE_RANGE__H --- 25,30 ---- #define INCLUDE__UPDATE_RANGE__H ! void update_range_initialize (void); ! void update_range_dialog (void); #endif // INCLUDE__UPDATE_RANGE__H Index: update_range.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/static/update_range.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** update_range.c 9 Aug 2006 07:27:58 -0000 1.1 --- update_range.c 10 Aug 2006 20:54:07 -0000 1.2 *************** *** 26,29 **** --- 26,31 ---- */ + #include <string.h> + #include "roadmap.h" #include "roadmap_dialog.h" *************** *** 32,35 **** --- 34,39 ---- #include "roadmap_gps.h" #include "roadmap_locator.h" + #include "roadmap_county.h" + #include "roadmap_adjust.h" #include "roadmap_plugin.h" #include "roadmap_preferences.h" *************** *** 40,43 **** --- 44,48 ---- #include "../db/editor_line.h" #include "../db/editor_street.h" + #include "../db/editor_marker.h" #include "../editor_main.h" #include "../editor_log.h" *************** *** 45,48 **** --- 50,79 ---- #include "update_range.h" + #ifdef _WIN32 + #define NEW_LINE "\r\n" + #else + #define NEW_LINE "\n" + #endif + + static int update_range_export (const char *note) { + + return 0; + } + + + static const char *update_range_verify + (unsigned char *flags, const char *note) { + + return 0; + } + + + static int UpdateRangeMarkerType; + static EditorMarkerType UpdateRangeMarker = { + "Street range", + update_range_export, + update_range_verify + }; + static int get_estimated_range (PluginLine *line, RoadMapGpsPosition *pos, *************** *** 134,142 **** snprintf(str, sizeof(str), "%d", right); roadmap_dialog_set_data ("Update", "Right", str); return 0; } ! static void update_range_cancel (const char *name, void *context) { roadmap_dialog_hide (name); --- 165,230 ---- snprintf(str, sizeof(str), "%d", right); roadmap_dialog_set_data ("Update", "Right", str); + + roadmap_dialog_set_data ("Update", "Update left", ""); + roadmap_dialog_set_data ("Update", "Update right", ""); return 0; } ! static void update_range_apply (const char *name, void *context) { ! ! const char *updated_left = ! roadmap_dialog_get_data ("Update", "Update left"); ! ! const char *updated_right = ! roadmap_dialog_get_data ("Update", "Update right"); ! ! if (!*updated_left && !*updated_right) { ! roadmap_dialog_hide (name); ! return; ! ! } else { ! char note[100]; ! RoadMapGpsPosition *gps_pos = (RoadMapGpsPosition *)context; ! RoadMapPosition position; ! int fips; ! ! roadmap_adjust_position (gps_pos, &position); ! if (roadmap_county_by_position (&position, &fips, 1) < 1) { ! roadmap_messagebox ("Error", "Can't locate county"); ! return; ! } ! ! if (editor_db_activate (fips) == -1) { ! ! editor_db_create (fips); ! ! if (editor_db_activate (fips) == -1) { ! ! roadmap_messagebox ("Error", "Can't update range"); ! return; ! } ! } ! ! if (*updated_left) { ! ! snprintf(note, sizeof(note), "%s: %s%s", ! roadmap_lang_get ("Update left"), updated_left, NEW_LINE); ! } ! ! if (*updated_right) { ! ! snprintf(note + strlen(note), sizeof(note) - strlen(note), ! "%s: %s%s", roadmap_lang_get ("Update right"), updated_right, ! NEW_LINE); ! } ! ! if (editor_marker_add (gps_pos->longitude, gps_pos->latitude, ! gps_pos->steering, UpdateRangeMarkerType, ! ED_MARKER_UPLOAD, note) == -1) { ! ! roadmap_messagebox ("Error", "Can't save marker."); ! } ! } roadmap_dialog_hide (name); *************** *** 144,148 **** ! static void update_range_apply (const char *name, void *context) { roadmap_dialog_hide (name); --- 232,236 ---- ! static void update_range_cancel (const char *name, void *context) { roadmap_dialog_hide (name); *************** *** 152,156 **** void update_range_dialog (void) { ! RoadMapGpsPosition pos; PluginLine line; int direction; --- 240,244 ---- void update_range_dialog (void) { ! static RoadMapGpsPosition pos; PluginLine line; int direction; *************** *** 162,166 **** } ! if (roadmap_dialog_activate ("Update street range", NULL)) { roadmap_dialog_new_label ("Update", "Street"); --- 250,254 ---- } ! if (roadmap_dialog_activate ("Update street range", &pos)) { roadmap_dialog_new_label ("Update", "Street"); *************** *** 182,183 **** --- 270,276 ---- } + + void update_range_initialize (void) { + UpdateRangeMarkerType = editor_marker_reg_type (&UpdateRangeMarker); + } + |
From: Ehud S. <esh...@us...> - 2006-08-10 20:53:42
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/db In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18691 Modified Files: editor_db.c Added Files: editor_marker.c editor_marker.h Log Message: Markers. Index: editor_db.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/db/editor_db.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** editor_db.c 2 May 2006 12:54:12 -0000 1.5 --- editor_db.c 10 Aug 2006 20:53:39 -0000 1.6 *************** *** 45,48 **** --- 45,49 ---- #include "editor_db.h" #include "editor_point.h" + #include "editor_marker.h" #include "editor_shape.h" #include "editor_line.h" *************** *** 169,172 **** --- 170,176 ---- EditorDBModel = roadmap_db_register + (EditorDBModel, "markers", &EditorMarkersHandler); + EditorDBModel = + roadmap_db_register (EditorDBModel, "header", &EditorHeaderHandler); EditorDBModel = *************** *** 365,368 **** --- 369,374 ---- (NULL, "points", NULL, 0, sizeof(editor_db_point), EDITOR_MAX_POINTS); add_db_section + (NULL, "markers", NULL, 0, sizeof(editor_db_marker), EDITOR_MAX_STREETS); + add_db_section (NULL, "points_del", NULL, 0, sizeof(editor_db_del_point), EDITOR_MAX_POINTS); *************** *** 401,404 **** --- 407,411 ---- add_db_string_section (root, "zips"); add_db_string_section (root, "t2s"); + add_db_string_section (root, "notes"); root = buildmap_db_add_section (NULL, "data_blocks"); --- NEW FILE: editor_marker.h --- /* editor_marker.h - database layer * * LICENSE: * * Copyright 2006 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef INCLUDE__EDITOR_MARKER__H #define INCLUDE__EDITOR_MARKER__H #include "roadmap_types.h" #include "roadmap_dbread.h" #include "editor_dictionary.h" #define ED_MARKER_UPLOAD 0x1 #define ED_MARKER_DELETED 0x2 typedef struct editor_marker_type { const char *name; int (*export_marker) (const char *note); const char *(*update_marker) (unsigned char *flags, const char *note); } EditorMarkerType; typedef struct editor_db_marker_s { int longitude; int latitude; short steering; unsigned char type; unsigned char flags; EditorString note; } editor_db_marker; int editor_marker_add (int longitude, int latitude, int steering, unsigned char type, unsigned char flags, const char *note); int editor_marker_count (void); void editor_marker_position (int marker, RoadMapPosition *position, int *steering); const char *editor_marker_type (int marker); const char *editor_marker_note (int marker); unsigned char editor_marker_flags (int marker); void editor_marker_update (int marker, unsigned char flags, const char *note); int editor_marker_reg_type (EditorMarkerType *type); extern roadmap_db_handler EditorMarkersHandler; #endif // INCLUDE__EDITOR_MARKER__H --- NEW FILE: editor_marker.c --- /* editor_marker.c - marker databse layer * * LICENSE: * * Copyright 2006 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * SYNOPSYS: * * See editor_marker.h */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include "roadmap.h" #include "../editor_log.h" #include "editor_db.h" #include "editor_marker.h" #define MAX_MARKER_TYPES 10 static EditorMarkerType *MarkerTypes[MAX_MARKER_TYPES]; static int MarkerTypesCount; static editor_db_section *ActiveMarkersDB; static EditorDictionary ActiveNoteDictionary; static void editor_marker_activate (void *context) { ActiveMarkersDB = (editor_db_section *) context; ActiveNoteDictionary = editor_dictionary_open ("notes"); } roadmap_db_handler EditorMarkersHandler = { "marker", editor_map, editor_marker_activate, editor_unmap }; int editor_marker_add (int longitude, int latitude, int steering, unsigned char type, unsigned char flags, const char *note) { editor_db_marker marker; int id; marker.longitude = longitude; marker.latitude = latitude; marker.steering = steering; marker.type = type; marker.flags = flags; if (note == NULL) { marker.note = ROADMAP_INVALID_STRING; } else { marker.note = editor_dictionary_add (ActiveNoteDictionary, note, strlen(note)); } id = editor_db_add_item (ActiveMarkersDB, &marker); if (id == -1) { editor_db_grow (); id = editor_db_add_item (ActiveMarkersDB, &marker); } /* FIXME this is a temporary solution for my bad DB design */ editor_db_check_grow (); return id; } int editor_marker_count (void) { return ActiveMarkersDB->num_items; } void editor_marker_position (int marker, RoadMapPosition *position, int *steering) { editor_db_marker *marker_st = editor_db_get_item (ActiveMarkersDB, marker, 0, 0); assert(marker_st != NULL); position->longitude = marker_st->longitude; position->latitude = marker_st->latitude; if (steering) *steering = marker_st->steering; } const char *editor_marker_type (int marker) { editor_db_marker *marker_st = editor_db_get_item (ActiveMarkersDB, marker, 0, 0); assert(marker_st != NULL); return MarkerTypes[marker_st->type]->name; } const char *editor_marker_note (int marker) { editor_db_marker *marker_st = editor_db_get_item (ActiveMarkersDB, marker, 0, 0); assert(marker_st != NULL); if (marker_st->note == ROADMAP_INVALID_STRING) { return ""; } else { return editor_dictionary_get (ActiveNoteDictionary, marker_st->note); } } unsigned char editor_marker_flags (int marker) { editor_db_marker *marker_st = editor_db_get_item (ActiveMarkersDB, marker, 0, 0); assert(marker_st != NULL); return marker_st->flags; } void editor_marker_update (int marker, unsigned char flags, const char *note) { editor_db_marker *marker_st = editor_db_get_item (ActiveMarkersDB, marker, 0, 0); assert(marker_st != NULL); marker_st->flags = flags; if (note == NULL) { marker_st->note = ROADMAP_INVALID_STRING; } else if ((marker_st->note == ROADMAP_INVALID_STRING) || strcmp(editor_dictionary_get (ActiveNoteDictionary, marker_st->note), note)) { marker_st->note = editor_dictionary_add (ActiveNoteDictionary, note, strlen(note)); } } int editor_marker_reg_type (EditorMarkerType *type) { int id = MarkerTypesCount; if (MarkerTypesCount == MAX_MARKER_TYPES) return -1; MarkerTypes[MarkerTypesCount] = type; MarkerTypesCount++; return id; } |
From: Ehud S. <esh...@us...> - 2006-08-10 20:53:11
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18626 Modified Files: editor_main.c editor_screen.c Log Message: Markers. Index: editor_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/editor_main.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** editor_main.c 9 Aug 2006 07:25:58 -0000 1.14 --- editor_main.c 10 Aug 2006 20:53:08 -0000 1.15 *************** *** 36,39 **** --- 36,40 ---- #include "editor_screen.h" + #include "static/update_range.h" #include "track/editor_track_main.h" #include "export/editor_upload.h" *************** *** 84,87 **** --- 85,89 ---- editor_screen_initialize (); editor_track_initialize (); + update_range_initialize (); editor_main_set (1); Index: editor_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/editor_screen.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** editor_screen.c 9 Aug 2006 07:26:39 -0000 1.15 --- editor_screen.c 10 Aug 2006 20:53:08 -0000 1.16 *************** *** 46,49 **** --- 46,50 ---- #include "roadmap_locator.h" #include "roadmap_hash.h" + #include "roadmap_sprite.h" #include "roadmap_lang.h" #include "roadmap_main.h" *************** *** 51,54 **** --- 52,56 ---- #include "db/editor_db.h" #include "db/editor_point.h" + #include "db/editor_marker.h" #include "db/editor_shape.h" #include "db/editor_line.h" *************** *** 554,557 **** --- 556,581 ---- + static void editor_screen_draw_markers (void) { + RoadMapArea screen; + int count = editor_marker_count (); + int i; + + roadmap_math_screen_edges (&screen); + + for (i=0; i<count; i++) { + int steering; + RoadMapPosition pos; + RoadMapGuiPoint screen_point; + + editor_marker_position (i, &pos, &steering); + if (!roadmap_math_point_is_visible (&pos)) continue; + + roadmap_math_coordinate (&pos, &screen_point); + roadmap_math_rotate_coordinates (1, &screen_point); + roadmap_sprite_draw ("marker", &screen_point, steering); + } + } + + static void editor_screen_draw_square (int square, int fips, int min_cfcc, int pen_type) { *************** *** 723,726 **** --- 747,752 ---- } + + editor_screen_draw_markers (); } *************** *** 733,736 **** --- 759,763 ---- } } + } |
From: Ehud S. <esh...@us...> - 2006-08-10 20:51:14
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv17822 Modified Files: Makefile Log Message: Edit / View markers dialog. Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/Makefile,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Makefile 9 Aug 2006 07:22:41 -0000 1.19 --- Makefile 10 Aug 2006 20:51:10 -0000 1.20 *************** *** 177,180 **** --- 177,181 ---- editor/static/editor_dialog.c \ editor/static/update_range.c \ + editor/static/edit_marker.c \ editor/db/editor_street.c \ editor/db/editor_point.c \ *************** *** 183,186 **** --- 184,188 ---- editor/db/editor_square.c \ editor/db/editor_route.c \ + editor/db/editor_marker.c \ editor/db/editor_dictionary.c \ buildmap_dbwrite.c \ |
From: Ehud S. <esh...@us...> - 2006-08-10 20:50:39
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv17443 Modified Files: roadmap_start.c Log Message: Edit / View markers dialog. Index: roadmap_start.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_start.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** roadmap_start.c 9 Aug 2006 07:07:49 -0000 1.25 --- roadmap_start.c 10 Aug 2006 20:50:36 -0000 1.26 *************** *** 80,83 **** --- 80,84 ---- #include "editor/db/editor_db.h" #include "editor/static/update_range.h" + #include "editor/static/edit_marker.h" #include "editor/export/editor_export.h" #include "editor/export/editor_upload.h" *************** *** 520,523 **** --- 521,527 ---- "Update street range", update_range_dialog}, + {"viewmarkers", "View markers", NULL, NULL, + "View / Edit markers", edit_markers_dialog}, + {NULL, NULL, NULL, NULL, NULL, NULL} }; *************** *** 686,689 **** --- 690,694 ---- "address", "updaterange", + "viewmarkers", RoadMapFactorySeparator, "sync", |
From: Ehud S. <esh...@us...> - 2006-08-10 20:50:09
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv17240 Modified Files: roadmap_screen.c Log Message: I18n Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_screen.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** roadmap_screen.c 17 Jul 2006 06:29:37 -0000 1.18 --- roadmap_screen.c 10 Aug 2006 20:50:06 -0000 1.19 *************** *** 45,48 **** --- 45,49 ---- #include "roadmap_locator.h" #include "roadmap_navigate.h" + #include "roadmap_lang.h" #include "roadmap_sprite.h" *************** *** 1111,1115 **** if (count == 0) { ! roadmap_display_text("Info", "No map available"); } --- 1112,1116 ---- if (count == 0) { ! roadmap_display_text("Info", roadmap_lang_get ("No map available")); } |
From: Ehud S. <esh...@us...> - 2006-08-10 20:49:51
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16985 Modified Files: roadmap_dialog.h Log Message: Multiple lines entry widget. Index: roadmap_dialog.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_dialog.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** roadmap_dialog.h 9 Aug 2006 07:03:05 -0000 1.5 --- roadmap_dialog.h 10 Aug 2006 20:49:48 -0000 1.6 *************** *** 81,84 **** --- 81,88 ---- RoadMapDialogCallback callback); + /* Add multiple lines text entry item to the current dialog. */ + void roadmap_dialog_new_mul_entry (const char *frame, const char *name, + RoadMapDialogCallback callback); + /* Add one hidden text entry item to the current dialog. */ void roadmap_dialog_new_password (const char *frame, const char *name); *************** *** 168,171 **** --- 172,182 ---- } + static __inline void roadmap_dialog_new_mul_entry_i + (const char *frame, const char *name, RoadMapDialogCallback callback) { + + roadmap_dialog_new_mul_entry + (roadmap_lang_get (frame), roadmap_lang_get (name), callback); + } + static __inline void roadmap_dialog_new_password_i (const char *frame, const char *name) { *************** *** 253,273 **** } ! #define roadmap_dialog_activate roadmap_dialog_activate_i ! #define roadmap_dialog_hide roadmap_dialog_hide_i ! #define roadmap_dialog_new_label roadmap_dialog_new_label_i ! #define roadmap_dialog_new_image roadmap_dialog_new_image_i ! #define roadmap_dialog_new_entry roadmap_dialog_new_entry_i ! #define roadmap_dialog_new_progress roadmap_dialog_new_progress_i ! #define roadmap_dialog_new_password roadmap_dialog_new_password_i ! #define roadmap_dialog_new_color roadmap_dialog_new_color_i ! #define roadmap_dialog_new_choice roadmap_dialog_new_choice_i ! #define roadmap_dialog_new_list roadmap_dialog_new_list_i ! #define roadmap_dialog_show_list roadmap_dialog_show_list_i ! #define roadmap_dialog_add_button roadmap_dialog_add_button_i ! #define roadmap_dialog_select roadmap_dialog_select_i ! #define roadmap_dialog_get_data roadmap_dialog_get_data_i ! #define roadmap_dialog_set_data roadmap_dialog_set_data_i ! #define roadmap_dialog_set_progress roadmap_dialog_set_progress_i ! #define roadmap_dialog_protect roadmap_dialog_protect_i #endif --- 264,285 ---- } ! #define roadmap_dialog_activate roadmap_dialog_activate_i ! #define roadmap_dialog_hide roadmap_dialog_hide_i ! #define roadmap_dialog_new_label roadmap_dialog_new_label_i ! #define roadmap_dialog_new_image roadmap_dialog_new_image_i ! #define roadmap_dialog_new_entry roadmap_dialog_new_entry_i ! #define roadmap_dialog_new_mul_entry roadmap_dialog_new_mul_entry_i ! #define roadmap_dialog_new_progress roadmap_dialog_new_progress_i ! #define roadmap_dialog_new_password roadmap_dialog_new_password_i ! #define roadmap_dialog_new_color roadmap_dialog_new_color_i ! #define roadmap_dialog_new_choice roadmap_dialog_new_choice_i ! #define roadmap_dialog_new_list roadmap_dialog_new_list_i ! #define roadmap_dialog_show_list roadmap_dialog_show_list_i ! #define roadmap_dialog_add_button roadmap_dialog_add_button_i ! #define roadmap_dialog_select roadmap_dialog_select_i ! #define roadmap_dialog_get_data roadmap_dialog_get_data_i ! #define roadmap_dialog_set_data roadmap_dialog_set_data_i ! #define roadmap_dialog_set_progress roadmap_dialog_set_progress_i ! #define roadmap_dialog_protect roadmap_dialog_protect_i #endif |
From: Ehud S. <esh...@us...> - 2006-08-10 20:49:32
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16967 Modified Files: roadmap_address.c Log Message: Use keyboard in search dialog. Index: roadmap_address.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_address.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** roadmap_address.c 9 Aug 2006 07:01:35 -0000 1.7 --- roadmap_address.c 10 Aug 2006 20:49:28 -0000 1.8 *************** *** 404,408 **** static void roadmap_address_dialog (RoadMapAddressDialog *context) { ! if (!def_values[1][0]) { def_values[1] = roadmap_lang_get ("Search"); --- 404,408 ---- static void roadmap_address_dialog (RoadMapAddressDialog *context) { ! if (!def_values[1][0]) { def_values[1] = roadmap_lang_get ("Search"); *************** *** 477,481 **** roadmap_dialog_add_button ("Done", roadmap_address_search_done); ! roadmap_dialog_complete (0); /* No need for a keyboard. */ } --- 477,481 ---- roadmap_dialog_add_button ("Done", roadmap_address_search_done); ! roadmap_dialog_complete (roadmap_preferences_use_keyboard()); /* No need for a keyboard. */ } |
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19794 Modified Files: buildmap_main.c buildmap_shape.c buildmap_shape.h buildmap_shapefile.c buildmap_shapefile.h buildmap_tiger.c rdmgendcwmaps rdmgenshpmaps Log Message: support for Canadian RNF format shapefile maps. no water features, and no town names, but streets, street names, and addresses. Index: buildmap_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_main.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** buildmap_main.c 23 Jun 2006 22:40:22 -0000 1.11 --- buildmap_main.c 10 Aug 2006 14:04:02 -0000 1.12 *************** *** 56,60 **** #define BUILDMAP_FORMAT_SHAPE 2 #define BUILDMAP_FORMAT_DCW 3 ! #define BUILDMAP_FORMAT_EMPTY 4 static int BuildMapFormatFamily = 0; --- 56,61 ---- #define BUILDMAP_FORMAT_SHAPE 2 #define BUILDMAP_FORMAT_DCW 3 ! #define BUILDMAP_FORMAT_RNF 4 ! #define BUILDMAP_FORMAT_EMPTY 5 static int BuildMapFormatFamily = 0; *************** *** 71,75 **** POPT_ARG_STRING, &BuildMapFormat, 0, #ifdef ROADMAP_USE_SHAPEFILES ! "Input files format (Tiger or ShapeFile)", "2000|2002|SHAPE|DCW|EMPTY"}, #else "Tiger file format (ShapeFile was not enabled)", "2000|2002|EMPTY"}, --- 72,76 ---- POPT_ARG_STRING, &BuildMapFormat, 0, #ifdef ROADMAP_USE_SHAPEFILES ! "Input files format (Tiger or ShapeFile)", "2000|2002|SHAPE|RNF|DCW|EMPTY"}, #else "Tiger file format (ShapeFile was not enabled)", "2000|2002|EMPTY"}, *************** *** 134,141 **** --- 135,149 ---- } else if (strcmp (BuildMapFormat, "SHAPE") == 0) { + // commercial DMTI canadian format BuildMapFormatFamily = BUILDMAP_FORMAT_SHAPE; + } else if (strcmp (BuildMapFormat, "RNF") == 0) { + + // free RNF canadian format + BuildMapFormatFamily = BUILDMAP_FORMAT_RNF; + } else if (strcmp (BuildMapFormat, "DCW") == 0) { + // Digital Charts of the World BuildMapFormatFamily = BUILDMAP_FORMAT_DCW; #endif *************** *** 182,186 **** #ifdef ROADMAP_USE_SHAPEFILES case BUILDMAP_FORMAT_SHAPE: ! buildmap_shapefile_process (source, county, verbose); break; --- 190,198 ---- #ifdef ROADMAP_USE_SHAPEFILES case BUILDMAP_FORMAT_SHAPE: ! buildmap_shapefile_dmti_process (source, county, verbose); ! break; ! ! case BUILDMAP_FORMAT_RNF: ! buildmap_shapefile_rnf_process (source, county, verbose); break; Index: buildmap_shapefile.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_shapefile.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** buildmap_shapefile.c 6 Feb 2006 06:34:06 -0000 1.6 --- buildmap_shapefile.c 10 Aug 2006 14:04:03 -0000 1.7 *************** *** 81,84 **** --- 81,97 ---- #define F_UID "UNIQUEID" + // shapefile column names for RNF + + #define F_FID "FID" + #define F_NGD_ID "NGD_ID" + #define F_CLASS "CLASS" + #define F_NAME "NAME" + #define F_TYPE "TYPE" + #define F_DIRECTION "DIRECTION" + #define F_ADDR_FM_LE "ADDR_FM_LE" + #define F_ADDR_TO_LE "ADDR_TO_LE" + #define F_ADDR_FM_RG "ADDR_FM_RG" + #define F_ADDR_TO_RG "ADDR_TO_RG" + // shapefile colum names for DCW *************** *** 144,148 **** * If the value is 0, the line will be ignored. */ ! static char shapefile2type (char cfcc, int carto) { switch (cfcc) { --- 157,161 ---- * If the value is 0, the line will be ignored. */ ! static char shapefile2type_dmti (char cfcc, int carto) { switch (cfcc) { *************** *** 162,165 **** --- 175,215 ---- break; + case 'H': /* Rivers, lakes and sea. */ + + switch (carto) { + + case '0': return BuildMapLayerShoreline; + case '1': return BuildMapLayerRiver; + case '2': return BuildMapLayerCanal; + case '5': return BuildMapLayerSea; + } + break; + } + return 0; + } + + static char shapefile2type_rnf (char cfcc, const char *class) { + + if (!strcmp(class, "UTR")) { // Utility roads + return BuildMapLayerTrail; + } else if (!strcmp(class, "CON")) { // Connector roads + return BuildMapLayerMain; + } else if (!strcmp(class, "UR")) { // Unclassified roads + return BuildMapLayerStreet; + } else if (!strcmp(class, "ST")) { // Streets + return BuildMapLayerStreet; + } else if (!strcmp(class, "HI")) { // Highways + return BuildMapLayerFreeway; + } else if (!strcmp(class, "BT")) { // Bridges and tunnels + return BuildMapLayerMain; + } + + return 0; + } + + static char shapefile2type_dcw (char cfcc, int carto) { + + switch (cfcc) { + case 'D': /* DCW Roads. */ *************** *** 219,223 **** else { s++; ! continue; } if (!cnt) s++; --- 269,273 ---- else { s++; ! continue; } if (!cnt) s++; *************** *** 248,252 **** char **cities, **c; char **places, **p; ! cities = buildmap_clean_split_string(mun); if (strcmp(mun, maf)) { --- 298,302 ---- char **cities, **c; char **places, **p; ! cities = buildmap_clean_split_string(mun); if (strcmp(mun, maf)) { *************** *** 323,331 **** int diff_fr; int diff_to; ! int iCARTO, iFRADDL, iTOADDL, iFRADDR, iTOADDR, iZIPL, iZIPR; int iFEDIRP, iFETYPEP, iFENAME, iFETYPES, iFEDIRS; int iLEFT_MUN, iRIGHT_MUN, iLEFT_MAF, iRIGHT_MAF, iUID; ! DBFHandle hDBF; SHPHandle hSHP; --- 373,381 ---- int diff_fr; int diff_to; ! int iCARTO, iFRADDL, iTOADDL, iFRADDR, iTOADDR, iZIPL, iZIPR; int iFEDIRP, iFETYPEP, iFENAME, iFETYPES, iFEDIRS; int iLEFT_MUN, iRIGHT_MUN, iLEFT_MAF, iRIGHT_MAF, iUID; ! DBFHandle hDBF; SHPHandle hSHP; *************** *** 368,373 **** iRIGHT_MAF = DBFGetFieldIndex(hDBF, F_RIGHT_MAF); iUID = DBFGetFieldIndex(hDBF, F_UID); ! ! record_count = DBFGetRecordCount(hDBF); merged_range_count = 0; --- 418,423 ---- iRIGHT_MAF = DBFGetFieldIndex(hDBF, F_RIGHT_MAF); iUID = DBFGetFieldIndex(hDBF, F_UID); ! ! record_count = DBFGetRecordCount(hDBF); merged_range_count = 0; *************** *** 377,386 **** buildmap_set_line (irec); ! cfcc = shapefile2type('R', DBFReadIntegerAttribute(hDBF, irec, iCARTO)); tlid = DBFReadIntegerAttribute(hDBF, irec, iUID); if (cfcc > 0) { ! fedirp = str2dict (DictionaryPrefix, DBFReadStringAttribute(hDBF, irec, iFEDIRP)); fename = str2dict (DictionaryStreet, --- 427,437 ---- buildmap_set_line (irec); ! cfcc = shapefile2type_dmti ! ('R', DBFReadIntegerAttribute(hDBF, irec, iCARTO)); tlid = DBFReadIntegerAttribute(hDBF, irec, iUID); if (cfcc > 0) { ! fedirp = str2dict (DictionaryPrefix, DBFReadStringAttribute(hDBF, irec, iFEDIRP)); fename = str2dict (DictionaryStreet, *************** *** 403,407 **** shp = SHPReadObject(hSHP, irec); ! frlong = shp->padfX[0] * 1000000.0; frlat = shp->padfY[0] * 1000000.0; --- 454,458 ---- shp = SHPReadObject(hSHP, irec); ! frlong = shp->padfX[0] * 1000000.0; frlat = shp->padfY[0] * 1000000.0; *************** *** 463,467 **** zip = buildmap_zip_add (zipl, frlong, frlat); ! if (fraddl == 0 && toaddl == 0) buildmap_range_add_no_address (line, street); else --- 514,518 ---- zip = buildmap_zip_add (zipl, frlong, frlat); ! if (fraddl == 0 && toaddl == 0) buildmap_range_add_no_address (line, street); else *************** *** 498,502 **** buildmap_set_line (irec); ! cfcc = shapefile2type('R', DBFReadIntegerAttribute(hDBF, irec, iCARTO)); if (cfcc > 0) { --- 549,554 ---- buildmap_set_line (irec); ! cfcc = shapefile2type_dmti ! ('R', DBFReadIntegerAttribute(hDBF, irec, iCARTO)); if (cfcc > 0) { *************** *** 508,512 **** if (line_index >= 0) { ! // Add the shape points here --- 560,564 ---- if (line_index >= 0) { ! // Add the shape points here *************** *** 515,519 **** if (lon != 0) { lat = shp->padfY[j] * 1000000.0; ! buildmap_shape_add(line_index, j-1, lon, lat); } } --- 567,571 ---- if (lon != 0) { lat = shp->padfY[j] * 1000000.0; ! buildmap_shape_add(line_index, irec, tlid, j-1, lon, lat); } } *************** *** 552,555 **** --- 604,848 ---- } + /******************************** RNF ***************************************/ + + static void buildmap_shapefile_read_rnf_rte (const char *source, int verbose) { + + int irec; + int record_count; + int merged_range_count; + + const char *munl, *munr, *mafl, *mafr; + + int line; + int line_index; + int street; + + char cfcc; + int tlid; + RoadMapString dirp; + RoadMapString dirs; + RoadMapString name; + RoadMapString type; + unsigned int fraddl; + unsigned int toaddl; + unsigned int fraddr; + unsigned int toaddr; + int frlong; + int frlat; + int tolong; + int tolat; + int from_point; + int to_point; + int j, lat, lon; + + RoadMapZip zip = 0; + int zipl, zipr; + int merged_range; + int diff_fr; + int diff_to; + + int iCLASS, iFRADDL, iTOADDL, iFRADDR, iTOADDR; + int iDIR, iTYPE, iNAME, iUID; + + DBFHandle hDBF; + SHPHandle hSHP; + SHPObject *shp; + + char *full_name = malloc(strlen(source) + 4); + + DictionaryPrefix = buildmap_dictionary_open ("prefix"); + DictionaryStreet = buildmap_dictionary_open ("street"); + DictionaryType = buildmap_dictionary_open ("type"); + DictionarySuffix = buildmap_dictionary_open ("suffix"); + DictionaryCity = buildmap_dictionary_open ("city"); + DictionaryFSA = buildmap_dictionary_open ("fsa"); + + roadmap_check_allocated(full_name); + + strcpy (full_name, source); + // strcat (full_name, "rte"); + + buildmap_set_source(full_name); + + hDBF = DBFOpen(full_name, "rb"); + hSHP = SHPOpen(full_name, "rb"); + + iCLASS = DBFGetFieldIndex(hDBF, F_CLASS); + iFRADDL = DBFGetFieldIndex(hDBF, F_ADDR_FM_LE); + iTOADDL = DBFGetFieldIndex(hDBF, F_ADDR_TO_LE); + iFRADDR = DBFGetFieldIndex(hDBF, F_ADDR_FM_RG); + iTOADDR = DBFGetFieldIndex(hDBF, F_ADDR_TO_RG); + iDIR = DBFGetFieldIndex(hDBF, F_DIRECTION); + iTYPE = DBFGetFieldIndex(hDBF, F_TYPE); + iNAME = DBFGetFieldIndex(hDBF, F_NAME); + iUID = DBFGetFieldIndex(hDBF, F_NGD_ID); + + + record_count = DBFGetRecordCount(hDBF); + merged_range_count = 0; + + dirp = str2dict (DictionaryPrefix, ""); + + for (irec=0; irec<record_count; irec++) { + + buildmap_set_line (irec); + + cfcc = shapefile2type_rnf('R', DBFReadStringAttribute(hDBF, irec, iCLASS)); + tlid = DBFReadIntegerAttribute(hDBF, irec, iUID); + + if (cfcc > 0) { + + dirs = str2dict (DictionarySuffix, + DBFReadStringAttribute(hDBF, irec, iDIR)); + name = str2dict (DictionaryStreet, + DBFReadStringAttribute(hDBF, irec, iNAME)); + type = str2dict (DictionaryType, + DBFReadStringAttribute(hDBF, irec, iTYPE)); + + fraddl = (unsigned int) DBFReadIntegerAttribute(hDBF, irec, iFRADDL); + toaddl = (unsigned int) DBFReadIntegerAttribute(hDBF, irec, iTOADDL); + + fraddr = (unsigned int) DBFReadIntegerAttribute(hDBF, irec, iFRADDR); + toaddr = (unsigned int) DBFReadIntegerAttribute(hDBF, irec, iTOADDR); + + shp = SHPReadObject(hSHP, irec); + + frlong = shp->padfX[0] * 1000000.0; + frlat = shp->padfY[0] * 1000000.0; + + tolong = shp->padfX[shp->nVertices-1] * 1000000.0; + tolat = shp->padfY[shp->nVertices-1] * 1000000.0; + + from_point = buildmap_point_add (frlong, frlat); + to_point = buildmap_point_add (tolong, tolat); + + line = buildmap_line_add (tlid, cfcc, from_point, to_point); + + SHPDestroyObject(shp); + + street = buildmap_street_add + (cfcc, dirp, name, type, dirs, line); + + /* Check if the two sides of the street can be merged into + * a single range (same city/place, same zip, and same range + * beside the even/odd difference). + */ + zipl = zipr = 1; // no zips in RNF file + munl = munr = "?"; // no zips in RNF file + mafl = mafr = "?"; // no zips in RNF file + merged_range = 0; + diff_fr = fraddr - fraddl; + diff_to = toaddr - toaddl; + + if ((zipl == zipr) && + !strcmp(munl, munr) && !strcmp(mafl, mafr) && + (abs(diff_fr) < 10) && + (abs(diff_to) < 10) && + (fraddl != 0 || toaddl != 0 || fraddr != 0 || toaddr != 0)) { + + unsigned int fradd; + unsigned int toadd; + + buildmap_range_merge (fraddl, toaddl, + fraddr, toaddr, + &fradd, &toadd); + + zip = buildmap_zip_add (zipl, frlong, frlat); + + if (fradd == 0 && toadd == 0) { + buildmap_range_add_no_address (line, street); + continue; + } else { + buildmap_range_add_address + (munl, mafl, zip, line, street, fradd, toadd); + + merged_range = 1; + merged_range_count += 1; + } + } + + if (! merged_range) { + + zip = buildmap_zip_add (zipl, frlong, frlat); + + if (fraddl == 0 && toaddl == 0) + buildmap_range_add_no_address (line, street); + else + buildmap_range_add_address + (munl, mafl, zip, line, street, fraddl, toaddl); + + if (zipr != zipl) + zip = buildmap_zip_add (zipr, frlong, frlat); + + if (fraddr == 0 && toaddr == 0) { + if (fraddl != 0 || toaddl != 0) { + buildmap_range_add_no_address (line, street); + } + } else { + buildmap_range_add_address + (munr, mafr, zip, line, street, fraddr, toaddr); + } + } + } + + if (verbose) { + if ((irec & 0xff) == 0) { + buildmap_progress (irec, record_count); + } + } + } + + buildmap_info("loading shape info ..."); + + buildmap_line_sort(); + + for (irec=0; irec<record_count; irec++) { + + buildmap_set_line (irec); + + cfcc = shapefile2type_rnf + ('R', DBFReadStringAttribute(hDBF, irec, iCLASS)); + + if (cfcc > 0) { + + shp = SHPReadObject(hSHP, irec); + + tlid = DBFReadIntegerAttribute(hDBF, irec, iUID); + line_index = buildmap_line_find_sorted(tlid); + + if (line_index >= 0) { + + // Add the shape points here + + for (j=1; j<shp->nVertices-1; j++) { + lon = shp->padfX[j] * 1000000.0; + if (lon != 0) { + lat = shp->padfY[j] * 1000000.0; + buildmap_shape_add(line_index, irec, tlid, j-1, lon, lat); + } + } + } + + SHPDestroyObject(shp); + + } + + if (verbose) { + if ((irec & 0xff) == 0) { + buildmap_progress (irec, record_count); + } + } + } + + DBFClose(hDBF); + SHPClose(hSHP); + + shapefile_summary (verbose, record_count); + if (merged_range_count > 0) { + buildmap_summary (verbose, "%d ranges merged", merged_range_count); + } + + free(full_name); + } /******************************** DCW ***************************************/ *************** *** 579,583 **** int iEXS, iMED, iACC, iRTT, iUID; ! DBFHandle hDBF; SHPHandle hSHP; --- 872,876 ---- int iEXS, iMED, iACC, iRTT, iUID; ! DBFHandle hDBF; SHPHandle hSHP; *************** *** 619,623 **** * 15 - Secondary route ****************************************/ ! iEXS = DBFGetFieldIndex(hDBF, F_EXS); iMED = DBFGetFieldIndex(hDBF, F_MED); --- 912,916 ---- * 15 - Secondary route ****************************************/ ! iEXS = DBFGetFieldIndex(hDBF, F_EXS); iMED = DBFGetFieldIndex(hDBF, F_MED); *************** *** 625,630 **** iRTT = DBFGetFieldIndex(hDBF, F_RTT); iUID = DBFGetFieldIndex(hDBF, F_ID); ! ! record_count = DBFGetRecordCount(hDBF); --- 918,923 ---- iRTT = DBFGetFieldIndex(hDBF, F_RTT); iUID = DBFGetFieldIndex(hDBF, F_ID); ! ! record_count = DBFGetRecordCount(hDBF); *************** *** 641,645 **** exs = DBFReadIntegerAttribute(hDBF, irec, iEXS); if (exs < 10) rtt = exs; ! cfcc = shapefile2type('D', rtt); tlid = DBFReadIntegerAttribute(hDBF, irec, iUID); --- 934,938 ---- exs = DBFReadIntegerAttribute(hDBF, irec, iEXS); if (exs < 10) rtt = exs; ! cfcc = shapefile2type_dcw('D', rtt); tlid = DBFReadIntegerAttribute(hDBF, irec, iUID); *************** *** 647,651 **** shp = SHPReadObject(hSHP, irec); ! frlong = shp->padfX[0] * 1000000.0; frlat = shp->padfY[0] * 1000000.0; --- 940,944 ---- shp = SHPReadObject(hSHP, irec); ! frlong = shp->padfX[0] * 1000000.0; frlat = shp->padfY[0] * 1000000.0; *************** *** 663,667 **** street = buildmap_street_add (cfcc, fedirp, fename, fetype, fedirs, line); ! buildmap_range_add_no_address (line, street); } --- 956,960 ---- street = buildmap_street_add (cfcc, fedirp, fename, fetype, fedirs, line); ! buildmap_range_add_no_address (line, street); } *************** *** 685,689 **** exs = DBFReadIntegerAttribute(hDBF, irec, iEXS); if (exs < 10) rtt = exs; ! cfcc = shapefile2type('D', rtt); if (cfcc > 0) { --- 978,982 ---- exs = DBFReadIntegerAttribute(hDBF, irec, iEXS); if (exs < 10) rtt = exs; ! cfcc = shapefile2type_dcw('D', rtt); if (cfcc > 0) { *************** *** 695,699 **** if (line_index >= 0) { ! // Add the shape points here --- 988,992 ---- if (line_index >= 0) { ! // Add the shape points here *************** *** 702,706 **** if (lon != 0) { lat = shp->padfY[j] * 1000000.0; ! buildmap_shape_add(line_index, j-1, lon, lat); } } --- 995,999 ---- if (lon != 0) { lat = shp->padfY[j] * 1000000.0; ! buildmap_shape_add(line_index, irec, tlid, j-1, lon, lat); } } *************** *** 708,711 **** --- 1001,1005 ---- SHPDestroyObject(shp); + } *************** *** 735,752 **** } - #endif // ROADMAP_USE_SHAPEFILES - ! void buildmap_shapefile_process (const char *source, const char *county, int verbose) { - #if ROADMAP_USE_SHAPEFILES - char *base = roadmap_path_remove_extension (source); - char *basename = roadmap_path_skip_directories (base); - - /* Remove the "file type", if any, to keep only the province's name. */ - if (strlen(basename) > 2) basename[2] = 0; buildmap_shapefile_find_layers (); --- 1029,1038 ---- } ! void buildmap_shapefile_dmti_process (const char *source, const char *county, int verbose) { char *base = roadmap_path_remove_extension (source); buildmap_shapefile_find_layers (); *************** *** 758,777 **** free (base); - #else - - fprintf (stderr, - "cannot process %s: built with no shapefile support.\n", - source); - exit(1); - #endif // ROADMAP_USE_SHAPEFILES } void buildmap_shapefile_dcw_process (const char *source, const char *county, int verbose) { - #if ROADMAP_USE_SHAPEFILES - char *base = roadmap_path_remove_extension (source); --- 1044,1071 ---- free (base); } + /* Canadian Road Network File */ + void buildmap_shapefile_rnf_process (const char *source, + const char *county, + int verbose) { + + char *base = roadmap_path_remove_extension (source); + + buildmap_shapefile_find_layers (); + + buildmap_shapefile_read_rnf_rte(base, verbose); + buildmap_shapefile_read_hyl(base, verbose); + buildmap_shapefile_read_hyr(base, verbose); + + free (base); + + } + /* Digital Charts of the World */ void buildmap_shapefile_dcw_process (const char *source, const char *county, int verbose) { char *base = roadmap_path_remove_extension (source); *************** *** 784,794 **** free (base); ! #else - fprintf (stderr, - "cannot process %s: built with no shapefile support.\n", - source); - exit(1); #endif // ROADMAP_USE_SHAPEFILES - } --- 1078,1083 ---- free (base); ! } #endif // ROADMAP_USE_SHAPEFILES Index: rdmgenshpmaps =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/rdmgenshpmaps,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rdmgenshpmaps 29 Oct 2004 05:52:41 -0000 1.1 --- rdmgenshpmaps 10 Aug 2006 14:04:03 -0000 1.2 *************** *** 3,8 **** # rdmgenshpmaps # ! # Utility to scan a directory for Canadian province shapefiles and ! # process them through buildmap # # Usage: --- 3,8 ---- # rdmgenshpmaps # ! # Utility to scan a directory for the Canadian shapefile maps, in ! # either DMTI or RNF format, and process them through buildmap. # # Usage: *************** *** 10,20 **** # rdmgenshpmaps <shapefile path> [maps=<map-directory-path>] # [test] # [<province-abbrev> ...] maps=/usr/local/share/roadmap - prov='*' if [ $# -eq 0 ] ; then ! echo 'Usage: rdmgenshpmaps <shapefile path> [maps=<map-directory-path>] [test] [dryrun] [<province-abbrev> ...]' exit 1 fi --- 10,26 ---- # rdmgenshpmaps <shapefile path> [maps=<map-directory-path>] # [test] + # [dmti] # [<province-abbrev> ...] + + # the RNF format maps are available from: + # + # http://geodepot.statcan.ca/Diss/2006Dissemination/Data/FRR_RNF_e.cfm?language=E&format=A + # + maps=/usr/local/share/roadmap if [ $# -eq 0 ] ; then ! echo 'Usage: rdmgenshpmaps <shapefile path> [maps=<map-directory-path>] [test] [dryrun] [dmti] [<province-abbrev> ...]' exit 1 fi *************** *** 25,28 **** --- 31,35 ---- verbose='' gendir=Y + DRYRUN=N case $1 in *************** *** 45,73 **** esac ! if [ -e ./buildmap ] ; then ! BUILDMAP=./buildmap ! else ! BUILDMAP=buildmap fi # AB BC MB NB NL NS NT NU ON PE QC SK YT # 87 88 89 90 91 92 93 94 95 96 97 98 99 function get_fips { ! case $1 in ! AB) FIPS=87001 ;; ! BC) FIPS=88001 ;; ! MB) FIPS=89001 ;; ! NB) FIPS=90001 ;; ! NL) FIPS=91001 ;; ! NS) FIPS=92001 ;; ! NT) FIPS=93001 ;; ! NU) FIPS=94001 ;; ! ON) FIPS=95001 ;; ! PE) FIPS=96001 ;; ! QC) FIPS=97001 ;; ! SK) FIPS=98001 ;; ! YT) FIPS=99001 ;; *) FIPS='' ;; esac --- 52,97 ---- esac ! # default to free Road Network Format ! shape=RNF ! filepattern=$SRCDIR/grnf???r05a_e.shp ! case $1 in ! # DMTI commercial format ! dmti) shape=DMTI ! filepattern=$SRCDIR/??rte.shp ! shift ! ;; ! esac ! ! if [ ! "$BUILDMAP" ] ! then ! if [ -e ./buildmap ] ; then ! BUILDMAP=./buildmap ! else ! BUILDMAP=buildmap ! fi fi + # AB BC MB NB NL NS NT NU ON PE QC SK YT # 87 88 89 90 91 92 93 94 95 96 97 98 99 function get_fips { ! # handle either RNF or DMTI naming convention ! f=`basename $1` ! case $f in ! grnf048*|AB*) FIPS=87001; echo Alberta ;; ! grnf059*|BC*) FIPS=88001; echo British Columbia ;; ! grnf046*|MB*) FIPS=89001; echo Manitoba ;; ! grnf013*|NB*) FIPS=90001; echo New Brunswick ;; ! grnf010*|NL*) FIPS=91001; echo Newfoundland and Labrador ;; ! grnf012*|NS*) FIPS=92001; echo Nova Scotia ;; ! grnf061*|NT*) FIPS=93001; echo Northwest Territories ;; ! grnf062*|NU*) FIPS=94001; echo Nunavit ;; ! grnf035*|ON*) FIPS=95001; echo Ontario ;; ! grnf011*|PE*) FIPS=96001; echo Prince Edward Island ;; ! grnf024*|QC*) FIPS=97001; echo Quebec ;; ! grnf047*|SK*) FIPS=98001; echo Saskatchewan ;; ! grnf060*|YT*) FIPS=99001; echo Yukon ;; *) FIPS='' ;; esac *************** *** 75,119 **** if [ $# -gt 0 ] ; then ! ! for i in $* ! do ! get_fips $i ! echo $BUILDMAP -f SHAPE -m $maps $verbose $FIPS $SRCDIR/$i ! if [ $DRYRUN != 'Y' ] ; then ! $BUILDMAP -f SHAPE -m $maps $verbose $FIPS $SRCDIR/$i ! fi ! done ! else ! ! for i in $SRCDIR/??rte.shp ! do ! if [ -e $i ] ; then ! base=`basename $i` ! prov_id=`expr substr $base 1 2` ! get_fips $prov_id ! echo $BUILDMAP -f SHAPE -m $maps $verbose $FIPS $SRCDIR/$prov_id ! if [ $DRYRUN != 'Y' ] ; then ! $BUILDMAP -f SHAPE -m $maps $verbose $FIPS $SRCDIR/$prov_id ! fi ! fi ! done ! fi if [ $gendir = 'Y' ] ; then echo "Generating usdir.rdm, please wait.." ! if [ -e buildus ] ; then ! echo ./buildus -s --maps=$maps ! if [ $DRYRUN != 'Y' ] ; then ! ./buildus -s --maps=$maps ! fi ! else ! echo buildus -s --maps=$maps ! if [ $DRYRUN != 'Y' ] ; then ! buildus -s --maps=$maps ! fi ! fi fi --- 99,132 ---- if [ $# -gt 0 ] ; then ! files="$*" else ! files=`echo $filepattern` fi + for file in $files + do + get_fips $file + echo $BUILDMAP -f $shape -m $maps $verbose $FIPS $SRCDIR/$file + if [ $DRYRUN != 'Y' ] ; then + $BUILDMAP -f $shape -m $maps $verbose $FIPS $SRCDIR/$file + fi + done + if [ $gendir = 'Y' ] ; then echo "Generating usdir.rdm, please wait.." ! if [ ! "$BUILDUS" ] ! then ! if [ -e buildus ] ; then ! BUILDUS=./buildus ! else ! BUILDUS=buildus ! fi ! fi ! ! echo $BUILDUS -s --maps=$maps ! if [ $DRYRUN != 'Y' ] ; then ! $BUILDUS -s --maps=$maps ! fi fi Index: buildmap_shape.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_shape.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** buildmap_shape.h 16 Jan 2006 20:37:08 -0000 1.2 --- buildmap_shape.h 10 Aug 2006 14:04:03 -0000 1.3 *************** *** 27,31 **** #include "roadmap_types.h" ! int buildmap_shape_add (int line, int sequence, int longitude, int latitude); #endif // INCLUDED__BUILDMAP_SHAPE__H --- 27,31 ---- #include "roadmap_types.h" ! int buildmap_shape_add (int line, int irec, int uid, int sequence, int longitude, int latitude); #endif // INCLUDED__BUILDMAP_SHAPE__H Index: buildmap_shapefile.h =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_shapefile.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** buildmap_shapefile.h 5 Feb 2006 23:17:11 -0000 1.4 --- buildmap_shapefile.h 10 Aug 2006 14:04:03 -0000 1.5 *************** *** 25,32 **** #define INCLUDED__BUILDMAP_SHAPEFILE__H ! void buildmap_shapefile_process (const char *source, const char *county, int verbose); void buildmap_shapefile_dcw_process (const char *source, const char *county, --- 25,36 ---- #define INCLUDED__BUILDMAP_SHAPEFILE__H ! void buildmap_shapefile_dmti_process (const char *source, const char *county, int verbose); + void buildmap_shapefile_rnf_process (const char *source, + const char *county, + int verbose); + void buildmap_shapefile_dcw_process (const char *source, const char *county, Index: buildmap_shape.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_shape.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** buildmap_shape.c 11 Feb 2006 03:45:20 -0000 1.6 --- buildmap_shape.c 10 Aug 2006 14:04:02 -0000 1.7 *************** *** 92,96 **** int buildmap_shape_add ! (int line, int sequence, int longitude, int latitude) { int index; --- 92,96 ---- int buildmap_shape_add ! (int line, int irec, int uid, int sequence, int longitude, int latitude) { int index; *************** *** 122,126 **** if ((this_shape->longitude != longitude) || (this_shape->latitude != latitude )) { ! buildmap_error (0, "duplicated sequence number"); } --- 122,126 ---- if ((this_shape->longitude != longitude) || (this_shape->latitude != latitude )) { ! buildmap_error (0, "duplicated sequence number, irec %d, uid %d, %d/%d", irec, uid, longitude, latitude); } Index: buildmap_tiger.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/buildmap_tiger.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** buildmap_tiger.c 7 Jun 2006 07:28:10 -0000 1.12 --- buildmap_tiger.c 10 Aug 2006 14:04:03 -0000 1.13 *************** *** 676,680 **** buildmap_shape_add ! (line_index, (10 * sequence) + i, longitude, latitude); record_count += 1; --- 676,680 ---- buildmap_shape_add ! (line_index, 0, tlid, (10 * sequence) + i, longitude, latitude); record_count += 1; Index: rdmgendcwmaps =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/rdmgendcwmaps,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rdmgendcwmaps 29 Oct 2004 05:52:41 -0000 1.1 --- rdmgendcwmaps 10 Aug 2006 14:04:03 -0000 1.2 *************** *** 1,5 **** #!/bin/sh # ! # rdmgenshpmaps # # Utility to scan a directory for the Digital Charts of the World --- 1,5 ---- #!/bin/sh # ! # rdmgendcwmaps # # Utility to scan a directory for the Digital Charts of the World *************** *** 8,12 **** # Usage: # ! # rdmgenshpmaps [maps=<map-directory-path>] [test] [dryrun] <files>... # --- 8,12 ---- # Usage: # ! # rdmgendcwmaps [maps=<map-directory-path>] [test] [dryrun] <files>... # |
From: Paul F. <pg...@us...> - 2006-08-10 13:57:48
|
Update of /cvsroot/roadmap/roadmap/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv17030 Modified Files: rdmindex_main.c Log Message: avoid null dereference Index: rdmindex_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap/src/rdmindex_main.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** rdmindex_main.c 28 Jun 2006 13:46:41 -0000 1.4 --- rdmindex_main.c 10 Aug 2006 13:56:59 -0000 1.5 *************** *** 270,274 **** * default that is assumed to match the intend in most cases. */ ! if ((RdmIndexPath == NULL) && (leftovers[0] != NULL)) { if ((leftovers[1] == NULL) && roadmap_path_is_directory(leftovers[0])) { RdmIndexPath = strdup(leftovers[0]); --- 270,274 ---- * default that is assumed to match the intend in most cases. */ ! if ((RdmIndexPath == NULL) && leftovers && (leftovers[0] != NULL)) { if ((leftovers[1] == NULL) && roadmap_path_is_directory(leftovers[0])) { RdmIndexPath = strdup(leftovers[0]); |
From: Ehud S. <esh...@us...> - 2006-08-09 07:43:06
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9936 Added Files: CEDevice.cpp CEDevice.h CEException.cpp CEException.h Log Message: Import some classes from the ScummVM project for wince support. --- NEW FILE: CEDevice.h --- /* ScummVM - Scumm Interpreter * Copyright (C) 2001-2006 The ScummVM project * * This program 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. * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * $Header: /cvsroot/roadmap/roadmap_editor/src/win32/CEDevice.h,v 1.1 2006/08/09 07:43:03 eshabtai Exp $ * */ #ifndef CEDEVICE #define CEDEVICE class CEDevice { public: static void init(); static void end(); static void wakeUp(); static bool hasPocketPCResolution(); static bool hasDesktopResolution(); static bool hasWideResolution(); static bool hasSmartphoneResolution(); static bool isSmartphone(); }; #endif --- NEW FILE: CEException.h --- /* ScummVM - Scumm Interpreter * Copyright (C) 2001-2006 The ScummVM project * * This program 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. * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * $Header: /cvsroot/roadmap/roadmap_editor/src/win32/CEException.h,v 1.1 2006/08/09 07:43:03 eshabtai Exp $ * */ #include <windows.h> class CEException { public: static bool writeException(TCHAR *path, EXCEPTION_POINTERS *exceptionPointers); private: static void writeString(HANDLE file, char *data); static void writeBreak(HANDLE file); static void dumpContext(HANDLE file, HANDLE hProcess, CONTEXT *context); static void dumpException(HANDLE file, EXCEPTION_RECORD *exceptionRecord); }; --- NEW FILE: CEException.cpp --- /* ScummVM - Scumm Interpreter * Copyright (C) 2001-2006 The ScummVM project * * This program 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. * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * $Header: /cvsroot/roadmap/roadmap_editor/src/win32/CEException.cpp,v 1.1 2006/08/09 07:43:03 eshabtai Exp $ * */ #include "CEException.h" void CEException::writeString(HANDLE file, char *data) { DWORD dummy; WriteFile(file, data, strlen(data), &dummy, NULL); WriteFile(file, "\r\n", 2, &dummy, NULL); } void CEException::writeBreak(HANDLE file) { char tempo[100]; int i; memset(tempo, 0, sizeof(tempo)); for (i=0; i<40; i++) tempo[i] = '-'; writeString(file, tempo); } void CEException::dumpContext(HANDLE file, HANDLE hProcess, CONTEXT *context) { char tempo[200]; unsigned char memoryDump[100]; DWORD size; unsigned int i; #ifdef ARM writeBreak(file); writeString(file, "Context dump"); sprintf(tempo, "R0=%.8x R1=%.8x R2=%.8x R3=%.8x R4=%.8x", context->R0, context->R1, context->R2, context->R3, context->R4); writeString(file, tempo); sprintf(tempo, "R5=%.8x R6=%.8x R7=%.8x R8=%.8x R9=%.8x", context->R5, context->R6, context->R7, context->R8, context->R9); writeString(file, tempo); sprintf(tempo, "R10=%.8x R11=%.8x R12=%.8x", context->R10, context->R11, context->R12); writeString(file, tempo); sprintf(tempo, "Sp=%.8x Lr=%.8x Pc=%.8x Psr=%.8x", context->Sp, context->Lr, context->Pc, context->Psr); writeString(file, tempo); writeBreak(file); sprintf(tempo, "Memory dump at %.8x", context->Pc - (sizeof(memoryDump) / 2)); writeString(file, tempo); if (ReadProcessMemory(hProcess, (LPCVOID)(context->Pc - (sizeof(memoryDump) / 2)), memoryDump, sizeof(memoryDump), &size)) { for (i=0; i<size; i+=8) { int j; char digit[3]; int max; max = size - i; if (max > 8) max = 8; tempo[0] = '\0'; for (j=0; j<max; j++) { sprintf(digit, "%.2x ", memoryDump[i + j]); strcat(tempo, digit); } writeString(file, tempo); } } #else writeBreak(file); writeString(file, "Context dump only available on ARM devices"); #endif } void CEException::dumpException(HANDLE file, EXCEPTION_RECORD *exceptionRecord) { char tempo[200]; char exceptionName[50]; unsigned int i; #if (_WIN32_WCE >= 300) writeBreak(file); switch(exceptionRecord->ExceptionCode) { case EXCEPTION_ACCESS_VIOLATION : strcpy(exceptionName, "Access Violation"); break; case EXCEPTION_ARRAY_BOUNDS_EXCEEDED : strcpy(exceptionName, "Array Bounds Exceeded"); break; case EXCEPTION_DATATYPE_MISALIGNMENT : strcpy(exceptionName, "Datatype Misalignment"); break; case EXCEPTION_IN_PAGE_ERROR : strcpy(exceptionName, "In Page Error"); break; case EXCEPTION_INT_DIVIDE_BY_ZERO : strcpy(exceptionName, "Int Divide By Zero"); break; case EXCEPTION_INT_OVERFLOW : strcpy(exceptionName, "Int Overflow"); break; case EXCEPTION_STACK_OVERFLOW : strcpy(exceptionName, "Stack Overflow"); break; default: sprintf(exceptionName, "%.8x", exceptionRecord->ExceptionCode); break; } sprintf(tempo, "Exception %s Flags %.8x Address %.8x", exceptionName, exceptionRecord->ExceptionFlags, exceptionRecord->ExceptionAddress); writeString(file, tempo); if (exceptionRecord->NumberParameters) { for (i=0; i<exceptionRecord->NumberParameters; i++) { sprintf(tempo, "Parameter %d %.8x", i, exceptionRecord->ExceptionInformation[i]); writeString(file, tempo); } } if (exceptionRecord->ExceptionRecord) dumpException(file, exceptionRecord->ExceptionRecord); #else writeBreak(file); writeString(file, "Cannot get exception information on this CE version"); #endif } bool CEException::writeException(TCHAR *path, EXCEPTION_POINTERS *exceptionPointers) { HANDLE dumpFile; TCHAR dumpFileName[MAX_PATH]; SYSTEMTIME systemTime; GetSystemTime(&systemTime); wsprintf(dumpFileName, TEXT("%s_%.2d_%.2d_%.4d_%.2d_%.2d_%.2d.txt"), path, systemTime.wDay, systemTime.wMonth, systemTime.wYear, systemTime.wHour, systemTime.wMinute, systemTime.wSecond); dumpFile = CreateFile(dumpFileName, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (dumpFile == INVALID_HANDLE_VALUE) return false; dumpException(dumpFile, exceptionPointers->ExceptionRecord); dumpContext(dumpFile, GetCurrentProcess(), exceptionPointers->ContextRecord); CloseHandle(dumpFile); return true; } --- NEW FILE: CEDevice.cpp --- /* ScummVM - Scumm Interpreter * Copyright (C) 2001-2006 The ScummVM project * * This program 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. * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * $Header: /cvsroot/roadmap/roadmap_editor/src/win32/CEDevice.cpp,v 1.1 2006/08/09 07:43:03 eshabtai Exp $ * */ //#define SIMU_SMARTPHONE 1 //#define SIMU_SMARTPHONE_2005 1 #include "windows.h" #include "CEDevice.h" #define KEY_CALENDAR 0xc1 #define KEY_CONTACTS 0xc2 #define KEY_INBOX 0xc3 #define KEY_TASK 0xc4 static void (WINAPI* _SHIdleTimerReset)(void) = NULL; static HANDLE (WINAPI* _SetPowerRequirement)(PVOID,int,ULONG,PVOID,ULONG) = NULL; static DWORD (WINAPI* _ReleasePowerRequirement)(HANDLE) = NULL; static HANDLE _hPowerManagement = NULL; static DWORD _lastTime = 0; #define TIMER_TRIGGER 9000 // Power management code borrowed from MoDaCo & Betaplayer. Thanks ! void CEDevice::init() { HINSTANCE dll = LoadLibrary(TEXT("aygshell.dll")); if (dll) { *(FARPROC*)&_SHIdleTimerReset = GetProcAddress(dll, MAKEINTRESOURCE(2006)); } dll = LoadLibrary(TEXT("coredll.dll")); if (dll) { *(FARPROC*)&_SetPowerRequirement = GetProcAddress(dll, TEXT("SetPowerRequirement")); *(FARPROC*)&_ReleasePowerRequirement = GetProcAddress(dll, TEXT("ReleasePowerRequirement")); } if (_SetPowerRequirement) _hPowerManagement = _SetPowerRequirement(TEXT("BKL1:"), 0, 1, NULL, 0); _lastTime = GetTickCount(); } void CEDevice::end() { if (_ReleasePowerRequirement && _hPowerManagement) { _ReleasePowerRequirement(_hPowerManagement); } } void CEDevice::wakeUp() { DWORD currentTime = GetTickCount(); if (currentTime > _lastTime + TIMER_TRIGGER) { _lastTime = currentTime; SystemIdleTimerReset(); if (_SHIdleTimerReset) _SHIdleTimerReset(); } } bool CEDevice::isSmartphone() { #ifdef SIMU_SMARTPHONE return true; #else TCHAR platformType[100]; BOOL result = SystemParametersInfo(SPI_GETPLATFORMTYPE, sizeof(platformType), platformType, 0); if (!result && GetLastError() == ERROR_ACCESS_DENIED) return true; return (wcsnicmp(platformType, TEXT("SmartPhone"), 10) == 0); #endif } |
From: Ehud S. <esh...@us...> - 2006-08-09 07:40:31
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32/wince_env/libroadmap In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8541/libroadmap Modified Files: libroadmap.vcp Log Message: Update evc environment. Index: libroadmap.vcp =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/wince_env/libroadmap/libroadmap.vcp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** libroadmap.vcp 27 Jul 2006 14:29:59 -0000 1.14 --- libroadmap.vcp 9 Aug 2006 07:39:54 -0000 1.15 *************** *** 629,632 **** --- 629,633 ---- "..\..\..\roadmap_locator.h"\ "..\..\..\roadmap_plugin.h"\ + "..\..\..\roadmap_preferences.h"\ "..\..\..\roadmap_screen.h"\ "..\..\..\roadmap_shape.h"\ *************** *** 848,851 **** --- 849,854 ---- "..\..\..\editor\export\editor_download.h"\ "..\..\..\editor\export\editor_export.h"\ + "..\..\..\editor\export\editor_sync.h"\ + "..\..\..\navigate\navigate_main.h"\ "..\..\..\roadmap.h"\ "..\..\..\roadmap_canvas.h"\ *************** *** 998,1001 **** --- 1001,1005 ---- "..\..\..\editor\editor_main.h"\ "..\..\..\editor\export\editor_export.h"\ + "..\..\..\editor\export\editor_sync.h"\ "..\..\..\editor\export\editor_upload.h"\ "..\..\..\editor\track\editor_track_main.h"\ *************** *** 1007,1010 **** --- 1011,1015 ---- "..\..\..\roadmap_dbread.h"\ "..\..\..\roadmap_dictionary.h"\ + "..\..\..\roadmap_download.h"\ "..\..\..\roadmap_file.h"\ "..\..\..\roadmap_fileselection.h"\ *************** *** 1416,1423 **** --- 1421,1433 ---- "..\..\..\editor\editor_screen.h"\ "..\..\..\editor\export\editor_export.h"\ + "..\..\..\editor\export\editor_sync.h"\ "..\..\..\editor\export\editor_upload.h"\ "..\..\..\editor\track\editor_track_main.h"\ "..\..\..\roadmap.h"\ "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_dictionary.h"\ + "..\..\..\roadmap_download.h"\ "..\..\..\roadmap_file.h"\ "..\..\..\roadmap_gps.h"\ *************** *** 1426,1429 **** --- 1436,1442 ---- "..\..\..\roadmap_layer.h"\ "..\..\..\roadmap_list.h"\ + "..\..\..\roadmap_locator.h"\ + "..\..\..\roadmap_messagebox.h"\ + "..\..\..\roadmap_metadata.h"\ "..\..\..\roadmap_net.h"\ "..\..\..\roadmap_plugin.h"\ *************** *** 2079,2082 **** --- 2092,2096 ---- "..\..\..\roadmap_hash.h"\ "..\..\..\roadmap_io.h"\ + "..\..\..\roadmap_lang.h"\ "..\..\..\roadmap_layer.h"\ "..\..\..\roadmap_line.h"\ *************** *** 2609,2620 **** --- 2623,2645 ---- "..\..\..\roadmap_db.h"\ "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_dialog.h"\ "..\..\..\roadmap_dictionary.h"\ + "..\..\..\roadmap_download.h"\ "..\..\..\roadmap_file.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_io.h"\ + "..\..\..\roadmap_lang.h"\ + "..\..\..\roadmap_list.h"\ "..\..\..\roadmap_locator.h"\ + "..\..\..\roadmap_main.h"\ "..\..\..\roadmap_messagebox.h"\ "..\..\..\roadmap_metadata.h"\ + "..\..\..\roadmap_net.h"\ "..\..\..\roadmap_path.h"\ + "..\..\..\roadmap_serial.h"\ + "..\..\..\roadmap_spawn.h"\ "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 4350,4353 **** --- 4375,4379 ---- "..\..\..\navigate\navigate_plugin.h"\ "..\..\..\roadmap.h"\ + "..\..\..\roadmap_adjust.h"\ "..\..\..\roadmap_canvas.h"\ "..\..\..\roadmap_db.h"\ *************** *** 4361,4364 **** --- 4387,4391 ---- "..\..\..\roadmap_gui.h"\ "..\..\..\roadmap_io.h"\ + "..\..\..\roadmap_lang.h"\ "..\..\..\roadmap_layer.h"\ "..\..\..\roadmap_line.h"\ *************** *** 7326,7329 **** --- 7353,7357 ---- "..\..\..\roadmap_line_route.h"\ "..\..\..\roadmap_locator.h"\ + "..\..\..\roadmap_math.h"\ "..\..\..\roadmap_plugin.h"\ "..\..\..\roadmap_screen.h"\ *************** *** 8391,8394 **** --- 8419,8643 ---- # End Source File + # Begin Source File + + SOURCE=..\..\..\editor\static\update_range.c + + !IF "$(CFG)" == "libroadmap - Win32 (WCE ARM) Release" + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARM) Debug" + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE x86) Release" + + DEP_CPP_UPDAT=\ + "..\..\..\editor\db\editor_db.h"\ + "..\..\..\editor\db\editor_dictionary.h"\ + "..\..\..\editor\db\editor_line.h"\ + "..\..\..\editor\db\editor_square.h"\ + "..\..\..\editor\db\editor_street.h"\ + "..\..\..\editor\editor_log.h"\ + "..\..\..\editor\editor_main.h"\ + "..\..\..\editor\static\update_range.h"\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_db_line_route.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_dialog.h"\ + "..\..\..\roadmap_dictionary.h"\ + "..\..\..\roadmap_file.h"\ + "..\..\..\roadmap_fuzzy.h"\ + "..\..\..\roadmap_gps.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_io.h"\ + "..\..\..\roadmap_lang.h"\ + "..\..\..\roadmap_line.h"\ + "..\..\..\roadmap_line_route.h"\ + "..\..\..\roadmap_list.h"\ + "..\..\..\roadmap_locator.h"\ + "..\..\..\roadmap_messagebox.h"\ + "..\..\..\roadmap_navigate.h"\ + "..\..\..\roadmap_net.h"\ + "..\..\..\roadmap_plugin.h"\ + "..\..\..\roadmap_preferences.h"\ + "..\..\..\roadmap_screen.h"\ + "..\..\..\roadmap_serial.h"\ + "..\..\..\roadmap_spawn.h"\ + "..\..\..\roadmap_street.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE x86) Debug" + + DEP_CPP_UPDAT=\ + "..\..\..\editor\db\editor_db.h"\ + "..\..\..\editor\db\editor_dictionary.h"\ + "..\..\..\editor\db\editor_line.h"\ + "..\..\..\editor\db\editor_square.h"\ + "..\..\..\editor\db\editor_street.h"\ + "..\..\..\editor\editor_log.h"\ + "..\..\..\editor\editor_main.h"\ + "..\..\..\editor\static\update_range.h"\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_db_line_route.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_dialog.h"\ + "..\..\..\roadmap_dictionary.h"\ + "..\..\..\roadmap_file.h"\ + "..\..\..\roadmap_fuzzy.h"\ + "..\..\..\roadmap_gps.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_io.h"\ + "..\..\..\roadmap_lang.h"\ + "..\..\..\roadmap_line.h"\ + "..\..\..\roadmap_line_route.h"\ + "..\..\..\roadmap_list.h"\ + "..\..\..\roadmap_locator.h"\ + "..\..\..\roadmap_messagebox.h"\ + "..\..\..\roadmap_navigate.h"\ + "..\..\..\roadmap_net.h"\ + "..\..\..\roadmap_plugin.h"\ + "..\..\..\roadmap_preferences.h"\ + "..\..\..\roadmap_screen.h"\ + "..\..\..\roadmap_serial.h"\ + "..\..\..\roadmap_spawn.h"\ + "..\..\..\roadmap_street.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARMV4) Debug" + + DEP_CPP_UPDAT=\ + "..\..\..\editor\db\editor_db.h"\ + "..\..\..\editor\db\editor_dictionary.h"\ + "..\..\..\editor\db\editor_line.h"\ + "..\..\..\editor\db\editor_square.h"\ + "..\..\..\editor\db\editor_street.h"\ + "..\..\..\editor\editor_log.h"\ + "..\..\..\editor\editor_main.h"\ + "..\..\..\editor\static\update_range.h"\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_db_line_route.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_dialog.h"\ + "..\..\..\roadmap_dictionary.h"\ + "..\..\..\roadmap_file.h"\ + "..\..\..\roadmap_fuzzy.h"\ + "..\..\..\roadmap_gps.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_io.h"\ + "..\..\..\roadmap_lang.h"\ + "..\..\..\roadmap_line.h"\ + "..\..\..\roadmap_line_route.h"\ + "..\..\..\roadmap_list.h"\ + "..\..\..\roadmap_locator.h"\ + "..\..\..\roadmap_messagebox.h"\ + "..\..\..\roadmap_navigate.h"\ + "..\..\..\roadmap_net.h"\ + "..\..\..\roadmap_plugin.h"\ + "..\..\..\roadmap_preferences.h"\ + "..\..\..\roadmap_screen.h"\ + "..\..\..\roadmap_serial.h"\ + "..\..\..\roadmap_spawn.h"\ + "..\..\..\roadmap_street.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARMV4) Release" + + DEP_CPP_UPDAT=\ + "..\..\..\editor\db\editor_db.h"\ + "..\..\..\editor\db\editor_dictionary.h"\ + "..\..\..\editor\db\editor_line.h"\ + "..\..\..\editor\db\editor_square.h"\ + "..\..\..\editor\db\editor_street.h"\ + "..\..\..\editor\editor_log.h"\ + "..\..\..\editor\editor_main.h"\ + "..\..\..\editor\static\update_range.h"\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_db_line_route.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_dialog.h"\ + "..\..\..\roadmap_dictionary.h"\ + "..\..\..\roadmap_file.h"\ + "..\..\..\roadmap_fuzzy.h"\ + "..\..\..\roadmap_gps.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_io.h"\ + "..\..\..\roadmap_lang.h"\ + "..\..\..\roadmap_line.h"\ + "..\..\..\roadmap_line_route.h"\ + "..\..\..\roadmap_list.h"\ + "..\..\..\roadmap_locator.h"\ + "..\..\..\roadmap_messagebox.h"\ + "..\..\..\roadmap_navigate.h"\ + "..\..\..\roadmap_net.h"\ + "..\..\..\roadmap_plugin.h"\ + "..\..\..\roadmap_preferences.h"\ + "..\..\..\roadmap_screen.h"\ + "..\..\..\roadmap_serial.h"\ + "..\..\..\roadmap_spawn.h"\ + "..\..\..\roadmap_street.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARMV4) Profiler" + + DEP_CPP_UPDAT=\ + "..\..\..\editor\db\editor_db.h"\ + "..\..\..\editor\db\editor_dictionary.h"\ + "..\..\..\editor\db\editor_line.h"\ + "..\..\..\editor\db\editor_square.h"\ + "..\..\..\editor\db\editor_street.h"\ + "..\..\..\editor\editor_log.h"\ + "..\..\..\editor\editor_main.h"\ + "..\..\..\editor\static\update_range.h"\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_db_line_route.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_dialog.h"\ + "..\..\..\roadmap_dictionary.h"\ + "..\..\..\roadmap_file.h"\ + "..\..\..\roadmap_fuzzy.h"\ + "..\..\..\roadmap_gps.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_io.h"\ + "..\..\..\roadmap_lang.h"\ + "..\..\..\roadmap_line.h"\ + "..\..\..\roadmap_line_route.h"\ + "..\..\..\roadmap_list.h"\ + "..\..\..\roadmap_locator.h"\ + "..\..\..\roadmap_messagebox.h"\ + "..\..\..\roadmap_navigate.h"\ + "..\..\..\roadmap_net.h"\ + "..\..\..\roadmap_plugin.h"\ + "..\..\..\roadmap_preferences.h"\ + "..\..\..\roadmap_screen.h"\ + "..\..\..\roadmap_serial.h"\ + "..\..\..\roadmap_spawn.h"\ + "..\..\..\roadmap_street.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ + + + !ENDIF + + # End Source File # End Group # Begin Group "Header Files" |
From: Ehud S. <esh...@us...> - 2006-08-09 07:40:31
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32/wince_env/Roadmap In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8541/Roadmap Modified Files: Roadmap.vcp Log Message: Update evc environment. Index: Roadmap.vcp =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/wince_env/Roadmap/Roadmap.vcp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Roadmap.vcp 23 Apr 2006 13:32:24 -0000 1.3 --- Roadmap.vcp 9 Aug 2006 07:39:54 -0000 1.4 *************** *** 198,202 **** LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM ! # ADD LINK32 commctrl.lib coredll.lib aygshell.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM !ELSEIF "$(CFG)" == "Roadmap - Win32 (WCE ARMV4) Release" --- 198,203 ---- LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM ! # ADD LINK32 commctrl.lib coredll.lib aygshell.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /map /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM /MAPINFO:lines ! # SUBTRACT LINK32 /pdb:none !ELSEIF "$(CFG)" == "Roadmap - Win32 (WCE ARMV4) Release" *************** *** 231,235 **** LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM ! # ADD LINK32 commctrl.lib coredll.lib aygshell.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM !ELSEIF "$(CFG)" == "Roadmap - Win32 (WCE ARMV4) Profiler" --- 232,237 ---- LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM ! # ADD LINK32 commctrl.lib coredll.lib aygshell.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /map /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM /MAPINFO:lines ! # SUBTRACT LINK32 /pdb:none !ELSEIF "$(CFG)" == "Roadmap - Win32 (WCE ARMV4) Profiler" *************** *** 284,287 **** --- 286,371 ---- # Begin Source File + SOURCE=..\..\CEDevice.cpp + + !IF "$(CFG)" == "Roadmap - Win32 (WCE ARM) Release" + + !ELSEIF "$(CFG)" == "Roadmap - Win32 (WCE ARM) Debug" + + !ELSEIF "$(CFG)" == "Roadmap - Win32 (WCE x86) Release" + + DEP_CPP_CEDEV=\ + "..\..\CEDevice.h"\ + + + !ELSEIF "$(CFG)" == "Roadmap - Win32 (WCE x86) Debug" + + DEP_CPP_CEDEV=\ + "..\..\CEDevice.h"\ + + + !ELSEIF "$(CFG)" == "Roadmap - Win32 (WCE ARMV4) Debug" + + DEP_CPP_CEDEV=\ + "..\..\CEDevice.h"\ + + + !ELSEIF "$(CFG)" == "Roadmap - Win32 (WCE ARMV4) Release" + + DEP_CPP_CEDEV=\ + "..\..\CEDevice.h"\ + + + !ELSEIF "$(CFG)" == "Roadmap - Win32 (WCE ARMV4) Profiler" + + DEP_CPP_CEDEV=\ + "..\..\CEDevice.h"\ + + + !ENDIF + + # End Source File + # Begin Source File + + SOURCE=..\..\CEException.cpp + + !IF "$(CFG)" == "Roadmap - Win32 (WCE ARM) Release" + + !ELSEIF "$(CFG)" == "Roadmap - Win32 (WCE ARM) Debug" + + !ELSEIF "$(CFG)" == "Roadmap - Win32 (WCE x86) Release" + + DEP_CPP_CEEXC=\ + "..\..\CEException.h"\ + + + !ELSEIF "$(CFG)" == "Roadmap - Win32 (WCE x86) Debug" + + DEP_CPP_CEEXC=\ + "..\..\CEException.h"\ + + + !ELSEIF "$(CFG)" == "Roadmap - Win32 (WCE ARMV4) Debug" + + DEP_CPP_CEEXC=\ + "..\..\CEException.h"\ + + + !ELSEIF "$(CFG)" == "Roadmap - Win32 (WCE ARMV4) Release" + + DEP_CPP_CEEXC=\ + "..\..\CEException.h"\ + + + !ELSEIF "$(CFG)" == "Roadmap - Win32 (WCE ARMV4) Profiler" + + DEP_CPP_CEEXC=\ + "..\..\CEException.h"\ + + + !ENDIF + + # End Source File + # Begin Source File + SOURCE=..\..\roadmap_main.cpp *************** *** 389,412 **** --- 473,508 ---- DEP_CPP_ROADM=\ + "..\..\..\editor\editor_main.h"\ + "..\..\..\editor\export\editor_sync.h"\ "..\..\..\roadmap.h"\ "..\..\..\roadmap_canvas.h"\ "..\..\..\roadmap_config.h"\ + "..\..\..\roadmap_download.h"\ + "..\..\..\roadmap_factory.h"\ "..\..\..\roadmap_file.h"\ "..\..\..\roadmap_gui.h"\ "..\..\..\roadmap_history.h"\ "..\..\..\roadmap_io.h"\ + "..\..\..\roadmap_lang.h"\ "..\..\..\roadmap_list.h"\ "..\..\..\roadmap_main.h"\ + "..\..\..\roadmap_messagebox.h"\ "..\..\..\roadmap_net.h"\ "..\..\..\roadmap_path.h"\ + "..\..\..\roadmap_screen.h"\ "..\..\..\roadmap_serial.h"\ + "..\..\..\roadmap_sound.h"\ "..\..\..\roadmap_spawn.h"\ "..\..\..\roadmap_start.h"\ "..\..\..\roadmap_types.h"\ + "..\..\CEDevice.h"\ + "..\..\CEException.h"\ "..\..\roadmap_win32.h"\ "..\..\roadmap_wincecanvas.h"\ "..\..\win32_serial.h"\ "..\..\wince_input_mon.h"\ + "C:\Program Files\Windows CE Tools\Common\Platman\sdk\wce500\include\cecap.h"\ {$(INCLUDE)}"aygshell.h"\ + {$(INCLUDE)}"notify.h"\ {$(INCLUDE)}"sipapi.h"\ {$(INCLUDE)}"winuserm.h"\ *************** *** 419,437 **** --- 515,543 ---- DEP_CPP_ROADM=\ + "..\..\..\editor\editor_main.h"\ + "..\..\..\editor\export\editor_sync.h"\ "..\..\..\roadmap.h"\ "..\..\..\roadmap_canvas.h"\ "..\..\..\roadmap_config.h"\ + "..\..\..\roadmap_download.h"\ + "..\..\..\roadmap_factory.h"\ "..\..\..\roadmap_file.h"\ "..\..\..\roadmap_gui.h"\ "..\..\..\roadmap_history.h"\ "..\..\..\roadmap_io.h"\ + "..\..\..\roadmap_lang.h"\ "..\..\..\roadmap_list.h"\ "..\..\..\roadmap_main.h"\ + "..\..\..\roadmap_messagebox.h"\ "..\..\..\roadmap_net.h"\ "..\..\..\roadmap_path.h"\ + "..\..\..\roadmap_screen.h"\ "..\..\..\roadmap_serial.h"\ + "..\..\..\roadmap_sound.h"\ "..\..\..\roadmap_spawn.h"\ "..\..\..\roadmap_start.h"\ "..\..\..\roadmap_types.h"\ + "..\..\CEDevice.h"\ + "..\..\CEException.h"\ "..\..\roadmap_win32.h"\ "..\..\roadmap_wincecanvas.h"\ *************** *** 440,443 **** --- 546,550 ---- "C:\Program Files\Windows CE Tools\Common\Platman\sdk\wce500\include\cecap.h"\ {$(INCLUDE)}"aygshell.h"\ + {$(INCLUDE)}"notify.h"\ {$(INCLUDE)}"sipapi.h"\ {$(INCLUDE)}"winuserm.h"\ *************** *** 470,478 **** "..\..\wince_input_mon.h"\ "C:\Program Files\Windows CE Tools\Common\Platman\sdk\wce500\include\cecap.h"\ - {$(INCLUDE)}"aygshell.h"\ - {$(INCLUDE)}"sipapi.h"\ - {$(INCLUDE)}"winuserm.h"\ NODEP_CPP_ROADM=\ "C:\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Include\ARMV4\vibrate.h"\ --- 577,585 ---- "..\..\wince_input_mon.h"\ "C:\Program Files\Windows CE Tools\Common\Platman\sdk\wce500\include\cecap.h"\ NODEP_CPP_ROADM=\ + ".\inuserm.h"\ + ".\ipapi.h"\ + ".\ygshell.h"\ "C:\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Include\ARMV4\vibrate.h"\ |
From: Ehud S. <esh...@us...> - 2006-08-09 07:40:22
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32/wince_env In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8541 Modified Files: Roadmap.vcw Log Message: Update evc environment. Index: Roadmap.vcw =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/wince_env/Roadmap.vcw,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Roadmap.vcw 16 Jul 2006 12:30:55 -0000 1.8 --- Roadmap.vcw 9 Aug 2006 07:39:54 -0000 1.9 *************** *** 251,254 **** --- 251,266 ---- ############################################################################### + Project: "rdmfriends"=.\rdmfriends\rdmfriends.vcp - Package Owner=<4> + + Package=<5> + {{{ + }}} + + Package=<4> + {{{ + }}} + + ############################################################################### + Project: "rdmghost"=.\rdmghost\rdmghost.vcp - Package Owner=<4> |
From: Ehud S. <esh...@us...> - 2006-08-09 07:40:15
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8499 Modified Files: roadmap_dialog.c Log Message: Dialogs can now contain a progress bar and an image. Fix fullscreen support. Open keyboard when required. Index: roadmap_dialog.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/roadmap_dialog.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** roadmap_dialog.c 27 Jul 2006 14:23:41 -0000 1.11 --- roadmap_dialog.c 9 Aug 2006 07:39:17 -0000 1.12 *************** *** 52,56 **** #define ROADMAP_WIDGET_LIST 4 #define ROADMAP_WIDGET_LABEL 5 ! #define ROADMAP_WIDGET_PASSWORD 6 const unsigned int MAX_ROW_HEIGHT = 20; --- 52,58 ---- #define ROADMAP_WIDGET_LIST 4 #define ROADMAP_WIDGET_LABEL 5 ! #define ROADMAP_WIDGET_PASSWORD 6 ! #define ROADMAP_WIDGET_PROGRESS 7 ! #define ROADMAP_WIDGET_IMAGE 8 const unsigned int MAX_ROW_HEIGHT = 20; *************** *** 109,113 **** RoadMapDialogSelection *choice; int num_choices; ! int data_is_string; }; --- 111,116 ---- RoadMapDialogSelection *choice; int num_choices; ! unsigned char data_is_string; ! unsigned char use_keyboard; }; *************** *** 158,162 **** child->choice = NULL; child->num_choices = 0; ! child->data_is_string = 0; if (parent != NULL) { --- 161,166 ---- child->choice = NULL; child->num_choices = 0; ! child->data_is_string = 0; ! child->use_keyboard = 0; if (parent != NULL) { *************** *** 192,197 **** static void roadmap_dialog_hide_window (RoadMapDialogItem dialog) { ! if (dialog->w != NULL) { ! ShowWindow(dialog->w, SW_HIDE); } } --- 196,208 ---- static void roadmap_dialog_hide_window (RoadMapDialogItem dialog) { ! if (dialog->w != NULL) { ! ! ShowWindow(dialog->w, SW_HIDE); ! ! #ifdef UNDER_CE ! if (dialog->use_keyboard) { ! SHSipPreference(dialog->w, SIP_DOWN); ! } ! #endif } } *************** *** 275,281 **** /* The dialog exists already: show it on top. */ ! RoadMapDialogCurrent = dialog; ! ! ShowWindow(dialog->w, SW_SHOW); return 0; /* Tell the caller the dialog already exists. */ --- 286,298 ---- /* The dialog exists already: show it on top. */ ! RoadMapDialogCurrent = dialog; ! ! ShowWindow(dialog->w, SW_SHOW); ! ! #ifdef UNDER_CE ! if (dialog->use_keyboard) { ! SHSipPreference(dialog->w, SIP_UP); ! } ! #endif return 0; /* Tell the caller the dialog already exists. */ *************** *** 289,293 **** void roadmap_dialog_hide (const char *name) { ! roadmap_dialog_hide_window (roadmap_dialog_get (NULL, name)); } --- 306,311 ---- void roadmap_dialog_hide (const char *name) { ! roadmap_dialog_hide_window (roadmap_dialog_get (NULL, name)); ! //roadmap_main_toggle_full_screen (); } *************** *** 310,313 **** --- 328,339 ---- } + + void roadmap_dialog_new_progress (const char *frame, const char *name) + { + RoadMapDialogItem child = roadmap_dialog_new_item (frame, name); + + child->widget_type = ROADMAP_WIDGET_PROGRESS; + } + void roadmap_dialog_new_label (const char *frame, const char *name) *************** *** 318,321 **** --- 344,355 ---- } + + void roadmap_dialog_new_image (const char *frame, const char *name) + { + RoadMapDialogItem child = roadmap_dialog_new_item (frame, name); + + child->widget_type = ROADMAP_WIDGET_IMAGE; + } + void roadmap_dialog_new_color (const char *frame, const char *name) *************** *** 460,464 **** { if (hWndDlg == NULL) return 0; ! if (uMsg == PSCB_INITIALIZED) { SetWindowLong (hWndDlg, GWL_STYLE, WS_CHILD | WS_VISIBLE); SetWindowLong (hWndDlg, GWL_EXSTYLE, --- 494,499 ---- { if (hWndDlg == NULL) return 0; ! if (uMsg == PSCB_INITIALIZED) { ! SetWindowLong (hWndDlg, GWL_STYLE, WS_CHILD | WS_VISIBLE); SetWindowLong (hWndDlg, GWL_EXSTYLE, *************** *** 520,525 **** if (count == 0) count = 1; psp = (PROPSHEETPAGE*) calloc(count, sizeof(*psp)); ! ! dialog->w = CreateDialogParam(g_hInst, (LPCWSTR)IDD_GENERIC, NULL, /*RoadMapMainWindow, FIXME*/ DialogFunc, (LPARAM)dialog); --- 555,562 ---- if (count == 0) count = 1; psp = (PROPSHEETPAGE*) calloc(count, sizeof(*psp)); ! ! dialog->use_keyboard = use_keyboard; ! ! dialog->w = CreateDialogParam(g_hInst, (LPCWSTR)IDD_GENERIC, GetActiveWindow(), /*RoadMapMainWindow, FIXME*/ DialogFunc, (LPARAM)dialog); *************** *** 571,581 **** ShowWindow(GetDlgItem(sheet, IDCANCEL), SW_HIDE); ! GetClientRect(dialog->w, &client); ! MoveWindow(sheet, client.top, client.left, client.bottom - client.top - MAX_ROW_HEIGHT, ! client.right - client.left + 1, TRUE); ! ! ShowWindow(dialog->w, SW_SHOW); ! free((void*)psh.pszCaption); for (i=0; i< count; i++) { --- 608,631 ---- ShowWindow(GetDlgItem(sheet, IDCANCEL), SW_HIDE); ! GetClientRect(dialog->w, &client); ! SetWindowPos(sheet, NULL, ! 0, 0, ! client.right - client.left, ! client.bottom - client.top - MAX_ROW_HEIGHT, ! SWP_NOZORDER); ! ! /* MoveWindow(sheet, client.top, client.left, client.bottom - client.top - MAX_ROW_HEIGHT, ! client.right - client.left, TRUE);*/ ! ! #ifdef UNDER_CE ! if (use_keyboard) { ! SHSipPreference(dialog->w, SIP_UP); ! //roadmap_main_toggle_full_screen (); ! } ! #endif ! ! ShowWindow(dialog->w, SW_SHOW); ! free((void*)psh.pszCaption); for (i=0; i< count; i++) { *************** *** 632,635 **** --- 682,700 ---- } + + void roadmap_dialog_set_progress (const char *frame, const char *name, + int progress) { + + RoadMapDialogItem this_frame; + RoadMapDialogItem this_item; + + + this_frame = roadmap_dialog_get (RoadMapDialogCurrent, frame); + this_item = roadmap_dialog_get (this_frame, name); + + if (this_item->widget_type != ROADMAP_WIDGET_PROGRESS) return; + + SendMessage(this_item->w, PBM_SETPOS, (WPARAM)progress, 0); + } void roadmap_dialog_set_data (const char *frame, const char *name, *************** *** 771,774 **** --- 836,861 ---- SetWindowLong(item->w, GWL_USERDATA, (LONG)item); break; + + case ROADMAP_WIDGET_PROGRESS: + + //dwStyle |= WS_BORDER|ES_AUTOHSCROLL; + + item->w = CreateWindowEx ( + 0, + PROGRESS_CLASS, // Class name + NULL, // Window name + dwStyle, // Window style + 0, // x-coordinate of the upper-left corner + 0, // y-coordinate of the upper-left corner + CW_USEDEFAULT, // The width of the tree-view control window + CW_USEDEFAULT, // The height of the tree-view control window + parent, // Window handle to the parent window + (HMENU) NULL, // The tree-view control identifier + g_hInst, // The instance handle + NULL); // Specify NULL for this parameter when you + + SetWindowLong(item->w, GWL_USERDATA, (LONG)item); + SendMessage(item->w, PBM_SETRANGE, 0, MAKELPARAM(0,100)); + break; case ROADMAP_WIDGET_CHOICE: *************** *** 823,827 **** 0, L"STATIC", // Class name ! name_unicode, // Window name dwStyle, // Window style 0, // x-coordinate of the upper-left corner --- 910,914 ---- 0, L"STATIC", // Class name ! name_unicode, // Window name dwStyle, // Window style 0, // x-coordinate of the upper-left corner *************** *** 837,841 **** 0, L"STATIC", // Class name ! NULL, // Window name dwStyle, // Window style 0, // x-coordinate of the upper-left corner --- 924,928 ---- 0, L"STATIC", // Class name ! NULL, // Window name dwStyle, // Window style 0, // x-coordinate of the upper-left corner *************** *** 848,851 **** --- 935,964 ---- NULL); // Specify NULL for this parameter when you break; + + case ROADMAP_WIDGET_IMAGE: + name_unicode = ConvertToWideChar(name, CP_UTF8); + item->w = CreateWindowEx ( + 0, + L"STATIC", // Class name + NULL, // Window name + dwStyle | SS_BITMAP, // Window style + 0, // x-coordinate of the upper-left corner + 0, // y-coordinate of the upper-left corner + CW_USEDEFAULT, // The width of the tree-view control window + CW_USEDEFAULT, // The height of the tree-view control window + parent, // Window handle to the parent window + (HMENU) NULL, // The tree-view control identifier + g_hInst, // The instance handle + NULL); // Specify NULL for this parameter when you + + #ifdef UNDER_CE + SendMessage(item->w, STM_SETIMAGE, (WPARAM)IMAGE_BITMAP, + (LPARAM)SHLoadDIBitmap(name_unicode)); + #else + SendMessage(item->w, STM_SETIMAGE, (WPARAM)IMAGE_BITMAP, + (LPARAM)LoadImage(NULL, name_unicode, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE)); + #endif + break; + case ROADMAP_WIDGET_BUTTON: *************** *** 925,929 **** case WM_INITDIALOG: { ! RoadMapDialogItem dialog; RoadMapDialogItem frame; int num_buttons; --- 1038,1042 ---- case WM_INITDIALOG: { ! RoadMapDialogItem dialog = (RoadMapDialogItem)lParam; RoadMapDialogItem frame; int num_buttons; *************** *** 931,937 **** SHINITDLGINFO shidi; ! shidi.dwMask = SHIDIM_FLAGS; ! shidi.dwFlags = SHIDIF_SIPDOWN | ! SHIDIF_SIZEDLGFULLSCREEN | SHIDIF_EMPTYMENU; shidi.hDlg = hDlg; SHInitDialog(&shidi); --- 1044,1055 ---- SHINITDLGINFO shidi; ! shidi.dwMask = SHIDIM_FLAGS; ! if (dialog->use_keyboard) { ! shidi.dwFlags = SHIDIF_FULLSCREENNOMENUBAR; ! } else { ! shidi.dwFlags = 0; ! } ! ! //SHIDIF_SIZEDLGFULLSCREEN | SHIDIF_EMPTYMENU; shidi.hDlg = hDlg; SHInitDialog(&shidi); *************** *** 944,948 **** #endif - dialog = (RoadMapDialogItem)lParam; SetWindowLong(hDlg, GWL_USERDATA, (LONG)dialog); --- 1062,1065 ---- *************** *** 954,961 **** num_buttons++; } ! } } #ifdef UNDER_CE ! return (INT_PTR)TRUE; #endif /* Fall through to resize the dialog */ --- 1071,1082 ---- num_buttons++; } ! } ! ! if (!dialog->use_keyboard) { ! SetWindowPos(hDlg, HWND_TOP, 10, 50, 220, 170, SWP_DRAWFRAME); ! } } #ifdef UNDER_CE ! return (INT_PTR)TRUE; #endif /* Fall through to resize the dialog */ *************** *** 965,974 **** GetWindowRect(hDlg, &rc); ! lParam = MAKELPARAM(rc.right-rc.left+1, rc.bottom-rc.top+1); } - - case WM_SIZE: { --- 1086,1093 ---- GetWindowRect(hDlg, &rc); ! lParam = MAKELPARAM(rc.right-rc.left, rc.bottom-rc.top); } case WM_SIZE: { *************** *** 1014,1018 **** } ! if (dialog == NULL) break; for (frame = dialog->children; frame != NULL; frame = frame->next) { if (frame->widget_type == ROADMAP_WIDGET_CONTAINER) { --- 1133,1138 ---- } ! if (dialog == NULL) break; ! /* for (frame = dialog->children; frame != NULL; frame = frame->next) { if (frame->widget_type == ROADMAP_WIDGET_CONTAINER) { *************** *** 1026,1030 **** } } ! } } break; --- 1146,1151 ---- } } ! } ! */ } break; *************** *** 1061,1072 **** PROPSHEETPAGE *psp; RoadMapDialogItem frame; #ifdef UNDER_CE SHINITDLGINFO sid; sid.dwMask = SHIDIM_FLAGS; /* This is the only allowed value. */ ! sid.dwFlags = SHIDIF_SIZEDLGFULLSCREEN; /* Make DB full screen. */ sid.hDlg = hDlg; ! SHInitDialog(&sid); #endif psp = (PROPSHEETPAGE*) lParam; --- 1182,1194 ---- PROPSHEETPAGE *psp; RoadMapDialogItem frame; + RECT rc; #ifdef UNDER_CE SHINITDLGINFO sid; sid.dwMask = SHIDIM_FLAGS; /* This is the only allowed value. */ ! sid.dwFlags = 0;//SHIDIF_SIZEDLGFULLSCREEN; /* Make DB full screen. */ sid.hDlg = hDlg; ! //SHInitDialog(&sid); #endif psp = (PROPSHEETPAGE*) lParam; *************** *** 1074,1078 **** frame->w = hDlg; SetWindowLong(hDlg, GWL_USERDATA, (LONG)frame); ! CreateControllers(hDlg, frame); } return (INT_PTR)TRUE; --- 1196,1219 ---- frame->w = hDlg; SetWindowLong(hDlg, GWL_USERDATA, (LONG)frame); ! CreateControllers(hDlg, frame); ! ! { ! HWND w1 = GetParent(hDlg); ! HWND w2 = GetParent(w1); ! w1 = w2; ! } ! ! GetWindowRect(GetParent(GetParent(hDlg)), &rc); ! ! /* SetWindowPos(hDlg, NULL, ! 0, 0, ! rc.right - rc.left, ! rc.bottom - rc.top, ! SWP_NOZORDER);*/ ! ! /* MoveWindow(hDlg, 0, 0, ! rc.right-rc.left+1, ! rc.bottom-rc.top+1, ! TRUE);*/ } return (INT_PTR)TRUE; *************** *** 1109,1116 **** case WM_SIZE: { ! HDC dc; int width = LOWORD(lParam); int height = HIWORD(lParam) - ! MAX_ROW_HEIGHT; /* save room for buttons */ RoadMapDialogItem item; RoadMapDialogItem frame = (RoadMapDialogItem)GetWindowLong(hDlg, GWL_USERDATA); --- 1250,1259 ---- case WM_SIZE: { ! HDC dc; ! RECT tab; int width = LOWORD(lParam); int height = HIWORD(lParam) - ! MAX_ROW_HEIGHT; /* save room for buttons */ ! RoadMapDialogItem item; RoadMapDialogItem frame = (RoadMapDialogItem)GetWindowLong(hDlg, GWL_USERDATA); *************** *** 1128,1131 **** --- 1271,1278 ---- if (frame == NULL) break; + + GetClientRect(GetParent(GetParent(hDlg)), &tab); + width = tab.right - tab.left; + height = tab.bottom - tab.top - MAX_ROW_HEIGHT; dc = GetDC(hDlg); *************** *** 1133,1142 **** LPWSTR name; SIZE text_size; ! if (item->widget_type == ROADMAP_WIDGET_CONTAINER) continue; ! if (item->widget_type == ROADMAP_WIDGET_LIST) num_entries += 4; ! else num_entries++; name = ConvertToWideChar(item->name, CP_UTF8); GetTextExtentPoint(dc, name, wcslen(name), &text_size); ! if (text_size.cx > max_name_len) max_name_len = text_size.cx; if (text_size.cy > max_name_height) max_name_height = text_size.cy; --- 1280,1295 ---- LPWSTR name; SIZE text_size; ! if (item->widget_type == ROADMAP_WIDGET_CONTAINER) continue; ! if (item->widget_type == ROADMAP_WIDGET_IMAGE) continue; ! ! if (item->widget_type == ROADMAP_WIDGET_LIST) { ! num_entries += 4; ! } else { ! num_entries++; ! } ! name = ConvertToWideChar(item->name, CP_UTF8); GetTextExtentPoint(dc, name, wcslen(name), &text_size); ! if ((text_size.cx < width/2) && text_size.cx > max_name_len) max_name_len = text_size.cx; if (text_size.cy > max_name_height) max_name_height = text_size.cy; *************** *** 1144,1149 **** } - ReleaseDC(hDlg, dc); - row_height = (int)(height / (num_entries + 1)); row_space = (int) (row_height / num_entries) - 1; --- 1297,1300 ---- *************** *** 1171,1176 **** if (item->widget_type == ROADMAP_WIDGET_CONTAINER) { continue; ! } ! if (item->widget_type == ROADMAP_WIDGET_LIST) { if (!roadmap_lang_rtl ()) { MoveWindow(label, --- 1322,1343 ---- if (item->widget_type == ROADMAP_WIDGET_CONTAINER) { continue; ! } ! ! if (item->widget_type == ROADMAP_WIDGET_IMAGE) { ! RECT rc; ! GetClientRect(item->w, &rc); ! SetWindowPos(item->w, NULL, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOZORDER); ! curr_y += rc.bottom; ! continue; ! } ! ! if (item->widget_type == ROADMAP_WIDGET_PROGRESS) { ! MoveWindow(widget, ! column_separator, curr_y, ! width - column_separator*2, ! row_height, TRUE); ! curr_y += row_height; ! ! } else if (item->widget_type == ROADMAP_WIDGET_LIST) { if (!roadmap_lang_rtl ()) { MoveWindow(label, *************** *** 1216,1231 **** widget_height, TRUE); } else { MoveWindow(label, ! width - column_edge_width - first_column_width, curr_y + label_y_add, ! first_column_width, row_height - label_y_add, TRUE); ! MoveWindow(widget, ! column_edge_width, ! curr_y, ! width - (column_edge_width*2 + ! first_column_width + column_separator), ! widget_height, TRUE); } } else { --- 1383,1415 ---- widget_height, TRUE); } else { + SIZE text_size; + LPWSTR name; + + name = ConvertToWideChar(item->name, CP_UTF8); + GetTextExtentPoint(dc, name, wcslen(name), &text_size); + free(name); + MoveWindow(label, ! width - column_edge_width - text_size.cx - 10, curr_y + label_y_add, ! text_size.cx + 10, row_height - label_y_add, TRUE); ! if (item->widget_type == ROADMAP_WIDGET_LABEL) { ! ! MoveWindow(widget, ! column_edge_width * 2, ! curr_y + label_y_add, ! width - (column_edge_width*2 + ! first_column_width + column_separator), ! row_height - label_y_add, TRUE); ! } else { ! MoveWindow(widget, ! column_edge_width, ! curr_y, ! width - (column_edge_width*2 + ! first_column_width + column_separator), ! widget_height, TRUE); ! } } } else { *************** *** 1236,1240 **** curr_y += row_height + row_space; } ! } } return TRUE; --- 1420,1426 ---- curr_y += row_height + row_space; } ! } ! ! ReleaseDC(hDlg, dc); } return TRUE; |
From: Ehud S. <esh...@us...> - 2006-08-09 07:40:12
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv8125 Modified Files: roadmap_canvas_agg.cpp Log Message: Add an interface to release an image. Index: roadmap_canvas_agg.cpp =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/roadmap_canvas_agg.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** roadmap_canvas_agg.cpp 16 Jul 2006 12:28:50 -0000 1.6 --- roadmap_canvas_agg.cpp 9 Aug 2006 07:38:38 -0000 1.7 *************** *** 270,271 **** --- 270,279 ---- return image; } + + + void roadmap_canvas_agg_free_image (RoadMapImage image) { + + free (image->rbuf.buf()); + delete image; + } + |
From: Ehud S. <esh...@us...> - 2006-08-09 07:38:04
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7732 Modified Files: install.inf Log Message: Update installation. Index: install.inf =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/install.inf,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** install.inf 17 Jul 2006 06:35:45 -0000 1.9 --- install.inf 9 Aug 2006 07:38:00 -0000 1.10 *************** *** 16,20 **** [DefaultInstall.ARM] ! CopyFiles = Files.Config, Files.Maps, Files.ARM, Files.Icons, Files.Dll [SourceDisksNames] --- 16,20 ---- [DefaultInstall.ARM] ! CopyFiles = Files.Config, Files.Maps, Files.ARM, Files.Icons, Files.Sound, Files.Dll [SourceDisksNames] *************** *** 24,27 **** --- 24,28 ---- 6 = ,"Manual",,L:\shared\roadmap_editor\manual 7 = ,"bmp icons",,L:\shared\roadmap_editor\src\icons\bmp + 10 = ,"sound",,L:\shared\roadmap_editor\src\sound [SourceDisksNames.ARM] *************** *** 40,43 **** --- 41,45 ---- sprites = 1 objects = 1 + lang = 1 font.ttf = 1 usc77001.rdm = 2 *************** *** 60,63 **** --- 62,66 ---- rm_zoomin.bmp = 7 rm_zoomout.bmp = 7 + rm_menu.bmp = 7 nav_approaching.bmp = 7 nav_continue.bmp = 7 *************** *** 69,72 **** --- 72,87 ---- nav_turn_right.bmp = 7 nav_u_turn.bmp = 7 + welcome.bmp = 7 + sync.bmp = 7 + 200.wav = 10 + 800.wav = 10 + Arrive.wav = 10 + KeepLeft.wav = 10 + KeepRight.wav = 10 + m.wav = 10 + Straight.wav = 10 + TurnLeft.wav = 10 + TurnRight.wav = 10 + within.wav = 10 [SourceDisksFiles.ARM] *************** *** 82,85 **** --- 97,101 ---- Files.ARM = 0,%InstallDir% Files.Icons = 0,%InstallDir%\icons + Files.Sound = 0,%InstallDir%\sound Files.Dll = 0,\Windows DefaultDestDir = 0,%InstallDir% *************** *** 97,100 **** --- 113,117 ---- sprites,,,0x00000010 objects,,,0x00000010 + lang,,,0x00000010 font.ttf,,,0x00000010 apt_toc.gif,,,0 *************** *** 117,120 **** --- 134,138 ---- rm_zoomin.bmp,,,0x00000010 rm_zoomout.bmp,,,0x00000010 + rm_menu.bmp,,,0x00000010 nav_approaching.bmp,,,0x00000010 nav_continue.bmp,,,0x00000010 *************** *** 126,129 **** --- 144,161 ---- nav_turn_right.bmp,,,0x00000010 nav_u_turn.bmp,,,0x00000010 + welcome.bmp,,,0x00000010 + sync.bmp,,,0x00000010 + + [Files.Sound] + 200.wav,,,0x00000010 + 800.wav,,,0x00000010 + Arrive.wav,,,0x00000010 + KeepLeft.wav,,,0x00000010 + KeepRight.wav,,,0x00000010 + m.wav,,,0x00000010 + Straight.wav,,,0x00000010 + TurnLeft.wav,,,0x00000010 + TurnRight.wav,,,0x00000010 + within.wav,,,0x00000010 [Files.Maps] |
From: Ehud S. <esh...@us...> - 2006-08-09 07:37:42
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7721 Modified Files: preferences Log Message: Update preferences file. Index: preferences =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/preferences,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** preferences 17 Jul 2006 06:36:11 -0000 1.8 --- preferences 9 Aug 2006 07:37:39 -0000 1.9 *************** *** 64,67 **** General.Toolbar: no Geometry.Main: 800x600 ! General.Keyboard: no General.Unit: metric --- 64,67 ---- General.Toolbar: no Geometry.Main: 800x600 ! General.Keyboard: yes General.Unit: metric |
From: Ehud S. <esh...@us...> - 2006-08-09 07:37:14
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7685 Modified Files: roadmap_messagebox.c Log Message: I18n Index: roadmap_messagebox.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/roadmap_messagebox.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** roadmap_messagebox.c 15 Oct 2005 22:19:11 -0000 1.1.1.1 --- roadmap_messagebox.c 9 Aug 2006 07:37:11 -0000 1.2 *************** *** 29,32 **** --- 29,33 ---- #include "../roadmap.h" #include "../roadmap_start.h" + #include "../roadmap_lang.h" #include "../roadmap_messagebox.h" *************** *** 36,46 **** #ifdef _UNICODE LPWSTR u_title, u_text; u_title = ConvertToWideChar(title, CP_UTF8); u_text = ConvertToWideChar(text, CP_UTF8); ! MessageBox(0, u_text, u_title, MB_OK); free(u_title); free(u_text); #else ! MessageBox(0, text, title, MB_OK); #endif } --- 37,51 ---- #ifdef _UNICODE LPWSTR u_title, u_text; + title = roadmap_lang_get (title); + text = roadmap_lang_get (text); u_title = ConvertToWideChar(title, CP_UTF8); u_text = ConvertToWideChar(text, CP_UTF8); ! MessageBox(GetActiveWindow(), u_text, u_title, MB_OK); free(u_title); free(u_text); #else ! title = roadmap_lang_get (title); ! text = roadmap_lang_get (text); ! MessageBox(GetActiveWindow(), text, title, MB_OK); #endif } |
From: Ehud S. <esh...@us...> - 2006-08-09 07:36:46
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7298 Modified Files: roadmap_sound.c Log Message: Add an interface to record voice. Index: roadmap_sound.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/roadmap_sound.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** roadmap_sound.c 27 Jul 2006 14:27:57 -0000 1.1 --- roadmap_sound.c 9 Aug 2006 07:36:42 -0000 1.2 *************** *** 30,33 **** --- 30,34 ---- #include "../roadmap.h" #include "../roadmap_path.h" + #include "../roadmap_file.h" #include "../roadmap_sound.h" *************** *** 36,43 **** static RoadMapSoundList sound_lists[MAX_LISTS]; static CRITICAL_SECTION SoundCriticalSection; ! static HANDLE SoundEvent; ! static HANDLE sound_thread; static int current_list = -1; DWORD WINAPI SoundThread (LPVOID lpParam) { --- 37,84 ---- static RoadMapSoundList sound_lists[MAX_LISTS]; static CRITICAL_SECTION SoundCriticalSection; ! static HANDLE SoundEvent; ! static HANDLE SoundRecEvent; ! static HANDLE sound_thread; ! static HANDLE sound_rec_thread; static int current_list = -1; + /* Recording stuff */ + static WAVEHDR WaveHeader; + static WAVEFORMATEX PCMfmt; + static HWAVEIN hWaveIn; + static char *RoadMapSoundRecName; + + struct WAVE_FORMAT + { + WORD wFormatTag; + WORD wChannels; + DWORD dwSamplesPerSec; + DWORD dwAvgBytesPerSec; + WORD wBlockAlign; + WORD wBitsPerSample; + }; + + struct RIFF_HEADER + { + CHAR szRiffID[4]; // 'R','I','F','F' + DWORD dwRiffSize; + CHAR szRiffFormat[4]; // 'W','A','V','E' + }; + + struct FMT_BLOCK + { + CHAR szFmtID[4]; // 'f','m','t',' ' + DWORD dwFmtSize; + struct WAVE_FORMAT wavFormat; + }; + + struct DATA_BLOCK + { + CHAR szDataID[4]; // 'd','a','t','a' + DWORD dwDataSize; + }; + + static int save_wav_file (void *data, unsigned int size); + DWORD WINAPI SoundThread (LPVOID lpParam) { *************** *** 47,51 **** int i; ! WaitForSingleObject(SoundEvent, INFINITE); while (1) { --- 88,94 ---- int i; ! if (WaitForSingleObject(SoundEvent, INFINITE) == WAIT_FAILED) { ! return 0; ! } while (1) { *************** *** 80,83 **** --- 123,151 ---- } + + DWORD WINAPI SoundRecThread (LPVOID lpParam) { + + while (1) { + + DWORD res; + + if (WaitForSingleObject(SoundRecEvent, INFINITE) == WAIT_FAILED) { + return 0; + } + + res = waveInUnprepareHeader(hWaveIn, &WaveHeader, sizeof(WAVEHDR)); + + res = save_wav_file (WaveHeader.lpData, WaveHeader.dwBytesRecorded); + + free(WaveHeader.lpData); + WaveHeader.lpData = NULL; + + res = waveInReset(hWaveIn); + res = waveInClose(hWaveIn); + roadmap_sound_play ("rec_end.wav"); + res = res; + } + } + int roadmap_sound_play (const char *file_name) { *************** *** 168,183 **** void roadmap_sound_initialize (void) { ! SoundEvent = CreateEvent (NULL, FALSE, FALSE, NULL); InitializeCriticalSection (&SoundCriticalSection); ! sound_thread = CreateThread(NULL, 0, SoundThread, NULL, 0, NULL); } void roadmap_sound_shutdown (void) { - CloseHandle (SoundEvent); - DeleteCriticalSection (&SoundCriticalSection); } --- 236,361 ---- void roadmap_sound_initialize (void) { ! SoundEvent = CreateEvent (NULL, FALSE, FALSE, NULL); ! SoundRecEvent = CreateEvent (NULL, FALSE, FALSE, NULL); InitializeCriticalSection (&SoundCriticalSection); ! sound_thread = CreateThread(NULL, 0, SoundThread, NULL, 0, NULL); ! ! /* Recording */ ! ! PCMfmt.cbSize=0; ! PCMfmt.wFormatTag=WAVE_FORMAT_PCM; ! PCMfmt.nChannels=1; ! PCMfmt.nSamplesPerSec=11025; ! PCMfmt.wBitsPerSample=8; ! PCMfmt.nBlockAlign=1; ! PCMfmt.nAvgBytesPerSec=11025; } void roadmap_sound_shutdown (void) { + + DWORD res; + + CloseHandle (SoundEvent); + if (SoundRecEvent) CloseHandle (SoundRecEvent); + DeleteCriticalSection (&SoundCriticalSection); + + if (hWaveIn != NULL) { + res = waveInReset(hWaveIn); + res = waveInClose(hWaveIn); + hWaveIn = NULL; + } } + /* Recording */ + static int allocate_rec_buffer(int seconds) { + + int length = PCMfmt.nSamplesPerSec*PCMfmt.nChannels* + PCMfmt.wBitsPerSample*seconds/8; + + void *buffer = malloc(length); + + if (!buffer) return -1; + + WaveHeader.lpData=buffer; + WaveHeader.dwBufferLength=length; + WaveHeader.dwBytesRecorded=0; + WaveHeader.dwUser=0; + WaveHeader.dwFlags=0; + WaveHeader.reserved=0; + WaveHeader.lpNext=0; + + return 0; + } + + + static int save_wav_file (void *data, unsigned int size) { + struct RIFF_HEADER rh = { {'R', 'I', 'F', 'F'}, + size - 8, + {'W', 'A', 'V', 'E'}}; + + struct FMT_BLOCK fb = { {'f', 'm', 't', ' '}, sizeof(struct WAVE_FORMAT), {0}}; + struct DATA_BLOCK db = { {'d', 'a', 't', 'a'}, size}; + + FILE *file; + + fb.wavFormat.wFormatTag = PCMfmt.wFormatTag; + fb.wavFormat.wChannels = PCMfmt.nChannels; + fb.wavFormat.dwSamplesPerSec = PCMfmt.nSamplesPerSec; + fb.wavFormat.dwAvgBytesPerSec = PCMfmt.nAvgBytesPerSec; + fb.wavFormat.wBlockAlign = PCMfmt.nBlockAlign; + fb.wavFormat.wBitsPerSample = PCMfmt.wBitsPerSample; + + file = roadmap_file_fopen (NULL, "\\test.wav", "w"); + if (!file) return -1; + + { + int test = sizeof(rh) + sizeof(fb) + sizeof(db); + test = test; + } + fwrite(&rh, sizeof(rh), 1, file); + fwrite(&fb, sizeof(fb), 1, file); + fwrite(&db, sizeof(db), 1, file); + + fwrite(data, size, 1, file); + + fclose (file); + + return 0; + } + + + int roadmap_sound_record (const char *file_name, int seconds) { + + DWORD res; + + if (hWaveIn != NULL) return -1; + + if (sound_rec_thread == NULL) { + sound_rec_thread = CreateThread(NULL, 0, SoundRecThread, NULL, 0, NULL); + } + + if (RoadMapSoundRecName != NULL) { + free(RoadMapSoundRecName); + } + RoadMapSoundRecName = strdup(file_name); + + res = waveInOpen(&hWaveIn, (UINT) WAVE_MAPPER, &PCMfmt, + (DWORD) SoundRecEvent, (DWORD) 0, CALLBACK_EVENT); + + res = allocate_rec_buffer (seconds); + + res = waveInPrepareHeader(hWaveIn, &WaveHeader, sizeof(WAVEHDR)); + + res = waveInAddBuffer(hWaveIn, &WaveHeader, sizeof(WAVEHDR)); + + roadmap_sound_play ("rec_start.wav"); + + res = waveInStart(hWaveIn); + + return 0; + } + |
From: Ehud S. <esh...@us...> - 2006-08-09 07:36:28
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7271 Modified Files: roadmap.rc Log Message: Update resource file. Index: roadmap.rc =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/roadmap.rc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap.rc 13 Jul 2006 06:48:17 -0000 1.2 --- roadmap.rc 9 Aug 2006 07:36:25 -0000 1.3 *************** *** 68,72 **** IDM_MENU, 1, I_IMAGENONE, IDM_MAIN_COMMAND1, TBSTATE_ENABLED, ! TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_HELP, 0, 0 END --- 68,72 ---- IDM_MENU, 1, I_IMAGENONE, IDM_MAIN_COMMAND1, TBSTATE_ENABLED, ! TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDS_HELP, 0, 0, END *************** *** 91,96 **** // ! IDD_GENERIC DIALOGEX 0, 0, 172, 187 ! STYLE WS_POPUP | WS_BORDER EXSTYLE 0x80000000L FONT 8, "System" --- 91,96 ---- // ! IDD_GENERIC DIALOGEX 0, 0, 174, 187 ! STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION EXSTYLE 0x80000000L FONT 8, "System" *************** *** 122,126 **** BEGIN LEFTMARGIN, 7 ! RIGHTMARGIN, 165 TOPMARGIN, 7 BOTTOMMARGIN, 180 --- 122,126 ---- BEGIN LEFTMARGIN, 7 ! RIGHTMARGIN, 167 TOPMARGIN, 7 BOTTOMMARGIN, 180 |
From: Ehud S. <esh...@us...> - 2006-08-09 07:35:59
|
Update of /cvsroot/roadmap/roadmap_editor/src/navigate In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6897 Modified Files: navigate_dglib.c navigate_graph.h navigate_main.h Log Message: Reload route data after synchronization. Index: navigate_main.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/navigate/navigate_main.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** navigate_main.h 11 Jun 2006 11:00:32 -0000 1.5 --- navigate_main.h 9 Aug 2006 07:35:56 -0000 1.6 *************** *** 46,50 **** RoadMapPosition from_pos; RoadMapPosition to_pos; ! RoadMapPosition shape_inital_pos; int first_shape; int last_shape; --- 46,50 ---- RoadMapPosition from_pos; RoadMapPosition to_pos; ! RoadMapPosition shape_initial_pos; int first_shape; int last_shape; *************** *** 59,62 **** --- 59,63 ---- int navigate_is_enabled (void); void navigate_main_initialize (void); + int navigate_main_reload_data (void); void navigate_main_set (int status); void navigate_main_calc_route (void); Index: navigate_graph.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/navigate/navigate_graph.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** navigate_graph.h 15 May 2006 19:52:15 -0000 1.2 --- navigate_graph.h 9 Aug 2006 07:35:56 -0000 1.3 *************** *** 28,32 **** #include "navigate_main.h" ! int navigate_load_data (void); int navigate_get_route_segments (PluginLine *from_line, --- 28,33 ---- #include "navigate_main.h" ! int navigate_reload_data (void); ! int navigate_load_data (void); int navigate_get_route_segments (PluginLine *from_line, Index: navigate_dglib.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/navigate/navigate_dglib.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** navigate_dglib.c 13 Jul 2006 06:40:04 -0000 1.4 --- navigate_dglib.c 9 Aug 2006 07:35:56 -0000 1.5 *************** *** 70,73 **** --- 70,84 ---- + int navigate_reload_data (void) { + + if (fips_data_loaded == 0) return 0; + + fips_data_loaded = 0; + dglRelease (& graph); + + return navigate_load_data (); + } + + int navigate_load_data (void) { FILE *fd; |
From: Ehud S. <esh...@us...> - 2006-08-09 07:35:23
|
Update of /cvsroot/roadmap/roadmap_editor/src/navigate In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6862 Modified Files: navigate_instr.c Log Message: Add a function to calculate the real distance of a point on a line. Index: navigate_instr.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/navigate/navigate_instr.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** navigate_instr.c 17 Jul 2006 06:34:27 -0000 1.4 --- navigate_instr.c 9 Aug 2006 07:35:19 -0000 1.5 *************** *** 69,78 **** last_shape = seg->first_shape; shape_pos = &end; ! *shape_pos = seg->shape_inital_pos; } else { last_shape = seg->last_shape; shape_pos = &start; ! *shape_pos = seg->shape_inital_pos; } --- 69,78 ---- last_shape = seg->first_shape; shape_pos = &end; ! *shape_pos = seg->shape_initial_pos; } else { last_shape = seg->last_shape; shape_pos = &start; ! *shape_pos = seg->shape_initial_pos; } *************** *** 160,164 **** segment->from_pos = seg_end_pos; ! segment->shape_inital_pos = seg_shape_initial; if ((seg_shape_end < 0) || (seg_shape_end > segment->last_shape)) { segment->first_shape = segment->last_shape = -1; --- 160,164 ---- segment->from_pos = seg_end_pos; ! segment->shape_initial_pos = seg_shape_initial; if ((seg_shape_end < 0) || (seg_shape_end > segment->last_shape)) { segment->first_shape = segment->last_shape = -1; *************** *** 371,431 **** int type) { ! RoadMapPosition from; ! RoadMapPosition to; ! RoadMapPosition intersection; ! int current_length = 0; ! int length_result = 0; ! int smallest_distance = 0x7fffffff; ! int distance; ! int i; ! ! if (segment->first_shape <= -1) { ! ! from = segment->from_pos; ! to = segment->to_pos; ! } else { ! ! from = segment->from_pos; ! to = segment->shape_inital_pos; ! ! for (i = segment->first_shape; i <= segment->last_shape; i++) { ! ! segment->shape_itr (i, &to); ! ! distance = ! roadmap_math_get_distance_from_segment ! (position, &from, &to, &intersection, NULL); ! ! if (distance < smallest_distance) { ! smallest_distance = distance; ! length_result = current_length + ! roadmap_math_distance (&from, &intersection); ! } ! ! current_length += roadmap_math_distance (&from, &to); ! from = to; ! } ! ! to = segment->to_pos; ! } ! ! distance = ! roadmap_math_get_distance_from_segment ! (position, &from, &to, &intersection, NULL); ! ! if (distance < smallest_distance) { ! ! length_result = current_length + ! roadmap_math_distance (&from, &intersection); ! } ! current_length += roadmap_math_distance (&from, &to); if (type == LINE_START) { ! return length_result; } else { ! return current_length - length_result; } } --- 371,386 ---- int type) { ! int total_length = 0; ! int result = 0; ! result = ! roadmap_plugin_calc_length (position, &segment->line, &total_length); if (type == LINE_START) { ! return result; } else { ! return total_length - result; } } *************** *** 450,454 **** &segments[i].shape_itr); ! segments[i].shape_inital_pos = segments[i].from_pos; roadmap_plugin_get_street (&segments[i].line, &segments[i].street); --- 405,409 ---- &segments[i].shape_itr); ! segments[i].shape_initial_pos = segments[i].from_pos; roadmap_plugin_get_street (&segments[i].line, &segments[i].street); |
From: Ehud S. <esh...@us...> - 2006-08-09 07:34:34
|
Update of /cvsroot/roadmap/roadmap_editor/src/navigate In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6464 Modified Files: navigate_main.c Log Message: I18n Index: navigate_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/navigate/navigate_main.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** navigate_main.c 27 Jul 2006 14:29:04 -0000 1.11 --- navigate_main.c 9 Aug 2006 07:34:30 -0000 1.12 *************** *** 50,53 **** --- 50,55 ---- #include "roadmap_point.h" #include "roadmap_layer.h" + #include "roadmap_adjust.h" + #include "roadmap_lang.h" #include "roadmap_sound.h" *************** *** 111,119 **** if (NavigateTrackFollowGPS) { ! RoadMapPosition pos; if (roadmap_navigate_get_current (&pos, &line, &direction) != -1) { ! NavigateSrcPos = pos; roadmap_line_points (line.line_id, &from_tmp, &to_tmp); --- 113,122 ---- if (NavigateTrackFollowGPS) { ! RoadMapGpsPosition pos; if (roadmap_navigate_get_current (&pos, &line, &direction) != -1) { ! roadmap_adjust_position (&pos, &NavigateSrcPos); ! roadmap_line_points (line.line_id, &from_tmp, &to_tmp); *************** *** 660,665 **** } ! snprintf(msg, sizeof(msg), "Length: %.1f km\nTime: %.1f minutes", ! length/1000.0, track_time/60.0); NavigateTrackEnabled = 1; --- 663,673 ---- } ! snprintf(msg, sizeof(msg), "%s: %.1f %s\n%s: %.1f %s", ! roadmap_lang_get ("Length"), ! length/1000.0, ! roadmap_lang_get ("km"), ! roadmap_lang_get ("Time"), ! track_time/60.0, ! roadmap_lang_get ("minutes")); NavigateTrackEnabled = 1; *************** *** 725,729 **** &segment->to_pos, 0, ! &segment->shape_inital_pos, segment->first_shape, segment->last_shape, --- 733,737 ---- &segment->to_pos, 0, ! &segment->shape_initial_pos, segment->first_shape, segment->last_shape, *************** *** 763,764 **** --- 771,777 ---- + int navigate_main_reload_data (void) { + + return navigate_reload_data (); + } + |