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...> - 2007-02-23 10:57:49
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13034 Modified Files: buildmap_postgres.c Log Message: Check for null in from_node and to_node. Index: buildmap_postgres.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_postgres.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** buildmap_postgres.c 7 Jan 2007 10:01:12 -0000 1.15 --- buildmap_postgres.c 23 Feb 2007 10:57:43 -0000 1.16 *************** *** 351,356 **** layer = pg2layer (atoi(PQgetvalue(db_result, irec, column++))); ! from_node_id = atoi(PQgetvalue(db_result, irec, column++)); ! to_node_id = atoi(PQgetvalue(db_result, irec, column++)); fedirp = --- 351,359 ---- layer = pg2layer (atoi(PQgetvalue(db_result, irec, column++))); ! from_node_id = atoi(PQgetvalue(db_result, irec, column)); ! if (PQgetisnull(db_result, irec, column++)) from_node_id = -1; ! ! to_node_id = atoi(PQgetvalue(db_result, irec, column)); ! if (PQgetisnull(db_result, irec, column++)) to_node_id = -1; fedirp = |
From: Ehud S. <esh...@us...> - 2007-02-16 10:35:24
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9896 Modified Files: Tag: BR-J2ME roadmap_math.c Log Message: Remove unused code. Index: roadmap_math.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_math.c,v retrieving revision 1.13.2.1 retrieving revision 1.13.2.2 diff -C2 -d -r1.13.2.1 -r1.13.2.2 *** roadmap_math.c 9 Feb 2007 17:29:13 -0000 1.13.2.1 --- roadmap_math.c 16 Feb 2007 10:35:20 -0000 1.13.2.2 *************** *** 1128,1140 **** RoadMapGuiPoint *point) { - int scale = 1; - point->x = ((position->longitude - RoadMapContext.upright_screen.west) ! / (RoadMapContext.zoom_x / scale)); point->y = ((RoadMapContext.upright_screen.north - position->latitude) ! / (RoadMapContext.zoom_y / scale)); } --- 1128,1138 ---- RoadMapGuiPoint *point) { point->x = ((position->longitude - RoadMapContext.upright_screen.west) ! / RoadMapContext.zoom_x); point->y = ((RoadMapContext.upright_screen.north - position->latitude) ! / RoadMapContext.zoom_y); } |
From: Ehud S. <esh...@us...> - 2007-02-16 10:35:04
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9328 Modified Files: Tag: BR-J2ME roadmap_screen.c Log Message: Remove labels for now. Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_screen.c,v retrieving revision 1.25.2.1 retrieving revision 1.25.2.2 diff -C2 -d -r1.25.2.1 -r1.25.2.2 *** roadmap_screen.c 9 Feb 2007 17:29:13 -0000 1.25.2.1 --- roadmap_screen.c 16 Feb 2007 10:34:57 -0000 1.25.2.2 *************** *** 715,719 **** (&seg_middle, &loweredge, MATH_DIST_SQUARED)) ) { PluginLine l = {ROADMAP_PLUGIN_ID, line, cfcc, fips}; ! roadmap_label_add (&seg_middle, angle, total_length, &l); } --- 715,719 ---- (&seg_middle, &loweredge, MATH_DIST_SQUARED)) ) { PluginLine l = {ROADMAP_PLUGIN_ID, line, cfcc, fips}; ! //roadmap_label_add (&seg_middle, angle, total_length, &l); } *************** *** 822,826 **** (&seg_middle, &loweredge, MATH_DIST_SQUARED)) ) { PluginLine l = {ROADMAP_PLUGIN_ID, real_line, cfcc, fips}; ! roadmap_label_add (&seg_middle, angle, total_length, &l); } --- 822,826 ---- (&seg_middle, &loweredge, MATH_DIST_SQUARED)) ) { PluginLine l = {ROADMAP_PLUGIN_ID, real_line, cfcc, fips}; ! //roadmap_label_add (&seg_middle, angle, total_length, &l); } *************** *** 969,973 **** PluginLine l = {ROADMAP_PLUGIN_ID, real_line, cfcc, fips}; ! roadmap_label_add (&seg_middle, angle, total_length, &l); } --- 969,973 ---- PluginLine l = {ROADMAP_PLUGIN_ID, real_line, cfcc, fips}; ! //roadmap_label_add (&seg_middle, angle, total_length, &l); } |
From: Ehud S. <esh...@us...> - 2007-02-16 10:34:42
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9130 Modified Files: Tag: BR-J2ME buildmap_line.c buildmap_main.c buildmap_point.c buildmap_polygon.c Log Message: Fix byte summary. Index: buildmap_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_main.c,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** buildmap_main.c 3 Nov 2006 12:29:48 -0000 1.8 --- buildmap_main.c 16 Feb 2007 10:34:38 -0000 1.8.2.1 *************** *** 300,303 **** --- 300,304 ---- buildmap_dglib_summary (); buildmap_range_summary (); + buildmap_point_summary (); buildmap_shape_summary (); buildmap_turn_restrictions_summary (); Index: buildmap_line.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_line.c,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -C2 -d -r1.5.2.1 -r1.5.2.2 *** buildmap_line.c 9 Feb 2007 17:29:12 -0000 1.5.2.1 --- buildmap_line.c 16 Feb 2007 10:34:38 -0000 1.5.2.2 *************** *** 730,736 **** void buildmap_line_summary (void) { fprintf (stderr, ! "-- line table statistics: %d lines, %d crossing\n", ! LineCount, LineCrossingCount); } --- 730,745 ---- void buildmap_line_summary (void) { + int total_bytes = 0; + int square_count = buildmap_square_get_count(); + + total_bytes += LineCount * sizeof(RoadMapLine); + total_bytes += square_count * sizeof(RoadMapLineBySquare); + total_bytes += LineCrossingCount * sizeof(int); + total_bytes += square_count * sizeof(RoadMapLineBySquare); + total_bytes += LongLinesCount * sizeof(RoadMapLongLine); + fprintf (stderr, ! "-- line table statistics: %d lines, %d crossing, bytes %d\n", ! LineCount, LineCrossingCount, total_bytes); } Index: buildmap_point.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_point.c,v retrieving revision 1.4.4.1 retrieving revision 1.4.4.2 diff -C2 -d -r1.4.4.1 -r1.4.4.2 *** buildmap_point.c 9 Feb 2007 17:29:12 -0000 1.4.4.1 --- buildmap_point.c 16 Feb 2007 10:34:38 -0000 1.4.4.2 *************** *** 452,456 **** fprintf (stderr, "-- point table statistics: %d points, %d bytes used\n", ! PointCount, PointCount * sizeof(RoadMapPoint)); } --- 452,460 ---- fprintf (stderr, "-- point table statistics: %d points, %d bytes used\n", ! PointCount, PointCount * sizeof(RoadMapPoint) + ! PointCount * sizeof(int) + ! buildmap_square_get_count() * ! sizeof(RoadMapSortedList)); ! } Index: buildmap_polygon.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_polygon.c,v retrieving revision 1.2.4.1 retrieving revision 1.2.4.2 diff -C2 -d -r1.2.4.1 -r1.2.4.2 *** buildmap_polygon.c 9 Feb 2007 17:29:12 -0000 1.2.4.1 --- buildmap_polygon.c 16 Feb 2007 10:34:38 -0000 1.2.4.2 *************** *** 992,998 **** void buildmap_polygon_summary (void) { fprintf (stderr, ! "-- polygon table statistics: %d polygons, %d lines\n", ! PolygonCount, PolygonLineCount); } --- 992,1002 ---- void buildmap_polygon_summary (void) { + int total_bytes = 0; + total_bytes += PolygonCount * sizeof(RoadMapPolygon); + total_bytes += PolygonLineCount * sizeof(RoadMapPolygonPoint); + fprintf (stderr, ! "-- polygon table statistics: %d polygons, %d lines, bytes %d\n", ! PolygonCount, PolygonLineCount, total_bytes); } |
From: Ehud S. <esh...@us...> - 2007-02-16 10:32:58
|
Update of /cvsroot/roadmap/roadmap_editor/j2me/resources In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7962 Modified Files: Tag: BR-J2ME schema Log Message: Change primary roads declutter. Index: schema =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/j2me/resources/Attic/schema,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** schema 10 Feb 2007 16:07:56 -0000 1.1.2.1 --- schema 16 Feb 2007 10:32:55 -0000 1.1.2.2 *************** *** 12,16 **** Primary.Color: #000000 Primary.Color1: #ae0a34 ! Primary.Declutter: 2147483647 Primary.Delta1: -2 Primary.Thickness: 6 --- 12,16 ---- Primary.Color: #000000 Primary.Color1: #ae0a34 ! Primary.Declutter: 4000 Primary.Delta1: -2 Primary.Thickness: 6 |
From: Ehud S. <esh...@us...> - 2007-02-16 10:32:19
|
Update of /cvsroot/roadmap/roadmap_editor/j2me In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7898 Modified Files: Tag: BR-J2ME CibylConfig.java Log Message: Update Cibyl config. Index: CibylConfig.java =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/j2me/Attic/CibylConfig.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** CibylConfig.java 10 Feb 2007 16:09:36 -0000 1.1.2.1 --- CibylConfig.java 16 Feb 2007 10:32:13 -0000 1.1.2.2 *************** *** 6,12 **** class CibylConfig { ! /** Memory size - 0 means use default size (Runtime.freeMemory() / 1.4) */ public static int memorySize = 3500000; /** Stack size - 8KB by default */ public static int stackSize = 8192; --- 6,15 ---- class CibylConfig { ! /** Memory size - 0 means use default size (Runtime.freeMemory() * CibylConfig.cibylMemoryProportion) */ public static int memorySize = 3500000; + /** The proportion of memory allocated to Cibyl (0..1) */ + public static float cibylMemoryProportion = 0.7f; + /** Stack size - 8KB by default */ public static int stackSize = 8192; |
From: Ehud S. <esh...@us...> - 2007-02-10 16:09:42
|
Update of /cvsroot/roadmap/roadmap_editor/j2me In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15801 Added Files: Tag: BR-J2ME CibylConfig.java MANIFEST.MF Makefile roadmap.jad.templ Log Message: Import main Makefile. --- NEW FILE: MANIFEST.MF --- MIDlet-1: roadmap, ,Main MIDlet-Name: roadmap MIDlet-Vendor: Unknown MIDlet-Version: 1.0 MicroEdition-Configuration: CLDC-1.1 MicroEdition-Profile: MIDP-2.0 --- NEW FILE: Makefile --- ###################################################################### ## ## Copyright (C) 2005, Blekinge Institute of Technology ## ## Filename: Makefile ## Author: Simon Kagstrom <sk...@bt...> ## Description: Generic Makefile ## ## $Id: Makefile,v 1.1.2.1 2007/02/10 16:09:36 eshabtai Exp $ ## ###################################################################### SUBDIRS = c RESOURCES=res/program.data.bin res/preferences res/schema res/sprites res/objects res/objects_wide res/usdir.rdm res/usc77001.rdm TARGET =src/CompiledProgram.class roadmap.jar roadmap.jad all: include/ $(SUBDIRS) # This is actually not needed since we include Rules-j2me, but # we keep it here to show how new syscall sets are added. Further, # ansi is implicitly implied by j2me, so that can be removed as well CIBYL_SYSCALL_SETS ?= javax.microedition ansi resource_manager softfloat command_mgr gps_manager jmicropolygon CIBYL_GENERATE_JAVA_WRAPPERS_OPTS=-I include -S syscalls CIBYL_CLASSPATH = $(WTK_PATH)/lib/jsr082.jar EMULATOR_OPTIONS = -Xheapsize:10M include $(CIBYL_BASE)/build/Rules-j2me.mk src/CibylConfig.java: CibylConfig.java cp $< $@ include/: FORCE $(CIBYL_BASE)/tools/cibyl-generate-c-header -o $@ syscalls/ command_mgr gps_manager FORCE: --- NEW FILE: roadmap.jad.templ --- MIDlet-1: roadmap, ,Main MIDlet-Jar-URL: roadmap.jar MIDlet-Name: roadmap MIDlet-Vendor: Unknown MIDlet-Version: 1.0 MicroEdition-Configuration: CLDC-1.1 MicroEdition-Profile: MIDP-2.0 --- NEW FILE: CibylConfig.java --- /** * Configuration for the Cibyl application. If you want to edit these * settings, copy it to your application directory, edit it and * install it into src/ when compiling your application. */ class CibylConfig { /** Memory size - 0 means use default size (Runtime.freeMemory() / 1.4) */ public static int memorySize = 3500000; /** Stack size - 8KB by default */ public static int stackSize = 8192; } |
Update of /cvsroot/roadmap/roadmap_editor/j2me/resources In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14965 Added Files: Tag: BR-J2ME objects objects_wide preferences schema sprites usc77001.rdm usdir.rdm Log Message: Import configuration files and a map file (of Israel). --- NEW FILE: preferences --- Style.Use Pretty Lines: yes Shapes.Declutter: 1300 Polygons.Declutter: 1300 Location.Color: red Highlight.Thickness: 4 Highlight.Duration: 10 Highlight.Background: yellow Help.Browser: \windows\iexplore Help.Arguments: %s GPS.Foreground: black GPS.Color: red GPS.Background: LightYellow Destination.Color: red Drivers.Trace: Disabled Drivers.Kismet: Disabled Drivers.Friends: Disabled Drivers.Ghost2: Disabled Drivers.Ghost1: Disabled Drivers.Port: 2007 Map.GPS map offset longitude: 0 Map.GPS map offset latitude: 0 History.Depth: 100 GPS.Timeout: 10 GPS.Baud Rate: 4800 GPS.Source: com1: Accuracy.GPS Position: 30 Accuracy.GPS Speed: 4 Voice.Selected Street: flite -t 'Selected %T' Voice.Next Intersection: flite -t 'Next intersection: %T' Voice.Current Street: Voice.Approach: flite -t 'Approaching %T' Error.Foreground: white Error.Background: red Info.Foreground: black Info.Background: yellow Selected Street.Foreground: black Selected Street.Background: yellow Selected Street.Text: %F Approach.Foreground: white Approach.Background: DarkSeaGreen4 Approach.Text: ××ª×§×¨× ×-%N, %C|××ª×§×¨× ×- %N Current Street.Foreground: white Current Street.Background: DarkSeaGreen4 Current Street.Text: %N, %C|%N Console.Foreground: black Console.Background: yellow Display.Top Right: ETA: %A|%T Display.Bottom Left: %S Display.Bottom Right: %D (%W)|%D Display.Duration: 10 Accuracy.Confidence: 250 Accuracy.Street: 35 Style.Show Objects when Dragging: yes Style.Pretty Lines when Dragging: yes Map.Refresh: normal Map.Signs: yes Accuracy.Mouse: 20 Display.Rotate: yes General.Default Zoom: 20 Map.Cache: 8 General.Icons: yes General.Toolbar: no Geometry.Main: 800x600 General.Keyboard: no General.Unit: metric --- NEW FILE: usdir.rdm --- (This appears to be a binary file; contents omitted.) --- NEW FILE: objects --- N Compass E Compass E Compass_fixed P 20 20 S orientation_mode B -20 -16 20 16 A toggleorientation N zoom1_button I rm_zoom1 P -26 -135 O 160 A zoom1 B -4 -4 28 28 S zoom_reset N zoomin_button I rm_zoomin P -26 -100 O 160 A zoomin B -4 -4 28 28 N zoomout_button I rm_zoomout P -26 -65 O 160 A zoomout B -4 -4 28 28 N gps_button I rm_gps P -26 -30 O 160 A gps B -4 -4 28 28 S GPS_focus N quit_button I rm_quit P -20 1 A quit B -4 -4 20 20 N full_screen I rm_full P -20 25 A full B -4 -4 20 20 N view_button I rm_3d I rm_2d P 1 -30 O 160 A toggleview toggleskin B -4 -4 28 28 S view_mode N gps_reception E Reception_na E Reception_none E Reception_poor E Reception_good P 19 60 S GPS_reception R N menu_button I rm_menu P 1 100 O 160 A quickmenu B -4 -4 28 28 N new_roads I rm_new_roads X I rm_new_roads A togglenewroads S new_roads P -60 -30 O 200 B -4 -4 28 28 R --- NEW FILE: usc77001.rdm --- (This appears to be a binary file; contents omitted.) --- NEW FILE: sprites --- # Syntax of the sprite description: # S <name>: start a sprite. # F <color> <thickness>: start a new color plane. # L <x>,<y> ...: defines a line. # P <x>,<y> ...: defines a (filled) polygon. # C <x>,<y> <radius>: defines a circle. # D <x>,<y> <radius>: defines a disk (i.e. a filled circle). # the coordinates x and y are relative to the sprite's hot point. # S GPS F #ffffff 2 L 0,-7 7,8 0,4 -7,8 0,-7 F #0000ff 1 P 0,-6 6,7 0,3 -6,7 L 9,7 0,-9 -9,7 S Friend F #ffffff 2 L 0,0 7,14 0,8 -7,14 F #006400 2 L 0,1 6,13 0,10 -6,13 0,1 S Position F #ffffff 3 L 0,-10 0,-20 L 0,10 0,20 L 10,0 20,0 L -10,0 -20,0 C 0,0 15 F #000000 1 L 0,-10 0,-20 L 0,10 0,20 L 10,0 20,0 L -10,0 -20,0 C 0,0 15 S Direction F #ff0000 1 P -5,-20 0,-35 5,-20 F #000000 1 L -5,-20 0,-35 5,-20 -5,-20 S Destination F #ff0000 1 D 0,0 5 F #000000 1 C 0,0 5 S Waypoint F #00ff00 1 D 0,0 5 F #000000 1 C 0,0 5 S Selection F #0000ff 1 D 0,0 5 F #000000 1 C 0,0 5 S Highlight F #adff2f 1 D 0,0 5 F #000000 1 C 0,0 5 S Compass F #ffffff 1 D 0,0 13 F #000000 1 C 0,0 13 F #ff0000 1 P -4,0 0,-13 4,0 F #000000 1 L -4,0 0,-13 4,0 L -4,0 0,13 4,0 L -17,0 -7,0 L 7,0 17,0 L 0,-13 0,-17 L 0,13 0,17 S Compass_fixed F #ff0000 1 P -9,13 0,8 9,13 0,-13 F #000000 2 L 0,8 9,13 0,-13 L 0,8 -9,13 0,-13 S Compass_north F #ffffff 1 P -16,16 16,16 16,-16 -16,-16 F #000000 2 L -16,16 16,16 16,-16 -16,-16 -16,16 F #ff0000 1 P -9,13 0,8 9,13 0,-13 F #000000 1 L 0,8 9,13 0,-13 L 0,8 -9,13 0,-13 S Download F #ffffff 1 D 0,0 8 F #ff0000 3 C 0,0 8 P -7,-6 -15,4 1,4 P 7,6 15,-4 -1,-4 S Kismet F #ff0000 1 D 0,0 10 # GPS Indication symbols: S Reception_na F #ffffff 1 D 0,0 15 F #000000 1 C 0,0 15 F #ffffff 1 P -10,-5 -3,-12 0,-5 -2,-3 P 5,0 12,3 5,10 2,3 P 5,-10 10,-5 0,5 -5,0 F #000000 1 L -10,-5 -3,-12 0,-5 -2,-3 -10,-5 L 5,0 12,3 5,10 2,3 5,0 L 5,-10 10,-5 0,5 -5,0 5,-10 L -7,1 -6,3 -3,6 -1,7 L -10,1 -9,3 -3,9 -1,10 L -13,1 -12,3 -3,12 -1,13 F #8b0000 2 L -9,-9 9,9 L 9,-9 -9,9 S reception_none F #ffffff 1 D 0,0 15 F #000000 1 C 0,0 15 F #ff0000 1 P -10,-5 -3,-12 0,-5 -2,-3 P 5,0 12,3 5,10 2,3 P 5,-10 10,-5 0,5 -5,0 F #000000 1 L -10,-5 -3,-12 0,-5 -2,-3 -10,-5 L 5,0 12,3 5,10 2,3 5,0 L 5,-10 10,-5 0,5 -5,0 5,-10 L -7,1 -6,3 -3,6 -1,7 L -10,1 -9,3 -3,9 -1,10 L -13,1 -12,3 -3,12 -1,13 S reception_poor F #ffffff 1 D 0,0 15 F #000000 1 C 0,0 15 F #adff2f 1 P -10,-5 -3,-12 0,-5 -2,-3 P 5,0 12,3 5,10 2,3 P 5,-10 10,-5 0,5 -5,0 F #000000 1 L -10,-5 -3,-12 0,-5 -2,-3 -10,-5 L 5,0 12,3 5,10 2,3 5,0 L 5,-10 10,-5 0,5 -5,0 5,-10 L -7,1 -6,3 -3,6 -1,7 L -10,1 -9,3 -3,9 -1,10 L -13,1 -12,3 -3,12 -1,13 S reception_good F #00ff00 1 D 0,0 15 F #000000 1 C 0,0 15 F #ffffff 1 P 10,-5 3,-12 0,-5 2,-3 P -5,0 -12,3 -5,10 -2,3 P -5,-10 -10,-5 0,5 5,0 F #000000 1 L 10,-5 3,-12 0,-5 2,-3 10,-5 L -5,0 -12,3 -5,10 -2,3 -5,0 L -5,-10 -10,-5 0,5 5,0 -5,-10 L 7,1 6,3 3,6 1,7 L 10,1 9,3 3,9 1,10 L 13,1 12,3 3,12 1,13 S Marker F #0000ff 1 D 0,0 5 F #000000 1 C 0,0 6 F #adff2f 1 P -3,1 0,-6 3,1 S X F #8b0000 4 L 4,4 20,20 L 20,4 4,20 --- NEW FILE: objects_wide --- N Compass E Compass E Compass_fixed P 20 20 S orientation_mode B -20 -16 20 16 A toggleorientation N zoom1_button I rm_zoom1 P -26 -135 O 160 A zoom1 B -4 -4 28 28 S zoom_reset N zoomin_button I rm_zoomin P -26 -100 O 160 A zoomin B -4 -4 28 28 N zoomout_button I rm_zoomout P -26 -65 O 160 A zoomout B -4 -4 28 28 N gps_button I rm_gps P -26 -30 O 160 A gps B -4 -4 28 28 S GPS_focus N quit_button I rm_quit P -20 1 A quit B -4 -4 20 20 N full_screen I rm_full P -20 25 A full B -4 -4 20 20 N view_button I rm_3d I rm_2d P 1 -30 O 160 A toggleview toggleskin B -4 -4 28 28 S view_mode N gps_reception E Reception_na E Reception_none E Reception_poor E Reception_good P 19 60 S GPS_reception R N menu_button I rm_menu P 1 100 O 160 A quickmenu B -4 -4 28 28 N new_roads I rm_new_roads X I rm_new_roads A togglenewroads S new_roads P -60 -30 O 200 B -4 -4 28 28 R --- NEW FILE: schema --- Map.Background: #ffffcc Labels.Color: #000000 Console.Foreground: #000000 Freeways.Class: Road Freeways.Color: #000000 Freeways.Color1: #414182 Freeways.Declutter: 2147483647 Freeways.Delta1: -2 Freeways.Thickness: 6 Primary.Class: Road Primary.Color: #000000 Primary.Color1: #ae0a34 Primary.Declutter: 2147483647 Primary.Delta1: -2 Primary.Thickness: 6 Secondary.Class: Road Secondary.Color: #000000 Secondary.Color1: #22632b Secondary.Declutter: 1500 Secondary.Delta1: -2 Secondary.Thickness: 5 Ramps.Class: Road Ramps.Color: #000000 Ramps.Color1: #1e7546 Ramps.Declutter: 160 Ramps.Delta1: -2 Ramps.Thickness: 3 Highways.Class: Road Highways.Color: #000000 Highways.Color1: #FDBF6F Highways.Declutter: 350 Highways.Delta1: -2 Highways.Thickness: 3 Exit.Class: Road Exit.Color: #000000 Exit.Color1: #FDBF6F Exit.Declutter: 350 Exit.Delta1: -2 Exit.Thickness: 3 Streets.Class: Road Streets.Color: #000000 Streets.Color1: #ffffff Streets.Declutter: 100 Streets.Delta1: -2 Streets.Thickness: 2 Pedestrian.Class: Road Pedestrian.Color: 0xa9a9a9 Pedestrian.Declutter: 160 Pedestrian.Delta1: 0 Pedestrian.Thickness: 1 4X4 Trails.Class: Road 4X4 Trails.Color: 0xa9a9a9 4X4 Trails.Declutter: 160 4X4 Trails.Delta1: 0 4X4 Trails.Thickness: 1 Trails.Class: Road Trails.Color: 0xa9a9a9 Trails.Declutter: 160 Trails.Delta1: 0 Trails.Thickness: 1 Walkway.Class: Road Walkway.Color: 0xa9a9a9 Walkway.Declutter: 160 Walkway.Delta1: 0 Walkway.Thickness: 1 Airports.Class: Area Airports.Color: #bebebe Airports.Declutter: 4096 Airports.Delta1: 0 Airports.Thickness: 1 Hospitals.Class: Area Hospitals.Color: #ff0000 Hospitals.Declutter: 4096 Hospitals.Delta1: 0 Hospitals.Thickness: 1 Lakes.Class: Area Lakes.Color: #add8e6 Lakes.Declutter: 1300 Lakes.Delta1: 0 Lakes.Thickness: 1 Malls.Class: Area Malls.Color: #ffff00 Malls.Declutter: 4096 Malls.Delta1: 0 Malls.Thickness: 1 Parks.Class: Area Parks.Color: #00ff00 Parks.Declutter: 4096 Parks.Delta1: 0 Parks.Thickness: 1 Rivers.Class: Feature Rivers.Color: #add8e6 Rivers.Declutter: 300 Rivers.Delta1: 0 Rivers.Thickness: 3 Sea.Class: Area Sea.Color: #6a5acd Sea.Declutter: 2147483647 Sea.Delta1: 0 Sea.Thickness: 1 Shore.Class: Feature Shore.Color: #8d70ff Shore.Declutter: 2147483647 Shore.Delta1: 0 Shore.Thickness: 2 Stations.Class: Area Stations.Color: #bebebe Stations.Declutter: 4096 Stations.Delta1: 0 Stations.Thickness: 1 |
From: Ehud S. <esh...@us...> - 2007-02-10 16:03:58
|
Update of /cvsroot/roadmap/roadmap_editor/j2me/c In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13434 Modified Files: Tag: BR-J2ME Makefile Log Message: Adjust for the new Cibyl version. Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/j2me/c/Attic/Makefile,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** Makefile 9 Feb 2007 17:29:09 -0000 1.1.2.1 --- Makefile 10 Feb 2007 16:03:55 -0000 1.1.2.2 *************** *** 62,73 **** ./roadmap_serial.o \ ./roadmap_main.o \ ! ./stubs.o \ ! # ../../src/roadmap_screen.o \ ! ../../src/roadmap_trip.o \ LDLIBS = -lc -lsoftfloat -lm ! CFLAGS = -I../../src -DJ2ME ! CIBYL_MIPS2JAVA_OPTS ?= include $(CIBYL_BASE)/build/Rules.mk --- 62,72 ---- ./roadmap_serial.o \ ./roadmap_main.o \ ! ./stubs.o LDLIBS = -lc -lsoftfloat -lm ! CFLAGS = -DJ2ME ! INCLUDES = -I../../src -I../include ! CIBYL_MIPS2JAVA_OPTS ?=-I../include include $(CIBYL_BASE)/build/Rules.mk |
From: Ehud S. <esh...@us...> - 2007-02-10 16:03:20
|
Update of /cvsroot/roadmap/roadmap_editor/j2me/syscalls/gps_manager In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13406/gps_manager Added Files: Tag: BR-J2ME depends imports init Log Message: Import RoadMap specific system calls. --- NEW FILE: imports --- --- NEW FILE: init --- --- NEW FILE: depends --- |
From: Ehud S. <esh...@us...> - 2007-02-10 16:02:13
|
Update of /cvsroot/roadmap/roadmap_editor/j2me/syscalls/gps_manager/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv12670/gps_manager/include Added Files: Tag: BR-J2ME gps_manager.h Log Message: Import RoadMap specific system calls. --- NEW FILE: gps_manager.h --- #ifndef __GPS_MANAGER_H__ #define __GPS_MANAGER_H__ #include <cibyl.h> #include <javax/microedition/midlet.h> /* GpsManager class (this is not in J2ME) */ typedef int NOPH_GpsManager_t; NOPH_GpsManager_t NOPH_GpsManager_getInstance(void); void NOPH_GpsManager_searchGps(NOPH_GpsManager_t gm, NOPH_MIDlet_t m); int NOPH_GpsManager_connect(NOPH_GpsManager_t gm, char* url); void NOPH_GpsManager_disconnect(NOPH_GpsManager_t gm); void NOPH_GpsManager_start(NOPH_GpsManager_t gm); void NOPH_GpsManager_stop(NOPH_GpsManager_t gm); int NOPH_GpsManager_read(NOPH_GpsManager_t gm, void* buffer, int size); #endif /* !__GPS_MANAGER_H__ */ |
From: Ehud S. <esh...@us...> - 2007-02-10 16:02:13
|
Update of /cvsroot/roadmap/roadmap_editor/j2me/syscalls/command_mgr/classes In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv12670/command_mgr/classes Added Files: Tag: BR-J2ME CommandMgr.java Log Message: Import RoadMap specific system calls. --- NEW FILE: CommandMgr.java --- import javax.microedition.midlet.*; import javax.microedition.lcdui.*; import javax.microedition.lcdui.game.*; import java.lang.*; import java.util.*; import java.io.*; public class CommandMgr implements CommandListener { private Hashtable commands = new Hashtable(); private int addr; private static CommandMgr instance; private CommandMgr() {} public static CommandMgr getInstance() { if (instance == null) { instance = new CommandMgr(); } return instance; } public void setResultMem(int addr) { this.addr = addr; } public void addCommand(String name, int callback) { GameCanvas gc = (GameCanvas)CRunTime.getRegisteredObject( Syscalls.NOPH_GameCanvas_get()); Command cmd = new Command(name, Command.SCREEN, 1); commands.put(cmd, new Integer(callback)); gc.addCommand(cmd); if (commands.size() == 1) { gc.setCommandListener(this); } } public void commandAction(Command cmd, Displayable d) { Integer callback = (Integer)commands.get(cmd); System.out.println("In commandAction: callback:" + callback + " addr:" + addr); if (callback != null) { CRunTime.memoryWriteWord(addr, callback.intValue()); } } } |
From: Ehud S. <esh...@us...> - 2007-02-10 16:02:12
|
Update of /cvsroot/roadmap/roadmap_editor/j2me/syscalls/command_mgr/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv12670/command_mgr/include Added Files: Tag: BR-J2ME command_mgr.h Log Message: Import RoadMap specific system calls. --- NEW FILE: command_mgr.h --- #ifndef __COMMAND_MGR_H__ #define __COMMAND_MGR_H__ #include <cibyl.h> /* CommandMgr class (this is not in J2ME) */ typedef int NOPH_CommandMgr_t; NOPH_CommandMgr_t NOPH_CommandMgr_getInstance(void); void NOPH_CommandMgr_addCommand(NOPH_CommandMgr_t cm, char* name, void* callback); void NOPH_CommandMgr_setResultMem(NOPH_CommandMgr_t cm, int* addr); #endif /* !__COMMAND_MGR_H__ */ |
From: Ehud S. <esh...@us...> - 2007-02-10 16:02:12
|
Update of /cvsroot/roadmap/roadmap_editor/j2me/syscalls/gps_manager/classes In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv12670/gps_manager/classes Added Files: Tag: BR-J2ME BLUElet.java GpsManager.java RemoteDeviceUI.java Log Message: Import RoadMap specific system calls. --- NEW FILE: GpsManager.java --- import javax.bluetooth.*; import javax.microedition.io.StreamConnection; import javax.microedition.io.Connector; import javax.microedition.lcdui.*; import javax.microedition.midlet.*; import javax.microedition.lcdui.game.*; import java.lang.*; import java.util.*; import java.io.*; public class GpsManager implements CommandListener, Runnable { private static final int MAX_GPS_INPUT = 100; private String url; private static GpsManager instance; private BLUElet bluelet = null; private MIDlet midlet; private Vector data = new Vector(); private GpsManager() {} private StreamConnection connection; private InputStream reader; private static final int LINE_DELIMITER = '\n'; private Thread runner; private boolean connection_err = false; public static GpsManager getInstance() { if (instance == null) { instance = new GpsManager(); } return instance; } public void searchGps(MIDlet m) { if (bluelet == null) { bluelet = new BLUElet(m, this); this.midlet = m; } bluelet.startApp(); GameCanvas gc = (GameCanvas)CRunTime.getRegisteredObject( Syscalls.NOPH_GameCanvas_get()); bluelet.startInquiry(DiscoveryAgent.GIAC, new UUID[] {new UUID(0x1101)}); Display.getDisplay(m).setCurrent(bluelet.getUI()); } public void commandAction(Command cmd, Displayable d) { if (cmd.equals(BLUElet.SELECTED)) { System.out.println("In BLUElet.SELECTED."); // handle event that user has selected a device for service discovery // in this example, we ignore it } else if (cmd.equals(BLUElet.BACK)) { // handle event that user has press Back button on Bluetooth Devices screen // usually, we switch back to host application screen bluelet.pauseApp(); GameCanvas gc = (GameCanvas)CRunTime.getRegisteredObject( Syscalls.NOPH_GameCanvas_get()); Display.getDisplay(midlet).setCurrent(gc); } else if (cmd.equals(BLUElet.COMPLETED)) { System.out.println("In BLUElet.COMPLETED."); // handle event that service discovery is completed // usually we pass control back to host MIDlet and connect // to remote service for perform network communication //Display.getDisplay(m).setCurrent(screen); ServiceRecord r = bluelet.getFirstDiscoveredService(); url = r.getConnectionURL(ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false); bluelet.pauseApp(); System.out.println("GPS URL:" + url); GameCanvas gc = (GameCanvas)CRunTime.getRegisteredObject( Syscalls.NOPH_GameCanvas_get()); Display.getDisplay(midlet).setCurrent(gc); } } public synchronized int connect(String url) { if (url.length() <= 1) url = this.url; if (url == null) return -1; try { connection = (StreamConnection) Connector.open(url, Connector.READ); reader = connection.openInputStream(); connection_err = false; return 0; } catch (Exception e) { System.out.println(e.getMessage()); connection = null; return -1; } } /** * Closes input stream and bluetooth connection as well as sets the * corresponding objects to null. */ public synchronized void disconnect() { System.out.println("GPSManager: In disconnect."); try { synchronized (data) { data.removeAllElements(); } if (reader != null) reader.close(); if (connection != null) connection.close(); } catch (Exception e) { // Ignore. } reader = null; connection_err = false; connection = null; System.out.println("GPSManager: After disconnect."); } /** * Reads in records sent by the GPS receiver. When a supported record has * been received pauses for specified amount of time. Continues on I/O * errors. */ public void run() { while (Thread.currentThread() == runner) { try { byte[] output = new byte[100]; int count = reader.read(output, 1, output.length-1); if (count == -1) { connection_err = true; return; } output[0] = (byte)count; synchronized(data) { if (data.size() >= MAX_GPS_INPUT) { data.removeElementAt(0); System.err.println("GPSManager: Data overflow."); } data.addElement(output); } } catch (IOException ie) { ie.printStackTrace(); connection_err = true; return; } } } /** * Starts receving of data (if not yet started). * */ public void start() { if (runner == null) { runner = new Thread(this); runner.start(); } } /** * Stops receiving of data and disconnects from bluetooth device. * */ public void stop() { runner = null; } public int read(int addr, int size) { if (connection == null) return -1; if (data.isEmpty()) { if (connection_err) { disconnect(); return -1; } return 0; } if (size == 0) return 1; byte[] bytes; synchronized(data) { bytes = (byte[]) data.firstElement(); data.removeElementAt(0); } int count = bytes[0] & 0xff; if (count > size) count = size; CRunTime.memcpy(addr, bytes, 1, count); return count; /* while (((addr & 0x3) != 0) && (size > 0)) { byte b = bytes[count++]; CRunTime.memoryWriteByte(addr, b); addr++; size--; if ((b == 0) || (size == 0)) return count; } while (size > 3) { int i = 0; for (int j=0; j<4; j++) { i = i << 8; byte b = bytes[count++]; size--; i |= b; if (b == 0) { i = i << 8*(3-j); CRunTime.memoryWriteWord(addr, i); return count; } } CRunTime.memoryWriteWord(addr, i); addr += 4; } while (size > 0) { byte b = bytes[count++]; CRunTime.memoryWriteByte(addr, b); addr++; size--; if (b == 0) break; } return count; */ } } --- NEW FILE: BLUElet.java --- import java.util.*; import javax.bluetooth.*; import javax.microedition.lcdui.*; import javax.microedition.midlet.*; /** * * <p>Title: Bluetooth Application Utility GUI Component</p> * <p>Description: * * Note: This class must be used as singleton. * </p> * @author Ben Hui (www.benhui.net) * @version 1.0 * * LICENSE: * This code is licensed under GPL. (See http://www.gnu.org/copyleft/gpl.html) */ public class BLUElet implements CommandListener { // Commands used in callback to idenfity BLUElet events. // COMPLETED - When both device and service discovery are completed. public static Command COMPLETED = new Command( "COMPLETED", Command.SCREEN, 1 ); // SELECTED - When user has selected a Bluetooth device for service search public static Command SELECTED = new Command( "SELECTED", Command.SCREEN, 1 ); // BACK - When user press Back button on Bluetooth Devices screen (RemoteDeviceUI) public static Command BACK = new Command( "Back", Command.BACK, 1 ); // your MIDlet reference public static MIDlet host; // your callback CommandListener public static CommandListener callback; // self instance of BLUEletUI public static BLUElet instance; // reference to GUI display public static Display display; public static Vector devices = new Vector(); public static Vector deviceClasses = new Vector(); public static Vector services = new Vector(); public static int selectedDevice = -1; // public static int selectedService = -1; // discovery mode in device inquiry public int discoveryMode; // list of UUID to match during service discovery public UUID[] serviceUUIDs = null; // Bluetooth return code from device inquiry operation // see DiscoveryListener public int deviceReturnCode; // Bluetooth return code from service discovery operation // see DiscoveryListener public int serviceReturnCode; private RemoteDeviceUI remotedeviceui = null; private LocalDevice device; private DiscoveryAgent agent; /** * Creae a new BLUElet. * @param host MIDlet * @param listener CommandListener */ public BLUElet(MIDlet host, CommandListener listener) { this.host = host; this.callback = listener; instance = this; } /** * Mirror MIDlet.startApp(), should be called by your MIDlet startApp(). */ public void startApp() { display = Display.getDisplay(host); remotedeviceui = new RemoteDeviceUI(); remotedeviceui.showui(); } /** * Mirror MIDlet.pauseApp(), should be called by your MIDlet pauseApp(). */ public void pauseApp() { // do nothing } /** * Mirror MIDlet.destroyApp(), should be called by your MIDlet destroyApp(). */ public void destroyApp(boolean unconditional) { } /** * Utility function to write log message. * @param s String */ public static void log(String s) { System.out.println(s); } /** * Obtain reference to device selection screen component. * You should show this screen when user invoke device search. * @return Screen */ public Screen getUI() { return remotedeviceui; } /** * Get all discovered services from selected remote device. * Your application call this method after your app receive COMPLETED callback * event. This will return all services that match your UUIDs in startInquiry(). * @return ServiceRecord[] */ public ServiceRecord[] getDiscoveredServices() { ServiceRecord[] r = new ServiceRecord[ services.size() ]; services.copyInto( r ); return r; } /** * Get the first discovered service from selected remote device. * Your application call this method after your app receives COMPLETED * callback event. This will return the first service that match your * UUIDs in startInquiry(). * * @return ServiceRecord null if no service discovered */ public ServiceRecord getFirstDiscoveredService() { if ( services.size() > 0 ) return (ServiceRecord) services.elementAt(0); else return null; } /** * Return the Bluetooth result code from device inquiry. * This is the result code obtained in DiscoveryListener.inquiryCompleted(). * Your application cal call this method after a COMPLETED callback event * is received. * @return int */ public int getDeviceDiscoveryReturnCode() { return deviceReturnCode; } /** * Return the Bluetooth result code from service discovery. * This is the result code obtained in DiscoveryListener.serviceSearchCompleted(). * Your application cal call this method after a COMPLETED callback event * is received. * @return int */ public int getServiceDiscoveryReturnCode() { return serviceReturnCode; } /** * Return user selected remote device that is used for service discovery. * Your application can call this after your app received SELECTED callback * event. * @return RemoteDevice null if user didn't select anything */ public RemoteDevice getSelectedDevice() { if ( selectedDevice != -1 ) return (RemoteDevice) devices.elementAt(selectedDevice); else return null; } /** * Start device inquiry. Your application call this method to start inquiry. * @param mode int one of DiscoveryAgent.GIAC or DiscoveryAgent.LIAC * @param serviceUUIDs UUID[] */ public void startInquiry( int mode, UUID[] serviceUUIDs ) { try { this.discoveryMode = mode; this.serviceUUIDs = serviceUUIDs; // clear previous values first devices.removeAllElements(); deviceClasses.removeAllElements(); // // initialize the JABWT stack device = LocalDevice.getLocalDevice(); // obtain reference to singleton device.setDiscoverable(DiscoveryAgent.GIAC); // set Discover Mode agent = device.getDiscoveryAgent(); // obtain reference to singleton boolean result = agent.startInquiry( mode, new Listener() ); // update screen with "Please Wait" message remotedeviceui.setMsg("[Please Wait...]"); } catch ( BluetoothStateException e ) { e.printStackTrace(); } } /** * * @param c Command * @param d Displayable */ public void commandAction(Command c, Displayable d) { if ( d == remotedeviceui && c.getLabel().equals("Search") ) { startInquiry( discoveryMode, serviceUUIDs ); } else if ( d == remotedeviceui && c.getLabel().equals("Back") ) { callback.commandAction( BACK, remotedeviceui); } else if ( d == remotedeviceui && c.getLabel().equals("Select") ) { // get selected device selectedDevice = remotedeviceui.getSelectedIndex(); RemoteDevice remoteDevice = (RemoteDevice) devices.elementAt( selectedDevice ); // remove all existing record first services.removeAllElements(); try { agent.searchServices(null, serviceUUIDs, remoteDevice, new Listener() ); // tell callback device selected display.callSerially(new Worker(ID_DEVICE_SELECTED)); } catch (BluetoothStateException ex) { ex.printStackTrace(); } } } /** * Bluetooth listener object. * Register this listener object to DiscoveryAgent in device inqury and service discovery. */ class Listener implements DiscoveryListener { public void deviceDiscovered(RemoteDevice remoteDevice, DeviceClass deviceClass) { log("A remote Bluetooth device is discovered:"); //Util.printRemoteDevice( remoteDevice, deviceClass ); devices.addElement( remoteDevice ); deviceClasses.addElement( deviceClass ); } public void inquiryCompleted(int complete) { log("device discovery is completed with return code:"+complete); log(""+devices.size()+" devices are discovered"); deviceReturnCode = complete; if ( devices.size() == 0 ) { Alert alert = new Alert( "Bluetooth", "No Bluetooth device found", null, AlertType.INFO ); alert.setTimeout(3000); remotedeviceui.showui(); display.setCurrent( alert, remotedeviceui ); } else { remotedeviceui.showui(); display.setCurrent( remotedeviceui ); } } public void servicesDiscovered(int transId, ServiceRecord[] records) { // note: we do not use transId because we only have one search at a time log("Remote Bluetooth services is discovered:"); for ( int i=0; i< records.length; i ++ ) { ServiceRecord record = records[i]; //Util.printServiceRecord( record ); services.addElement( record ); } } public void serviceSearchCompleted(int transId, int complete) { // note: we do not use transId because we only have one search at a time log("service discovery completed with return code:"+complete); log(""+services.size()+" services are discovered"); serviceReturnCode = complete; // we cannot callback in this thread because this is a Bluetooth // subsystem thread. we do not want to block it. display.callSerially( new Worker( ID_SERVICE_COMPLETED ) ); } } // Listener private final static int ID_SERVICE_COMPLETED = 1; private final static int ID_DEVICE_COMPLETED = 2; private final static int ID_DEVICE_SELECTED = 3; /** * Worker thread that invoke callback CommandListener upon Bluetooth event occurs. */ class Worker implements Runnable { int cmd = 0; public Worker( int cmd ) { this.cmd = cmd; } public void run() { switch (cmd) { case ID_SERVICE_COMPLETED: callback.commandAction( COMPLETED, remotedeviceui); break; case ID_DEVICE_COMPLETED: callback.commandAction( COMPLETED, remotedeviceui); break; case ID_DEVICE_SELECTED: callback.commandAction( SELECTED, remotedeviceui); break; default: break; } } } } --- NEW FILE: RemoteDeviceUI.java --- import javax.microedition.lcdui.*; import javax.bluetooth.*; /** * * <p>Title: Remote Device List Component</p> * <p>Description: This is a List screen to display a list of discovered Bluetooth * devices. This is a class used by BLUEletUI. * * </p> * @author Ben Hui (www.benhui.net) * @version 1.0 * * LICENSE: * This code is licensed under GPL. (See http://www.gnu.org/copyleft/gpl.html) */ class RemoteDeviceUI extends List { public RemoteDeviceUI() { super("Bluetooth devices", List.IMPLICIT); addCommand( new Command( "Select", Command.SCREEN, 1 ) ); addCommand( new Command( "Search", Command.SCREEN, 2 ) ); addCommand( BLUElet.BACK ); setCommandListener( BLUElet.instance ); } /** * Set a one-line message to screen. * @param str String */ public void setMsg( String str ) { super.deleteAll(); append( str, null ); } /** * refresh the list with blutooth devices */ public void showui() { super.deleteAll(); if (BLUElet.devices.size() > 0) { for (int i = 0; i < BLUElet.devices.size(); i++) { try { RemoteDevice device = (RemoteDevice) BLUElet.devices.elementAt(i); String name = device.getFriendlyName(false); append(name, null); } catch (Exception e) { e.printStackTrace(); } } } else { append("[No Device Found]", null); } } } |
From: Ehud S. <esh...@us...> - 2007-02-10 16:02:12
|
Update of /cvsroot/roadmap/roadmap_editor/j2me/syscalls/command_mgr In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv12670/command_mgr Added Files: Tag: BR-J2ME depends imports init Log Message: Import RoadMap specific system calls. --- NEW FILE: imports --- --- NEW FILE: init --- --- NEW FILE: depends --- |
From: Ehud S. <esh...@us...> - 2007-02-10 15:56:40
|
Update of /cvsroot/roadmap/roadmap_editor/j2me/syscalls/gps_manager/implementation In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10539/implementation Log Message: Directory /cvsroot/roadmap/roadmap_editor/j2me/syscalls/gps_manager/implementation added to the repository --> Using per-directory sticky tag `BR-J2ME' |
From: Ehud S. <esh...@us...> - 2007-02-10 15:56:40
|
Update of /cvsroot/roadmap/roadmap_editor/j2me/syscalls/gps_manager/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10539/include Log Message: Directory /cvsroot/roadmap/roadmap_editor/j2me/syscalls/gps_manager/include added to the repository --> Using per-directory sticky tag `BR-J2ME' |
From: Ehud S. <esh...@us...> - 2007-02-10 15:56:36
|
Update of /cvsroot/roadmap/roadmap_editor/j2me/syscalls/gps_manager/classes In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10539/classes Log Message: Directory /cvsroot/roadmap/roadmap_editor/j2me/syscalls/gps_manager/classes added to the repository --> Using per-directory sticky tag `BR-J2ME' |
From: Ehud S. <esh...@us...> - 2007-02-10 15:54:56
|
Update of /cvsroot/roadmap/roadmap_editor/j2me/syscalls/command_mgr/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9614/include Log Message: Directory /cvsroot/roadmap/roadmap_editor/j2me/syscalls/command_mgr/include added to the repository --> Using per-directory sticky tag `BR-J2ME' |
From: Ehud S. <esh...@us...> - 2007-02-10 15:54:56
|
Update of /cvsroot/roadmap/roadmap_editor/j2me/syscalls/command_mgr/implementation In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9614/implementation Log Message: Directory /cvsroot/roadmap/roadmap_editor/j2me/syscalls/command_mgr/implementation added to the repository --> Using per-directory sticky tag `BR-J2ME' |
From: Ehud S. <esh...@us...> - 2007-02-10 15:54:56
|
Update of /cvsroot/roadmap/roadmap_editor/j2me/syscalls/command_mgr/classes In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9614/classes Log Message: Directory /cvsroot/roadmap/roadmap_editor/j2me/syscalls/command_mgr/classes added to the repository --> Using per-directory sticky tag `BR-J2ME' |
From: Ehud S. <esh...@us...> - 2007-02-10 15:54:29
|
Update of /cvsroot/roadmap/roadmap_editor/j2me/syscalls/command_mgr In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9586/command_mgr Log Message: Directory /cvsroot/roadmap/roadmap_editor/j2me/syscalls/command_mgr added to the repository --> Using per-directory sticky tag `BR-J2ME' |
From: Ehud S. <esh...@us...> - 2007-02-10 15:54:29
|
Update of /cvsroot/roadmap/roadmap_editor/j2me/syscalls/gps_manager In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9586/gps_manager Log Message: Directory /cvsroot/roadmap/roadmap_editor/j2me/syscalls/gps_manager added to the repository --> Using per-directory sticky tag `BR-J2ME' |
From: Ehud S. <esh...@us...> - 2007-02-10 15:54:14
|
Update of /cvsroot/roadmap/roadmap_editor/j2me/syscalls In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9522/syscalls Log Message: Directory /cvsroot/roadmap/roadmap_editor/j2me/syscalls added to the repository --> Using per-directory sticky tag `BR-J2ME' |
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15814/src Modified Files: Tag: BR-J2ME buildmap.h buildmap_dbwrite.c buildmap_dictionary.c buildmap_line.c buildmap_line_route.c buildmap_line_speed.c buildmap_metadata.c buildmap_point.c buildmap_polygon.c buildmap_postgres.c buildmap_range.c buildmap_shape.c buildmap_square.c buildmap_street.c buildmap_turn_restrictions.c buildmap_zip.c buildus_county.c roadmap_config.c roadmap_dbread.c roadmap_dictionary.c roadmap_display.c roadmap_factory.c roadmap_gps.c roadmap_gui.h roadmap_hash.c roadmap_input.c roadmap_line_route.c roadmap_log.c roadmap_math.c roadmap_navigate.c roadmap_nmea.c roadmap_plugin.c roadmap_screen.c roadmap_screen_obj.c roadmap_sprite.c roadmap_start.c roadmap_trip.c Log Message: OK, who wants to run RoadMap on his J2ME phone? This is an import of the RoadMap j2ME branch. Index: buildmap_zip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_zip.c,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** buildmap_zip.c 28 Nov 2005 19:36:34 -0000 1.2 --- buildmap_zip.c 9 Feb 2007 17:29:12 -0000 1.2.4.1 *************** *** 193,196 **** --- 193,203 ---- db_zip[i] = ZipCode[i].zip_code; } + + if (switch_endian) { + int i; + for (i=0; i<ZipCodeCount; i++) { + switch_endian_int(db_zip + i); + } + } } Index: roadmap_display.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_display.c,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -C2 -d -r1.12 -r1.12.2.1 *** roadmap_display.c 7 Jan 2007 10:01:12 -0000 1.12 --- roadmap_display.c 9 Feb 2007 17:29:13 -0000 1.12.2.1 *************** *** 534,540 **** --- 534,542 ---- + #ifndef J2ME if (street_has_changed) { roadmap_voice_announce (sign->title); } + #endif if (message_has_changed) { Index: roadmap_nmea.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_nmea.c,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -C2 -d -r1.5 -r1.5.4.1 *** roadmap_nmea.c 14 Oct 2006 09:06:12 -0000 1.5 --- roadmap_nmea.c 9 Feb 2007 17:29:13 -0000 1.5.4.1 *************** *** 31,38 **** #include <stdlib.h> - #ifndef _WIN32 - #include <errno.h> - #endif - #include "roadmap.h" #include "roadmap_types.h" --- 31,34 ---- *************** *** 43,47 **** #define TIGER_COORDINATE_UNIT 1000000 - struct RoadMapNmeaAccountRecord { --- 39,42 ---- *************** *** 98,101 **** --- 93,99 ---- const char *ddmmyy) { + #ifdef J2ME + return 0; + #else static struct tm tm; *************** *** 141,144 **** --- 139,143 ---- return timegm(&tm); + #endif } Index: buildmap_dictionary.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_dictionary.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** buildmap_dictionary.c 7 Jan 2007 10:01:12 -0000 1.4 --- buildmap_dictionary.c 9 Feb 2007 17:29:12 -0000 1.4.2.1 *************** *** 460,463 **** --- 460,499 ---- + static void buildmap_dictionary_subtree_switch_endian + (struct roadmap_dictionary_tree *db_tree, + struct roadmap_dictionary_reference *db_reference, + int tree_index) { + + int index; + struct roadmap_dictionary_tree *tree = db_tree + tree_index; + + for (index = tree->first; + index < tree->first + tree->count; + index++) { + + switch (db_reference[index].type & 0x0f) { + + case ROADMAP_DICTIONARY_STRING: + break; + + case ROADMAP_DICTIONARY_TREE: + + buildmap_dictionary_subtree_switch_endian + (db_tree, db_reference, db_reference[index].index); + break; + + default: + buildmap_fatal (0, + "corrupted node type %d", + db_reference[index].type & 0x0f); + } + + switch_endian_short(&db_reference[index].index); + } + + switch_endian_short(&tree->first); + } + + static void buildmap_dictionary_save_one (struct dictionary_volume *dictionary, *************** *** 521,525 **** --- 557,577 ---- memcpy (db_index, dictionary->string_index, dictionary->string_count * sizeof(unsigned int)); + memcpy (db_data, dictionary->data, dictionary->cursor); + + if (switch_endian) { + int i; + for (i=0; i<tree_count; i++) { + switch_endian_short(&db_tree[i].first); + } + + for (i=0; i<reference_count; i++) { + switch_endian_short(&db_reference[i].index); + } + + for (i=0; i<dictionary->string_count; i++) { + switch_endian_int(db_index+i); + } + } } Index: buildmap_metadata.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_metadata.c,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** buildmap_metadata.c 1 Dec 2005 12:24:15 -0000 1.1 --- buildmap_metadata.c 9 Feb 2007 17:29:12 -0000 1.1.4.1 *************** *** 175,178 **** --- 175,189 ---- db_attributes[i].filler = 0; } + + if (switch_endian) { + int i; + + for (i=0; i<AttributeCount; i++) { + switch_endian_short(&db_attributes[i].category); + switch_endian_short(&db_attributes[i].name); + switch_endian_short(&db_attributes[i].value); + switch_endian_short(&db_attributes[i].filler); + } + } } Index: buildmap_range.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_range.c,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -C2 -d -r1.3 -r1.3.4.1 *** buildmap_range.c 12 Dec 2005 20:35:41 -0000 1.3 --- buildmap_range.c 9 Feb 2007 17:29:12 -0000 1.3.4.1 *************** *** 925,928 **** --- 925,977 ---- db_square[k].noaddr_count += 1; } + + if (switch_endian) { + int i; + + for (i=0; i<buildmap_street_count(); i++) { + switch_endian_int(&db_streets[i].first_range); + switch_endian_int(&db_streets[i].first_city); + switch_endian_int(&db_streets[i].first_zip); + switch_endian_int(&db_streets[i].count_range); + } + + for (i=0; i<city_count; i++) { + switch_endian_short(&db_city[i].city); + switch_endian_short(&db_city[i].count); + } + + for (i=0; i<RangePlaceCount; i++) { + switch_endian_short(&db_place[i].place); + switch_endian_short(&db_place[i].city); + } + + for (i=0; i<zip_count; i++) { + switch_endian_short(&db_zip[i].zip); + switch_endian_short(&db_zip[i].count); + } + + for (i=0; i<RangeCount; i++) { + switch_endian_int(&db_ranges[i].line); + switch_endian_short(&db_ranges[i].fradd); + switch_endian_short(&db_ranges[i].toadd); + } + + for (i=0; i<RangeNoAddressCount; i++) { + switch_endian_int(&db_noaddr[i].line); + switch_endian_int(&db_noaddr[i].street); + } + + for (i=0; i<square_count; i++) { + int j; + + for (j=0; j<ROADMAP_RANGE_HOLES; j++) { + switch_endian_short(&db_square[i].hole[j].excluded); + switch_endian_short(&db_square[i].hole[j].included); + } + + switch_endian_int(&db_square[i].noaddr_start); + switch_endian_int(&db_square[i].noaddr_count); + } + } } Index: buildmap.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap.h,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -C2 -d -r1.3 -r1.3.4.1 *** buildmap.h 1 Dec 2005 12:21:21 -0000 1.3 --- buildmap.h 9 Feb 2007 17:29:12 -0000 1.3.4.1 *************** *** 28,33 **** --- 28,47 ---- #include "roadmap_db.h" + extern int switch_endian; #define BUILDMAP_BLOCK 2048 /* memory allocation block. */ + #define switch_endian_short(x) _switch_endian_short((unsigned short *)x) + #define switch_endian_int(x) _switch_endian_int((unsigned int *)x) + + static inline void _switch_endian_int(unsigned int *i) + { + unsigned char *b = (unsigned char *) i; + *i = (unsigned int) (b[0]<<24 | b[1]<<16 | b[2]<<8 | b[3]); + } + static inline void _switch_endian_short(unsigned short *s) + { + unsigned char *b = (unsigned char *) s; + *s = (unsigned short) (b[0]<<8 | b[1]); + } void buildmap_set_source (const char *name); Index: roadmap_input.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_input.c,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.6.1 diff -C2 -d -r1.1.1.1 -r1.1.1.1.6.1 *** roadmap_input.c 15 Oct 2005 22:19:01 -0000 1.1.1.1 --- roadmap_input.c 9 Feb 2007 17:29:13 -0000 1.1.1.1.6.1 *************** *** 31,38 **** #include <stdlib.h> - #ifndef _WIN32 - #include <errno.h> - #endif - #include "roadmap.h" #include "roadmap_input.h" --- 31,34 ---- Index: buildmap_point.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_point.c,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -C2 -d -r1.4 -r1.4.4.1 *** buildmap_point.c 22 Mar 2006 08:46:52 -0000 1.4 --- buildmap_point.c 9 Feb 2007 17:29:12 -0000 1.4.4.1 *************** *** 431,434 **** --- 431,449 ---- db_ids[i] = one_point->db_id; } + + if (switch_endian) { + int i; + + for (i=0; i<PointCount; i++) { + switch_endian_short(&db_points[i].longitude); + switch_endian_short(&db_points[i].latitude); + switch_endian_int(db_ids + i); + } + + for (i=0; i<buildmap_square_get_count(); i++) { + switch_endian_int(&db_bysquare[i].first); + switch_endian_int(&db_bysquare[i].count); + } + } } Index: roadmap_dictionary.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_dictionary.c,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** roadmap_dictionary.c 22 Jan 2007 16:56:55 -0000 1.5 --- roadmap_dictionary.c 9 Feb 2007 17:29:13 -0000 1.5.2.1 *************** *** 99,103 **** } ! static void roadmap_dictionary_print_subtree (struct dictionary_volume *dictionary, int tree_index) { --- 99,103 ---- } ! #ifndef J2ME static void roadmap_dictionary_print_subtree (struct dictionary_volume *dictionary, int tree_index) { *************** *** 151,155 **** } } ! static void roadmap_dictionary_walk --- 151,155 ---- } } ! #endif static void roadmap_dictionary_walk *************** *** 681,685 **** } ! void roadmap_dictionary_dump (void) { --- 681,685 ---- } ! #ifndef J2ME void roadmap_dictionary_dump (void) { *************** *** 707,710 **** --- 707,711 ---- } + #endif int roadmap_dictionary_search_all *************** *** 739,743 **** for (subtree_index = -1; subtree_index < subtrees_count; subtree_index++) { int status; ! int subtree_start_pos; itr = str; --- 740,744 ---- for (subtree_index = -1; subtree_index < subtrees_count; subtree_index++) { int status; ! int subtree_start_pos = 0; itr = str; Index: buildmap_line_route.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_line_route.c,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** buildmap_line_route.c 3 Nov 2006 12:29:48 -0000 1.2 --- buildmap_line_route.c 9 Feb 2007 17:29:12 -0000 1.2.2.1 *************** *** 151,154 **** --- 151,163 ---- } } + + if (switch_endian) { + int i; + + for (i=0; i<RoutesCount; i++) { + switch_endian_short(&db_route[i].from_speed_ref); + switch_endian_short(&db_route[i].to_speed_ref); + } + } } Index: roadmap_navigate.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_navigate.c,v retrieving revision 1.17 retrieving revision 1.17.4.1 diff -C2 -d -r1.17 -r1.17.4.1 *** roadmap_navigate.c 14 Oct 2006 10:31:59 -0000 1.17 --- roadmap_navigate.c 9 Feb 2007 17:29:13 -0000 1.17.4.1 *************** *** 671,678 **** --- 671,680 ---- /* We must search again for the best street match. */ + #ifndef J2ME //FIXME remove when navigation will support plugin lines if (RoadMapRouteInfo.enabled) { editor_plugin_set_override (0); } + #endif count = roadmap_navigate_get_neighbours (&RoadMapLatestPosition, roadmap_fuzzy_max_distance(), *************** *** 722,729 **** --- 724,733 ---- } + #ifndef J2ME //FIXME remove when navigation will support plugin lines if (RoadMapRouteInfo.enabled) { editor_plugin_set_override (1); } + #endif if (roadmap_fuzzy_is_acceptable (best)) { Index: roadmap_gui.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_gui.h,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** roadmap_gui.h 23 Apr 2006 13:16:48 -0000 1.2 --- roadmap_gui.h 9 Feb 2007 17:29:13 -0000 1.2.4.1 *************** *** 30,35 **** typedef struct { ! short x; ! short y; } RoadMapGuiPoint; --- 30,35 ---- typedef struct { ! int x; ! int y; } RoadMapGuiPoint; *************** *** 37,44 **** typedef struct { ! short minx; ! short miny; ! short maxx; ! short maxy; } RoadMapGuiRect; --- 37,44 ---- typedef struct { ! int minx; ! int miny; ! int maxx; ! int maxy; } RoadMapGuiRect; Index: roadmap_screen_obj.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_screen_obj.c,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -C2 -d -r1.10 -r1.10.2.1 *** roadmap_screen_obj.c 22 Jan 2007 16:56:55 -0000 1.10 --- roadmap_screen_obj.c 9 Feb 2007 17:29:13 -0000 1.10.2.1 *************** *** 56,60 **** static ObjectFile RoadMapObjFiles[] = { {"objects", 300}, ! {"objects_wide", 200} }; --- 56,61 ---- static ObjectFile RoadMapObjFiles[] = { {"objects", 300}, ! {"objects_wide", 200}, ! {"objects", 100} }; *************** *** 141,144 **** --- 142,146 ---- int argc, const char **argv, int *argl) { + #ifndef J2ME int i; *************** *** 175,178 **** --- 177,181 ---- ++object->states_count; + #endif } *************** *** 470,473 **** --- 473,477 ---- + #ifndef J2ME static RoadMapScreenObj roadmap_screen_obj_by_pos (RoadMapGuiPoint *point) { *************** *** 574,577 **** --- 578,582 ---- return 1; } + #endif *************** *** 649,652 **** --- 654,658 ---- void roadmap_screen_obj_initialize (void) { + #ifndef J2ME roadmap_pointer_register_pressed (roadmap_screen_obj_pressed, POINTER_HIGH); *************** *** 655,659 **** roadmap_pointer_register_long_click (roadmap_screen_obj_long_click, POINTER_HIGH); ! roadmap_screen_obj_reload (); } --- 661,665 ---- roadmap_pointer_register_long_click (roadmap_screen_obj_long_click, POINTER_HIGH); ! #endif roadmap_screen_obj_reload (); } Index: buildmap_dbwrite.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_dbwrite.c,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -C2 -d -r1.3 -r1.3.4.1 *** buildmap_dbwrite.c 28 Nov 2005 19:36:34 -0000 1.3 --- buildmap_dbwrite.c 9 Feb 2007 17:29:12 -0000 1.3.4.1 *************** *** 44,48 **** #include "buildmap.h" ! #define BUILDMAP_DB_BLOCK_SIZE 0x100000 --- 44,48 ---- #include "buildmap.h" ! int switch_endian = 1; #define BUILDMAP_DB_BLOCK_SIZE 0x100000 *************** *** 146,149 **** --- 146,169 ---- + static void buildmap_db_switch_endian + (buildmap_db *parent, buildmap_db *section) { + + buildmap_db *child; + struct roadmap_db_section *db; + + for (child = section->first; child != NULL; child = child->next) { + + buildmap_db_switch_endian (section, child); + } + + db = section->head; + + switch_endian_int(&db->first); + switch_endian_int(&db->next); + switch_endian_int(&db->size); + switch_endian_int(&db->count); + } + + int buildmap_db_open (const char *path, const char *name) { *************** *** 308,311 **** --- 328,335 ---- buildmap_db_update_tree (NULL, &BuildmapDbRoot); + if (switch_endian) { + buildmap_db_switch_endian (NULL, &BuildmapDbRoot); + } + roadmap_file_unmap (&BuildmapCurrentDbBaseMapContext); BuildmapCurrentDbBaseMapContext = NULL; Index: roadmap_math.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_math.c,v retrieving revision 1.13 retrieving revision 1.13.2.1 diff -C2 -d -r1.13 -r1.13.2.1 *** roadmap_math.c 7 Jan 2007 21:34:40 -0000 1.13 --- roadmap_math.c 9 Feb 2007 17:29:13 -0000 1.13.2.1 *************** *** 66,73 **** typedef struct { ! double unit_per_latitude; ! double unit_per_longitude; ! double speed_per_knot; ! double cm_to_unit; int to_trip_unit; --- 66,73 ---- typedef struct { ! float unit_per_latitude; ! float unit_per_longitude; ! float speed_per_knot; ! float cm_to_unit; int to_trip_unit; *************** *** 337,342 **** static int roadmap_math_find_screen_intersection (const RoadMapPosition *from, const RoadMapPosition *to, ! double a, ! double b, RoadMapPosition intersections[], int max_intersections) { --- 337,342 ---- static int roadmap_math_find_screen_intersection (const RoadMapPosition *from, const RoadMapPosition *to, ! float a, ! float b, RoadMapPosition intersections[], int max_intersections) { *************** *** 446,456 **** /* how far away is this point along the Y axis */ ! double fDistFromCenterY = RoadMapContext.height - point->y; /* how far from the bottom of the screen is the horizon */ ! double fVisibleRange = RoadMapContext.height - RoadMapContext._3D_horizon; ! double fDistFromCenterX; ! double fDistFromHorizon; /* make the Y coordinate converge on the horizon as the --- 446,456 ---- /* how far away is this point along the Y axis */ ! float fDistFromCenterY = RoadMapContext.height - point->y; /* how far from the bottom of the screen is the horizon */ ! float fVisibleRange = RoadMapContext.height - RoadMapContext._3D_horizon; ! float fDistFromCenterX; ! float fDistFromHorizon; /* make the Y coordinate converge on the horizon as the *************** *** 476,488 **** /* X distance from center of screen */ ! double fDistFromCenterX = point->x - RoadMapContext.width / 2; /* Y distance from horizon */ ! double fDistFromHorizon = point->y - RoadMapContext._3D_horizon; /* distance from bottom of screen to horizon */ ! double fVisibleRange = RoadMapContext.height - RoadMapContext._3D_horizon; ! double fDistFromBottom; ! double fD; if (RoadMapContext._3D_horizon == 0) { --- 476,488 ---- /* X distance from center of screen */ ! float fDistFromCenterX = point->x - RoadMapContext.width / 2; /* Y distance from horizon */ ! float fDistFromHorizon = point->y - RoadMapContext._3D_horizon; /* distance from bottom of screen to horizon */ ! float fVisibleRange = RoadMapContext.height - RoadMapContext._3D_horizon; ! float fDistFromBottom; ! float fD; if (RoadMapContext._3D_horizon == 0) { *************** *** 824,829 **** if (!from_visible || !to_visible) { ! double a; ! double b; if (from_visible || to_visible) { --- 824,829 ---- if (!from_visible || !to_visible) { ! float a; ! float b; if (from_visible || to_visible) { *************** *** 941,945 **** int roadmap_math_thickness (int base, int declutter, int use_multiple_pens) { ! double ratio; ratio = ((2.5 * ROADMAP_REFERENCE_ZOOM) * base) / RoadMapContext.zoom; --- 941,945 ---- int roadmap_math_thickness (int base, int declutter, int use_multiple_pens) { ! float ratio; ratio = ((2.5 * ROADMAP_REFERENCE_ZOOM) * base) / RoadMapContext.zoom; *************** *** 1144,1150 **** int result; ! double x; ! double y; ! double d; --- 1144,1150 ---- int result; ! float x; ! float y; ! float d; *************** *** 1176,1180 **** int x; int y; ! double d; x = point2->x - point1->x; --- 1176,1180 ---- int x; int y; ! float d; x = point2->x - point1->x; *************** *** 1208,1212 **** if (squared == MATH_DIST_ACTUAL) { ! ret = (long) sqrt ((double)ret); } --- 1208,1212 ---- if (squared == MATH_DIST_ACTUAL) { ! ret = (long) sqrt ((float)ret); } *************** *** 1218,1223 **** (const RoadMapPosition *position1, const RoadMapPosition *position2) { ! double x; ! double y; --- 1218,1223 ---- (const RoadMapPosition *position1, const RoadMapPosition *position2) { ! float x; ! float y; *************** *** 1235,1239 **** { char *suffix; ! double distance; RoadMapUnits *my_units, *other_units; int had_units = 1; --- 1235,1239 ---- { char *suffix; ! float distance; RoadMapUnits *my_units, *other_units; int had_units = 1; *************** *** 1316,1325 **** int minimum; ! double x1; ! double y1; ! double x2; ! double y2; ! double x3; ! double y3; --- 1316,1325 ---- int minimum; ! float x1; ! float y1; ! float x2; ! float y2; ! float x3; ! float y3; *************** *** 1356,1361 **** /* Equation of the line: */ ! double a = (y1 - y2) / (x1 - x2); ! double b = y1 - a * x1; /* The equation of the perpendicular is: y = - (x / a). */ --- 1356,1361 ---- /* Equation of the line: */ ! float a = (y1 - y2) / (x1 - x2); ! float b = y1 - a * x1; /* The equation of the perpendicular is: y = - (x / a). */ *************** *** 1547,1552 **** RoadMapPosition *intersection) { ! double a1,b1; ! double a2,b2; if (from1->longitude == to1->longitude) { --- 1547,1552 ---- RoadMapPosition *intersection) { ! float a1,b1; ! float a2,b2; if (from1->longitude == to1->longitude) { *************** *** 1586,1592 **** #if USE_FLOAT /* for reference, until we're sure integer version works */ ! double a1,b1; ! double a2,b2; ! double x; if (f1->x == t1->x) { --- 1586,1592 ---- #if USE_FLOAT /* for reference, until we're sure integer version works */ ! float a1,b1; ! float a2,b2; ! float x; if (f1->x == t1->x) { Index: roadmap_plugin.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_plugin.c,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** roadmap_plugin.c 7 Jan 2007 21:34:40 -0000 1.8 --- roadmap_plugin.c 9 Feb 2007 17:29:13 -0000 1.8.2.1 *************** *** 28,31 **** --- 28,32 ---- #include <assert.h> #include <stdlib.h> + #include <stdio.h> #include "roadmap.h" #include "roadmap_line.h" Index: buildmap_line.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_line.c,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** buildmap_line.c 17 Nov 2006 16:53:39 -0000 1.5 --- buildmap_line.c 9 Feb 2007 17:29:12 -0000 1.5.2.1 *************** *** 689,692 **** --- 689,728 ---- memcpy (db_long_lines, LongLines, LongLinesCount * sizeof (RoadMapLongLine)); + if (switch_endian) { + int i; + + for (i=0; i<LineCount; i++) { + switch_endian_int(&db_lines[i].from); + switch_endian_int(&db_lines[i].to); + } + + for (i=0; i<square_count; i++) { + int j; + for (j=0; j<ROADMAP_CATEGORY_RANGE; j++) { + switch_endian_int(&db_square1[i].first[j]); + } + switch_endian_int(&db_square1[i].last); + } + + for (i=0; i<LineCrossingCount; i++) { + switch_endian_int(db_index2 + i); + } + + for (i=0; i<square_count; i++) { + int j; + for (j=0; j<ROADMAP_CATEGORY_RANGE; j++) { + switch_endian_int(&db_square2[i].first[j]); + } + switch_endian_int(&db_square2[i].last); + } + + for (i=0; i<LongLinesCount; i++) { + switch_endian_int(&db_long_lines[i].line); + switch_endian_int(&db_long_lines[i].area.east); + switch_endian_int(&db_long_lines[i].area.west); + switch_endian_int(&db_long_lines[i].area.north); + switch_endian_int(&db_long_lines[i].area.south); + } + } } Index: roadmap_config.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_config.c,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** roadmap_config.c 7 Jan 2007 10:01:12 -0000 1.8 --- roadmap_config.c 9 Feb 2007 17:29:13 -0000 1.8.2.1 *************** *** 466,471 **** if (file == NULL) return 0; - /* DEBUG: printf ("Loading %s from %s ..\n", config->name, path); */ - while (!feof(file)) { --- 466,469 ---- Index: buildmap_line_speed.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_line_speed.c,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** buildmap_line_speed.c 3 Nov 2006 12:29:48 -0000 1.1 --- buildmap_line_speed.c 9 Feb 2007 17:29:12 -0000 1.1.2.1 *************** *** 303,306 **** --- 303,314 ---- db_speed[slot_count-1].time_slot |= SPEED_EOL; } + + if (switch_endian) { + int i; + + for (i=0; i<SpeedsCount; i++) { + switch_endian_int(db_index + i); + } + } } Index: roadmap_factory.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_factory.c,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** roadmap_factory.c 7 Jan 2007 10:01:12 -0000 1.7 --- roadmap_factory.c 9 Feb 2007 17:29:13 -0000 1.7.2.1 *************** *** 62,73 **** --- 62,79 ---- const struct RoadMapFactoryKeyMap *binding; + roadmap_log (ROADMAP_DEBUG, "In roadmap_factory_keyboard.\n"); + if (RoadMapFactoryBindings == NULL) return; + roadmap_log (ROADMAP_DEBUG, "Searching for action...\n"); for (binding = RoadMapFactoryBindings; binding->key != NULL; ++binding) { + roadmap_log (ROADMAP_DEBUG, "Key: %s, name:%s\n", binding->key, binding->action->name); if (strcasecmp (binding->key, key) == 0) { + roadmap_log (ROADMAP_DEBUG, "Found action.\n"); if (binding->action != NULL) { RoadMapCallback callback = binding->action->callback; if (callback != NULL) { + roadmap_log (ROADMAP_DEBUG, "Calling callback...\n"); (*callback) (); break; *************** *** 78,81 **** --- 84,88 ---- } + #ifndef J2ME static void roadmap_factory_add_help (RoadMapMenu menu) { *************** *** 94,98 **** } } ! static const RoadMapAction *roadmap_factory_find_action --- 101,105 ---- } } ! #endif static const RoadMapAction *roadmap_factory_find_action *************** *** 228,232 **** --- 235,241 ---- } else if (item == RoadMapFactoryHelpTopics) { + #ifndef J2ME roadmap_factory_add_help (gui_menu); + #endif } else if (strncmp (item, ROADMAP_MENU, prefix) == 0) { *************** *** 322,325 **** --- 331,336 ---- separator = strstr (text, ROADMAP_MAPPED_TO); + roadmap_log (ROADMAP_DEBUG, "In roadmap_factory_keymap: text:%s, separator: %s\n", text, separator); + if (separator != NULL) { *************** *** 330,333 **** --- 341,346 ---- for (p = separator; *p && (*p <= ' '); --p) *p = 0; + roadmap_log (ROADMAP_DEBUG, "After separation: text:%s, p: %s\n", text, p); + p = separator + strlen(ROADMAP_MAPPED_TO); while (*p && (*p <= ' ')) ++p; Index: buildmap_shape.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_shape.c,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** buildmap_shape.c 7 Jan 2007 10:01:12 -0000 1.6 --- buildmap_shape.c 9 Feb 2007 17:29:12 -0000 1.6.2.1 *************** *** 504,507 **** --- 504,527 ---- ShapeLineCount, line_index+1); } + + if (switch_endian) { + int i; + + for (i=0; i<square_count; i++) { + switch_endian_int(&db_bysquare[i].first); + switch_endian_int(&db_bysquare[i].count); + } + + for (i=0; i<ShapeLineCount; i++) { + switch_endian_int(&db_byline[i].line); + switch_endian_int(&db_byline[i].first); + switch_endian_int(&db_byline[i].count); + } + + for (i=0; i<shape_count; i++) { + switch_endian_short(&db_shape[i].delta_longitude); + switch_endian_short(&db_shape[i].delta_latitude); + } + } } Index: roadmap_trip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_trip.c,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -C2 -d -r1.12 -r1.12.2.1 *** roadmap_trip.c 7 Jan 2007 10:01:12 -0000 1.12 --- roadmap_trip.c 9 Feb 2007 17:29:13 -0000 1.12.2.1 *************** *** 293,296 **** --- 293,297 ---- + #ifndef J2ME static void roadmap_trip_dialog_cancel (const char *name, void *data) { *************** *** 429,433 **** } - static FILE *roadmap_trip_fopen (const char *name, const char *mode) { --- 430,433 ---- *************** *** 451,455 **** } ! static void roadmap_trip_set_point_focus (RoadMapTripPoint *point) { --- 451,455 ---- } ! #endif static void roadmap_trip_set_point_focus (RoadMapTripPoint *point) { *************** *** 643,646 **** --- 643,647 ---- roadmap_math_distance_unit()); + #ifndef J2ME sun = roadmap_sunset (&gps->gps); if (sun > now) { *************** *** 657,661 **** roadmap_message_set ('M', roadmap_time_get_hours_minutes(sun)); } ! } else { --- 658,662 ---- roadmap_message_set ('M', roadmap_time_get_hours_minutes(sun)); } ! #endif } else { *************** *** 688,692 **** void roadmap_trip_set_point (const char *name, const RoadMapPosition *position) { ! if (name == NULL) { roadmap_trip_set_dialog (position); --- 689,693 ---- void roadmap_trip_set_point (const char *name, const RoadMapPosition *position) { ! #ifndef J2ME if (name == NULL) { roadmap_trip_set_dialog (position); *************** *** 694,697 **** --- 695,699 ---- roadmap_trip_update (name, position, NULL, "Waypoint"); } + #endif } *************** *** 745,749 **** --- 747,753 ---- if (name == NULL) { + #ifndef J2ME roadmap_trip_remove_dialog (); + #endif return; } *************** *** 1064,1067 **** --- 1068,1074 ---- int roadmap_trip_load (const char *name, int silent) { + #ifdef J2ME + return 0; + #else FILE *file; int i; *************** *** 1119,1122 **** --- 1126,1130 ---- roadmap_screen_refresh(); return 1; + #endif } *************** *** 1133,1136 **** --- 1141,1145 ---- void roadmap_trip_save (const char *name) { + #ifndef J2ME RoadMapTripPoint *point; RoadMapListItem *item, *tmp; *************** *** 1166,1169 **** --- 1175,1179 ---- RoadMapTripModified = 0; } + #endif } Index: buildmap_street.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_street.c,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -C2 -d -r1.3 -r1.3.4.1 *** buildmap_street.c 12 Dec 2005 20:35:41 -0000 1.3 --- buildmap_street.c 9 Feb 2007 17:29:12 -0000 1.3.4.1 *************** *** 305,308 **** --- 305,321 ---- db_cfcc[i] = one_street->cfcc; } + + if (switch_endian) { + int i; + + for (i=0; i<StreetCount; i++) { + + switch_endian_short(&db_streets[i].fedirp); + switch_endian_short(&db_streets[i].fename); + switch_endian_short(&db_streets[i].fetype); + switch_endian_short(&db_streets[i].fedirs); + switch_endian_short(&db_streets[i].t2s); + } + } } Index: buildmap_postgres.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_postgres.c,v retrieving revision 1.15 retrieving revision 1.15.2.1 diff -C2 -d -r1.15 -r1.15.2.1 *** buildmap_postgres.c 7 Jan 2007 10:01:12 -0000 1.15 --- buildmap_postgres.c 9 Feb 2007 17:29:12 -0000 1.15.2.1 *************** *** 69,76 **** /* ROADS */ ! static const char *roads_sql = "SELECT segments.id AS id, AsText(simplify(segments.the_geom, 0.00002)) AS the_geom, segments.road_type AS layer, segments.from_node AS from_node_id, segments.to_node AS to_node_id, street_types.name AS street_type, streets.name AS street_name, streets.text2speech as text2speech, cities.name as city_name, fraddl, toaddl, fraddr, toaddr, from_travel_ref, to_travel_ref FROM segments LEFT JOIN streets ON segments.street_id = streets.id LEFT JOIN cities ON streets.city_id = cities.id LEFT JOIN street_types on street_types.id=streets.type WHERE segments.the_geom @ SetSRID ('BOX3D(34 29.2, 36.2 33.6)'::box3d, 4326);"; static const char *roads_route_sql = "SELECT segments.id AS id, segments.from_car_allowed AS from_car_allowed, segments.to_car_allowed AS to_car_allowed, segments.from_max_speed AS from_max_speed, segments.to_max_speed AS to_max_speed, segments.from_cross_time AS from_cross_time, segments.to_cross_time AS to_cross_time, segments.road_type AS layer FROM segments WHERE segments.the_geom @ SetSRID ('BOX3D(34 29.2, 36.2 33.6)'::box3d, 4326);"; ! static const char *country_borders_sql = "SELECT id AS id, AsText(simplify(the_geom, 0.00002)) AS the_geom FROM borders;"; ! static const char *water_sql = "SELECT id AS id, AsText(simplify(the_geom, 0.00002)) AS the_geom FROM water;"; static const char *turn_restrictions_sql = "SELECT node_id, seg1_id, seg2_id FROM turn_restrictions;"; static const char *cities_sql = "SELECT name FROM cities;"; --- 69,76 ---- /* ROADS */ ! static const char *roads_sql = "SELECT segments.id AS id, AsText(simplify(segments.the_geom, 0.0002)) AS the_geom, segments.road_type AS layer, segments.from_node AS from_node_id, segments.to_node AS to_node_id, street_types.name AS street_type, streets.name AS street_name, streets.text2speech as text2speech, cities.name as city_name, fraddl, toaddl, fraddr, toaddr, from_travel_ref, to_travel_ref FROM segments LEFT JOIN streets ON segments.street_id = streets.id LEFT JOIN cities ON streets.city_id = cities.id LEFT JOIN street_types on street_types.id=streets.type WHERE segments.the_geom @ SetSRID ('BOX3D(34 29.2, 36.2 33.6)'::box3d, 4326);"; static const char *roads_route_sql = "SELECT segments.id AS id, segments.from_car_allowed AS from_car_allowed, segments.to_car_allowed AS to_car_allowed, segments.from_max_speed AS from_max_speed, segments.to_max_speed AS to_max_speed, segments.from_cross_time AS from_cross_time, segments.to_cross_time AS to_cross_time, segments.road_type AS layer FROM segments WHERE segments.the_geom @ SetSRID ('BOX3D(34 29.2, 36.2 33.6)'::box3d, 4326);"; ! static const char *country_borders_sql = "SELECT id AS id, AsText(simplify(the_geom, 0.0002)) AS the_geom FROM borders;"; ! static const char *water_sql = "SELECT id AS id, AsText(simplify(the_geom, 0.0002)) AS the_geom FROM water;"; static const char *turn_restrictions_sql = "SELECT node_id, seg1_id, seg2_id FROM turn_restrictions;"; static const char *cities_sql = "SELECT name FROM cities;"; *************** *** 948,954 **** if (!empty) { ! buildmap_postgres_read_roads_route (verbose); buildmap_postgres_read_roads_shape_points (verbose); ! buildmap_postgres_read_turn_restrictions (verbose); } //buildmap_postgres_read_water_shape_points (verbose); --- 948,954 ---- if (!empty) { ! //buildmap_postgres_read_roads_route (verbose); buildmap_postgres_read_roads_shape_points (verbose); ! //buildmap_postgres_read_turn_restrictions (verbose); } //buildmap_postgres_read_water_shape_points (verbose); Index: buildmap_polygon.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_polygon.c,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** buildmap_polygon.c 28 Nov 2005 19:36:34 -0000 1.2 --- buildmap_polygon.c 9 Feb 2007 17:29:12 -0000 1.2.4.1 *************** *** 969,972 **** --- 969,990 ---- (db_point, db_head + polygon_current); } + + if (switch_endian) { + int i; + + for (i=0; i<PolygonCount; i++) { + switch_endian_short(&db_head[i].first); + switch_endian_short(&db_head[i].count); + switch_endian_short(&db_head[i].name); + switch_endian_int(&db_head[i].north); + switch_endian_int(&db_head[i].west); + switch_endian_int(&db_head[i].east); + switch_endian_int(&db_head[i].south); + } + + for (i=0; i<PolygonLineCount; i++) { + switch_endian_int(&db_point[i].point); + } + } } Index: roadmap_log.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_log.c,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -C2 -d -r1.5 -r1.5.4.1 *** roadmap_log.c 8 Oct 2006 20:00:08 -0000 1.5 --- roadmap_log.c 9 Feb 2007 17:29:13 -0000 1.5.4.1 *************** *** 121,124 **** --- 121,125 ---- int i; + #ifndef J2ME #ifndef _WIN32 time_t now; *************** *** 128,132 **** tms = localtime (&now); ! fprintf (file, "%d:%d:%d %c%s %s, line %d ", tms->tm_hour, tms->tm_min, tms->tm_sec, saved, category->prefix, source, line); --- 129,133 ---- tms = localtime (&now); ! printf ("%d:%d:%d %c%s %s, line %d ", tms->tm_hour, tms->tm_min, tms->tm_sec, saved, category->prefix, source, line); *************** *** 136,149 **** GetSystemTime(&st); ! fprintf (file, "%d/%d %d:%d:%d %c%s %s, line %d ", st.wDay, st.wMonth, st.wHour, st.wMinute, st.wSecond, saved, category->prefix, source, line); #endif if (!category->show_stack && (RoadMapLogStackCursor > 0)) { ! fprintf (file, "(%s): ", RoadMapLogStack[RoadMapLogStackCursor-1]); } ! vfprintf(file, format, ap); ! fprintf (file, "\n"); if (category->show_stack && RoadMapLogStackCursor > 0) { --- 137,151 ---- GetSystemTime(&st); ! printf ("%d/%d %d:%d:%d %c%s %s, line %d ", st.wDay, st.wMonth, st.wHour, st.wMinute, st.wSecond, saved, category->prefix, source, line); #endif + #endif if (!category->show_stack && (RoadMapLogStackCursor > 0)) { ! printf ("(%s): ", RoadMapLogStack[RoadMapLogStackCursor-1]); } ! vprintf(format, ap); ! printf ("\n"); if (category->show_stack && RoadMapLogStackCursor > 0) { *************** *** 151,158 **** int indent = 8; ! fprintf (file, " Call stack:\n"); for (i = 0; i < RoadMapLogStackCursor; ++i) { ! fprintf (file, "%*.*s %s\n", indent, indent, "", RoadMapLogStack[i]); indent += 3; } --- 153,160 ---- int indent = 8; ! printf (" Call stack:\n"); for (i = 0; i < RoadMapLogStackCursor; ++i) { ! printf ("%*.*s %s\n", indent, indent, "", RoadMapLogStack[i]); indent += 3; } *************** *** 168,171 **** --- 170,174 ---- char *debug; + return; if (level < roadmap_verbosity()) return; *************** *** 184,187 **** --- 187,191 ---- va_start(ap, format); + #ifndef J2ME if (category->save_to_file) { *************** *** 203,207 **** } } ! roadmap_log_one (category, stderr, saved, source, line, format, ap); --- 207,211 ---- } } ! #endif roadmap_log_one (category, stderr, saved, source, line, format, ap); Index: buildus_county.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildus_county.c,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** buildus_county.c 28 Nov 2005 19:36:34 -0000 1.2 --- buildus_county.c 9 Feb 2007 17:29:13 -0000 1.2.4.1 *************** *** 539,542 **** --- 539,573 ---- } } + + if (switch_endian) { + int i; + for (i=0; i<CountyCount; i++) { + switch_endian_int(&db_county[i].fips); + switch_endian_short(&db_county[i].reserved); + switch_endian_short(&db_county[i].name); + switch_endian_int(&db_county[i].edges.east); + switch_endian_int(&db_county[i].edges.west); + switch_endian_int(&db_county[i].edges.north); + switch_endian_int(&db_county[i].edges.south); + } + + for (i=0; i<CountyCityCount; i++) { + switch_endian_short(&db_city[i].county); + switch_endian_short(&db_city[i].city); + } + + for (i=0; i<state_max + 1; i++) { + switch_endian_short(&db_state[i].name); + switch_endian_short(&db_state[i].symbol); + switch_endian_short(&db_state[i].first_county); + switch_endian_short(&db_state[i].last_county); + switch_endian_short(&db_state[i].first_city); + switch_endian_short(&db_state[i].last_city); + switch_endian_int(&db_state[i].edges.east); + switch_endian_int(&db_state[i].edges.west); + switch_endian_int(&db_state[i].edges.north); + switch_endian_int(&db_state[i].edges.south); + } + } } Index: roadmap_gps.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_gps.c,v retrieving revision 1.16 retrieving revision 1.16.2.1 diff -C2 -d -r1.16 -r1.16.2.1 *** roadmap_gps.c 7 Jan 2007 21:34:40 -0000 1.16 --- roadmap_gps.c 9 Feb 2007 17:29:13 -0000 1.16.2.1 *************** *** 51,54 **** --- 51,58 ---- #include "roadmap_gps.h" + #ifdef J2ME + #include <javax/microedition/midlet.h> + #include <gps_manager.h> + #endif static RoadMapConfigDescriptor RoadMapConfigGPSAccuracy = *************** *** 184,187 **** --- 188,193 ---- int i; + roadmap_log (ROADMAP_ERROR, "Position: %d, %d\n", RoadMapGpsReceivedPosition.latitude, RoadMapGpsReceivedPosition.longitude); + for (i = 0; i < ROADMAP_GPS_CLIENTS; ++i) { *************** *** 462,466 **** /* GPSD (or other) protocol support ------------------------------------ */ ! static void roadmap_gps_navigation (char status, int gmt_time, --- 468,472 ---- /* GPSD (or other) protocol support ------------------------------------ */ ! #ifndef J2ME static void roadmap_gps_navigation (char status, int gmt_time, *************** *** 561,568 **** roadmap_message_set ('v', "%.2f", RoadMapGpsQuality.dilution_vertical); } ! /* End of GPSD protocol support ---------------------------------------- */ /* OBJECTS pseudo protocol support ------------------------------------- */ --- 567,575 ---- roadmap_message_set ('v', "%.2f", RoadMapGpsQuality.dilution_vertical); } ! #endif /* J2ME */ /* End of GPSD protocol support ---------------------------------------- */ + #ifndef J2ME /* OBJECTS pseudo protocol support ------------------------------------- */ *************** *** 590,594 **** /* End of OBJECT protocol support -------------------------------------- */ ! void roadmap_gps_initialize (void) { --- 597,601 ---- /* End of OBJECT protocol support -------------------------------------- */ ! #endif void roadmap_gps_initialize (void) { *************** *** 707,711 **** const char *url; - /* Check if we have a gps interface defined: */ --- 714,717 ---- *************** *** 737,740 **** --- 743,747 ---- RoadMapGpsProtocol = ROADMAP_GPS_NMEA; /* This is the default. */ + #ifndef J2ME if (strncasecmp (url, "gpsd://", 7) == 0) { *************** *** 837,840 **** --- 844,857 ---- return; } + #else + if (1) { + RoadMapGpsLink.os.serial = roadmap_serial_open ("", "r", 0); + + if (ROADMAP_SERIAL_IS_VALID(RoadMapGpsLink.os.serial)) { + RoadMapGpsLink.subsystem = ROADMAP_IO_SERIAL; + } + } + + #endif if (RoadMapGpsLink.subsystem == ROADMAP_IO_INVALID) { *************** *** 870,873 **** --- 887,891 ---- break; + #ifndef J2ME case ROADMAP_GPS_GPSD2: *************** *** 876,879 **** --- 894,898 ---- roadmap_gpsd2_subscribe_to_dilution (roadmap_gps_dilution); break; + #endif case ROADMAP_GPS_OBJECT: *************** *** 926,930 **** int res; - if (decode.title == NULL) { --- 945,948 ---- *************** *** 944,947 **** --- 962,966 ---- break; + #ifndef J2ME case ROADMAP_GPS_GPSD2: *************** *** 949,952 **** --- 968,972 ---- decode.decoder_context = NULL; break; + #endif case ROADMAP_GPS_OBJECT: *************** *** 1164,1170 **** --- 1184,1198 ---- #else + #ifdef J2ME + void roadmap_gps_detect_receiver (void) { + NOPH_GpsManager_t gps_mgr = NOPH_GpsManager_getInstance(); + NOPH_MIDlet_t m = NOPH_MIDlet_get(); + NOPH_GpsManager_searchGps(gps_mgr, m); + } + #else /* Unix */ void roadmap_gps_detect_receiver (void) {} #endif + #endif Index: buildmap_turn_restrictions.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_turn_restrictions.c,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** buildmap_turn_restrictions.c 22 Mar 2006 08:42:34 -0000 1.1 --- buildmap_turn_restrictions.c 9 Feb 2007 17:29:12 -0000 1.1.4.1 *************** *** 323,326 **** --- 323,346 ---- TurnsNodeCount, node_index+1); } + + if (switch_endian) { + int i; + + for (i=0; i<square_count; i++) { + switch_endian_int(&db_bysquare[i].first); + switch_endian_int(&db_bysquare[i].count); + } + + for (i=0; i<TurnsNodeCount; i++) { + switch_endian_int(&db_by_node[i].node); + switch_endian_int(&db_by_node[i].first); + switch_endian_int(&db_by_node[i].count); + } + + for (i=0; i<TurnsCount; i++) { + switch_endian_int(&db_turns[i].from_line); + switch_endian_int(&db_turns[i].to_line); + } + } } Index: roadmap_hash.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_hash.c,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** roadmap_hash.c 3 Nov 2006 12:31:19 -0000 1.2 --- roadmap_hash.c 9 Feb 2007 17:29:13 -0000 1.2.2.1 *************** *** 180,183 **** --- 180,184 ---- + #ifndef J2ME void roadmap_hash_summary (void) { *************** *** 213,216 **** --- 214,219 ---- } + #endif + void roadmap_hash_reset (void) { Index: roadmap_sprite.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_sprite.c,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** roadmap_sprite.c 29 Apr 2006 11:04:26 -0000 1.2 --- roadmap_sprite.c 9 Feb 2007 17:29:13 -0000 1.2.4.1 *************** *** 385,391 **** --- 385,395 ---- RoadMapSpritePlane *plane; + roadmap_log (ROADMAP_DEBUG, "In roadmap_sprite_draw.\n"); if (sprite == NULL) return; + roadmap_log (ROADMAP_DEBUG, "Drawing %s in %d,%d.\n", + sprite->name, location->x, location->y); + for (plane = &(sprite->first); plane != NULL; plane = plane->next) { Index: roadmap_line_route.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_line_route.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** roadmap_line_route.c 21 Nov 2006 09:24:39 -0000 1.4 --- roadmap_line_route.c 9 Feb 2007 17:29:13 -0000 1.4.2.1 *************** *** 117,120 **** --- 117,121 ---- int time_slot; + #ifndef J2ME struct tm *t = localtime (&when); *************** *** 122,125 **** --- 123,129 ---- if (t->tm_min >= 30) time_slot++; + #else + time_slot = 24; + #endif //time_slot = 18; Index: roadmap_dbread.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_dbread.c,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -C2 -d -r1.3 -r1.3.4.1 *** roadmap_dbread.c 2 May 2006 12:42:57 -0000 1.3 --- roadmap_dbread.c 9 Feb 2007 17:29:13 -0000 1.3.4.1 *************** *** 99,102 **** --- 99,104 ---- } + roadmap_log (ROADMAP_DEBUG, "In roadmap_db_make_tree: first: %d, next: %d, size: %d, count:%d\n", + parent->head->first, parent->head->next, parent->head->size, parent->head->count); parent->first = NULL; *************** *** 339,344 **** if (strcasecmp (section, registered->section) == 0) { roadmap_log (ROADMAP_FATAL, ! "handler %s conflicts with %s for section %s", handler->name, registered->handler->name, --- 341,347 ---- if (strcasecmp (section, registered->section) == 0) { + printf ("test1: %s, %s\n", section, registered->section); roadmap_log (ROADMAP_FATAL, ! "STRCASECMP: handler %s conflicts with %s for section %s", handler->name, registered->handler->name, Index: buildmap_square.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_square.c,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -C2 -d -r1.3 -r1.3.4.1 *** buildmap_square.c 8 May 2006 13:53:42 -0000 1.3 --- buildmap_square.c 9 Feb 2007 17:29:12 -0000 1.3.4.1 *************** *** 385,388 **** --- 385,412 ---- db_square[i].count_points = one_square->count; } + + if (switch_endian) { + int i; + + switch_endian_int(&db_global->edges.east); + switch_endian_int(&db_global->edges.west); + switch_endian_int(&db_global->edges.north); + switch_endian_int(&db_global->edges.south); + switch_endian_int(&db_global->step_longitude); + switch_endian_int(&db_global->step_latitude); + switch_endian_int(&db_global->count_longitude); + switch_endian_int(&db_global->count_latitude); + switch_endian_int(&db_global->count_squares); + + for (i=0; i<SquareCount; i++) { + + switch_endian_int(&db_square[i].edges.east); + switch_endian_int(&db_square[i].edges.west); + switch_endian_int(&db_square[i].edges.north); + switch_endian_int(&db_square[i].edges.south); + switch_endian_int(&db_square[i].count_points); + switch_endian_int(&db_square[i].position); + } + } } Index: roadmap_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_screen.c,v retrieving revision 1.25 retrieving revision 1.25.2.1 diff -C2 -d -r1.25 -r1.25.2.1 *** roadmap_screen.c 7 Jan 2007 10:01:12 -0000 1.25 --- roadmap_screen.c 9 Feb 2007 17:29:13 -0000 1.25.2.1 *************** *** 62,66 **** --- 62,68 ---- #include "roadmap_screen.h" + #ifdef SSD #include "ssd/ssd_dialog.h" + #endif static RoadMapConfigDescriptor RoadMapConfigAccuracyMouse = *************** *** 126,129 **** --- 128,134 ---- #endif + #define SQUARE_IN_VIEW 0x1 + #define SQUARE_DRAWN 0x2 + static struct { *************** *** 725,733 **** int last_real_square = -1; int real_square = 0; RoadMapArea edges = {0, 0, 0, 0}; int real_line; int square_count = roadmap_square_count(); - char *on_canvas = calloc (square_count, sizeof(char)); for (line = first_line; line <= last_line; ++line) { --- 730,738 ---- int last_real_square = -1; int real_square = 0; + int real_square_drawn = 0; RoadMapArea edges = {0, 0, 0, 0}; int real_line; int square_count = roadmap_square_count(); for (line = first_line; line <= last_line; ++line) { *************** *** 762,773 **** last_real_square = real_square; - if (on_canvas[real_square]) { - /* Either it has already been drawn, or it will be soon. */ - continue; - } - if (roadmap_math_is_visible (&edges)) { ! on_canvas[real_square] = 1; continue; } --- 767,773 ---- last_real_square = real_square; if (roadmap_math_is_visible (&edges)) { ! real_square_drawn = 1; continue; } *************** *** 782,786 **** } ! if (on_canvas[real_square]) { /* Either it has already been drawn, or it will be soon. */ continue; --- 782,786 ---- } ! if (real_square_drawn) { /* Either it has already been drawn, or it will be soon. */ continue; *************** *** 828,833 **** } } - - free (on_canvas); } --- 828,831 ---- *************** *** 988,992 **** const char *sprite, const RoadMapGpsPosition *gps_position) { ! RoadMapPosition position; RoadMapGuiPoint screen_point; --- 986,990 ---- const char *sprite, const RoadMapGpsPosition *gps_position) { ! #ifndef J2ME RoadMapPosition position; RoadMapGuiPoint screen_point; *************** *** 1004,1018 **** roadmap_sprite_draw (sprite, &screen_point, gps_position->steering); } } ! static void roadmap_screen_reset_square_mask (void) { ! if (SquareOnScreen != NULL) { ! free(SquareOnScreen); } - SquareOnScreenCount = roadmap_square_count(); - SquareOnScreen = calloc (SquareOnScreenCount, sizeof(char)); - roadmap_check_allocated(SquareOnScreen); } --- 1002,1021 ---- roadmap_sprite_draw (sprite, &screen_point, gps_position->steering); } + #endif } ! static void roadmap_screen_alloc_square_mask (void) { ! int count = roadmap_square_count(); ! ! if (count != SquareOnScreenCount) { ! if (SquareOnScreen != NULL) { ! free(SquareOnScreen); ! } ! SquareOnScreenCount = count; ! SquareOnScreen = malloc (SquareOnScreenCount * sizeof(char)); ! roadmap_check_allocated(SquareOnScreen); } } *************** *** 1091,1098 **** --- 1094,1104 ---- if (!RoadMapScreenInitialized) return; + + #ifdef SSD if (RoadMapScreenFrozen) { ssd_dialog_draw (); return; } + #endif dbg_time_start(DBG_TIME_FULL); *************** *** 1139,1142 **** --- 1145,1149 ---- if (roadmap_locator_activate (fips[i]) != ROADMAP_US_OK) continue; + roadmap_screen_alloc_square_mask(); /* -- Look for the square that are currently visible. */ *************** *** 1152,1156 **** int pen_type = k; ! roadmap_screen_reset_square_mask(); layer_count = roadmap_layer_visible_lines (layers, 256, k); --- 1159,1166 ---- int pen_type = k; ! /* Reset square mask */ ! for (j = 0; j < count; j++) { ! SquareOnScreen[in_view[j]] = 0; ! } layer_count = roadmap_layer_visible_lines (layers, 256, k); *************** *** 1196,1200 **** --- 1206,1212 ---- roadmap_display_signs (); + #ifdef SSD ssd_dialog_draw (); + #endif roadmap_canvas_refresh (); *************** *** 1524,1527 **** --- 1536,1540 ---- void roadmap_screen_move_left (void) { + roadmap_log (ROADMAP_DEBUG, "In roadmap_screen_move_left.\n"); roadmap_screen_record_move (0 - (RoadMapScreenHeight / FRACMOVE), 0); roadmap_screen_repaint (); *************** *** 1579,1582 **** --- 1592,1596 ---- ("preferences", &RoadMapConfigMapLabels, "on", "off", NULL); + #ifndef J2ME roadmap_pointer_register_short_click (&roadmap_screen_short_click, POINTER_DEFAULT); *************** *** 1587,1590 **** --- 1601,1605 ---- roadmap_pointer_register_drag_motion (&roadmap_screen_drag_motion, POINTER_DEFAULT); + #endif roadmap_canvas_register_configure_handler (&roadmap_screen_configure); *************** *** 1616,1620 **** --- 1631,1637 ---- point.steering = RoadMapScreenRotation; + #ifndef J2ME roadmap_trip_set_mobile ("Hold", &point); + #endif } *************** *** 1661,1664 **** --- 1678,1682 ---- + #ifndef J2ME /* TODO: ugly hack (both the hack and the drawing itself are ugly!). * This should be rewritten to allow specifying a sprite for *************** *** 1747,1751 **** } } ! /* TODO: this function should either be implemented in --- 1765,1769 ---- } } ! #endif /* TODO: this function should either be implemented in *************** *** 1760,1764 **** int width, int direction) { ! static RoadMapPen direction_pen = NULL; --- 1778,1782 ---- int width, int direction) { ! #ifndef J2ME static RoadMapPen direction_pen = NULL; *************** *** 1820,1823 **** --- 1838,1842 ---- roadmap_screen_flush_points (); RoadMapScreenLastPen = NULL; + #endif } Index: roadmap_start.... [truncated message content] |