You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(92) |
Dec
(141) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(126) |
Feb
(72) |
Mar
(31) |
Apr
(200) |
May
(81) |
Jun
(130) |
Jul
(112) |
Aug
(134) |
Sep
(76) |
Oct
(89) |
Nov
(153) |
Dec
(9) |
2007 |
Jan
(59) |
Feb
(82) |
Mar
(50) |
Apr
(20) |
May
(9) |
Jun
(81) |
Jul
(41) |
Aug
(109) |
Sep
(91) |
Oct
(87) |
Nov
(33) |
Dec
(60) |
2008 |
Jan
(21) |
Feb
(15) |
Mar
(38) |
Apr
(75) |
May
(59) |
Jun
(46) |
Jul
(30) |
Aug
(20) |
Sep
(35) |
Oct
(32) |
Nov
(34) |
Dec
(19) |
2009 |
Jan
(29) |
Feb
(71) |
Mar
(54) |
Apr
(17) |
May
(4) |
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(58) |
Sep
(7) |
Oct
(7) |
Nov
(12) |
Dec
(18) |
2011 |
Jan
(17) |
Feb
(29) |
Mar
(11) |
Apr
(5) |
May
(1) |
Jun
|
Jul
|
Aug
(11) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(87) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(44) |
Jun
(79) |
Jul
(16) |
Aug
(31) |
Sep
|
Oct
(51) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Ehud S. <esh...@us...> - 2006-04-21 15:44:16
|
Update of /cvsroot/roadmap/roadmap_editor/src/agg23/font_freetype In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1797/font_freetype Log Message: Directory /cvsroot/roadmap/roadmap_editor/src/agg23/font_freetype added to the repository |
From: Ehud S. <esh...@us...> - 2006-04-21 15:43:37
|
Update of /cvsroot/roadmap/roadmap_editor/src/agg23 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1382/agg23 Log Message: Directory /cvsroot/roadmap/roadmap_editor/src/agg23 added to the repository |
From: Ehud S. <esh...@us...> - 2006-03-22 09:14:21
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32/wince_env/libdgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18785 Added Files: libdgl.vcp Log Message: Import dglib sources. --- NEW FILE: libdgl.vcp --- # Microsoft eMbedded Visual Tools Project File - Name="libdgl" - Package Owner=<4> # Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02 # ** DO NOT EDIT ** # TARGTYPE "Win32 (WCE ARMV4) Static Library" 0xa304 CFG=libdgl - Win32 (WCE ARMV4) Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "libdgl.vcn". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "libdgl.vcn" CFG="libdgl - Win32 (WCE ARMV4) Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "libdgl - Win32 (WCE ARMV4) Release" (based on "Win32 (WCE ARMV4) Static Library") !MESSAGE "libdgl - Win32 (WCE ARMV4) Debug" (based on "Win32 (WCE ARMV4) Static Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" # PROP ATL_Project 2 CPP=clarm.exe !IF "$(CFG)" == "libdgl - Win32 (WCE ARMV4) Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "ARMV4Rel" # PROP BASE Intermediate_Dir "ARMV4Rel" # PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}" # PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "ARMV4Rel" # PROP Intermediate_Dir "ARMV4Rel" # PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}" # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c # ADD CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo !ELSEIF "$(CFG)" == "libdgl - Win32 (WCE ARMV4) Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "ARMV4Dbg" # PROP BASE Intermediate_Dir "ARMV4Dbg" # PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}" # PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "ARMV4Dbg" # PROP Intermediate_Dir "ARMV4Dbg" # PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}" # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c # ADD CPP /nologo /W3 /Zi /Od /Gy /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo !ENDIF # Begin Target # Name "libdgl - Win32 (WCE ARMV4) Release" # Name "libdgl - Win32 (WCE ARMV4) Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\..\..\dglib\avl.c DEP_CPP_AVL_C=\ "..\..\..\dglib\avl.h"\ # End Source File # Begin Source File SOURCE=..\..\..\dglib\graph.c DEP_CPP_GRAPH=\ "..\..\..\dglib\avl.h"\ "..\..\..\dglib\graph.h"\ "..\..\..\dglib\graph_v1.h"\ "..\..\..\dglib\graph_v2.h"\ "..\..\..\dglib\heap.h"\ "..\..\..\dglib\helpers.h"\ "..\..\..\dglib\tavl.h"\ "..\..\..\dglib\tree.h"\ "..\..\..\dglib\type.h"\ # End Source File # Begin Source File SOURCE=..\..\..\dglib\graph_v1.c DEP_CPP_GRAPH_=\ "..\..\..\dglib\avl.h"\ "..\..\..\dglib\edgemgmt-template.c"\ "..\..\..\dglib\graph.h"\ "..\..\..\dglib\graph_v1.h"\ "..\..\..\dglib\heap.h"\ "..\..\..\dglib\helpers.h"\ "..\..\..\dglib\misc-template.c"\ "..\..\..\dglib\nodemgmt-template.c"\ "..\..\..\dglib\sp-template.c"\ "..\..\..\dglib\span-template.c"\ "..\..\..\dglib\tavl.h"\ "..\..\..\dglib\tree.h"\ "..\..\..\dglib\type.h"\ "..\..\..\dglib\v1-defs.h"\ # End Source File # Begin Source File SOURCE=..\..\..\dglib\graph_v2.c DEP_CPP_GRAPH_V=\ "..\..\..\dglib\avl.h"\ "..\..\..\dglib\edgemgmt-template.c"\ "..\..\..\dglib\graph.h"\ "..\..\..\dglib\graph_v2.h"\ "..\..\..\dglib\heap.h"\ "..\..\..\dglib\helpers.h"\ "..\..\..\dglib\misc-template.c"\ "..\..\..\dglib\nodemgmt-template.c"\ "..\..\..\dglib\sp-template.c"\ "..\..\..\dglib\span-template.c"\ "..\..\..\dglib\tavl.h"\ "..\..\..\dglib\tree.h"\ "..\..\..\dglib\type.h"\ "..\..\..\dglib\v2-defs.h"\ # End Source File # Begin Source File SOURCE=..\..\..\dglib\heap.c DEP_CPP_HEAP_=\ "..\..\..\dglib\heap.h"\ "..\..\..\dglib\type.h"\ # End Source File # Begin Source File SOURCE=..\..\..\dglib\helpers.c DEP_CPP_HELPE=\ "..\..\..\dglib\avl.h"\ "..\..\..\dglib\graph.h"\ "..\..\..\dglib\heap.h"\ "..\..\..\dglib\helpers.h"\ "..\..\..\dglib\tavl.h"\ "..\..\..\dglib\tree.h"\ "..\..\..\dglib\type.h"\ # End Source File # Begin Source File SOURCE=..\..\..\dglib\tavl.c DEP_CPP_TAVL_=\ "..\..\..\dglib\tavl.h"\ # End Source File # Begin Source File SOURCE=..\..\..\dglib\tree.c DEP_CPP_TREE_=\ "..\..\..\dglib\avl.h"\ "..\..\..\dglib\tavl.h"\ "..\..\..\dglib\tree.h"\ "..\..\..\dglib\type.h"\ # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # End Group # End Target # End Project |
From: Ehud S. <esh...@us...> - 2006-03-22 09:13:20
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32/wince_env/libdgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18323/libdgl Log Message: Directory /cvsroot/roadmap/roadmap_editor/src/win32/wince_env/libdgl added to the repository |
From: Ehud S. <esh...@us...> - 2006-03-22 08:54:55
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32/wince_env/libroadmap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8531 Modified Files: libroadmap.vcp Log Message: Add route calculation. Index: libroadmap.vcp =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/wince_env/libroadmap/libroadmap.vcp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** libroadmap.vcp 16 Dec 2005 14:43:44 -0000 1.5 --- libroadmap.vcp 22 Mar 2006 08:54:49 -0000 1.6 *************** *** 51,63 **** # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP Target_Dir "" - CPP=clarm.exe - # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Oxs /M$(CECrtMT) /c - # ADD CPP /nologo /W3 /I "./wince_os" /I "../../wince_os/" /I "../../" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Oxs /M$(CECrtMT) /c - LIB32=link.exe -lib - # ADD BASE LIB32 /nologo - # ADD LIB32 /nologo BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARM) Debug" --- 51,63 ---- # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP Target_Dir "" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo + LIB32=link.exe -lib + # ADD BASE LIB32 /nologo + # ADD LIB32 /nologo + CPP=clarm.exe + # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Oxs /M$(CECrtMT) /c + # ADD CPP /nologo /W3 /I "./wince_os" /I "../../wince_os/" /I "../../" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Oxs /M$(CECrtMT) /c !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARM) Debug" *************** *** 77,89 **** # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP Target_Dir "" - CPP=clarm.exe - # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c - # ADD CPP /nologo /W3 /Zi /Od /I "../../wince_os/" /I "../../" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /FR /YX /M$(CECrtMTDebug) /c - LIB32=link.exe -lib - # ADD BASE LIB32 /nologo - # ADD LIB32 /nologo BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE x86) Release" --- 77,89 ---- # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP Target_Dir "" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo + LIB32=link.exe -lib + # ADD BASE LIB32 /nologo + # ADD LIB32 /nologo + CPP=clarm.exe + # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c + # ADD CPP /nologo /W3 /Zi /Od /I "../../wince_os/" /I "../../" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /FR /YX /M$(CECrtMTDebug) /c !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE x86) Release" *************** *** 157,161 **** CPP=clarm.exe # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /YX /M$(CECrtMTDebug) /c ! # ADD CPP /nologo /W3 /Zi /Od /I "l:\shared\roadmap_editor\src" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /YX /M$(CECrtMTDebug) /c LIB32=link.exe -lib # ADD BASE LIB32 /nologo --- 157,161 ---- CPP=clarm.exe # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /YX /M$(CECrtMTDebug) /c ! # ADD CPP /nologo /W3 /Zi /Od /I "l:\shared\roadmap_editor\src" /I "l:\shared\roadmap_editor\src\dglib" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /YX /M$(CECrtMTDebug) /c LIB32=link.exe -lib # ADD BASE LIB32 /nologo *************** *** 183,187 **** CPP=clarm.exe # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /YX /O2 /M$(CECrtMT) /c ! # ADD CPP /nologo /W3 /I "l:\shared\roadmap_editor\src" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /YX /O2 /M$(CECrtMT) /c LIB32=link.exe -lib # ADD BASE LIB32 /nologo --- 183,187 ---- CPP=clarm.exe # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /YX /O2 /M$(CECrtMT) /c ! # ADD CPP /nologo /W3 /I "l:\shared\roadmap_editor\src" /I "l:\shared\roadmap_editor\src\dglib" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /YX /O2 /M$(CECrtMT) /c LIB32=link.exe -lib # ADD BASE LIB32 /nologo *************** *** 843,846 **** --- 843,847 ---- "..\..\..\editor\db\editor_dictionary.h"\ "..\..\..\editor\db\editor_line.h"\ + "..\..\..\editor\db\editor_override.h"\ "..\..\..\editor\db\editor_point.h"\ "..\..\..\editor\db\editor_route.h"\ *************** *** 850,853 **** --- 851,855 ---- "..\..\..\editor\db\editor_trkseg.h"\ "..\..\..\editor\editor_log.h"\ + "..\..\..\editor\editor_main.h"\ "..\..\..\editor\export\editor_export.h"\ "..\..\..\editor\track\editor_track_main.h"\ *************** *** 863,868 **** --- 865,873 ---- "..\..\..\roadmap_io.h"\ "..\..\..\roadmap_layer.h"\ + "..\..\..\roadmap_line.h"\ "..\..\..\roadmap_line_route.h"\ "..\..\..\roadmap_list.h"\ + "..\..\..\roadmap_locator.h"\ + "..\..\..\roadmap_messagebox.h"\ "..\..\..\roadmap_net.h"\ "..\..\..\roadmap_path.h"\ *************** *** 874,877 **** --- 879,883 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 1089,1092 **** --- 1095,1099 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 1246,1249 **** --- 1253,1257 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 1464,1467 **** --- 1472,1476 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 1891,1894 **** --- 1900,1904 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 2394,2397 **** --- 2404,2408 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 2547,2550 **** --- 2558,2562 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 2735,2738 **** --- 2747,2751 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 2900,2903 **** --- 2913,2917 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 3095,3098 **** --- 3109,3113 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 3281,3284 **** --- 3296,3300 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 3346,3349 **** --- 3362,3772 ---- # Begin Source File + SOURCE=..\..\..\navigate\navigate_dglib.c + + !IF "$(CFG)" == "libroadmap - Win32 (WCE ARM) Release" + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARM) Debug" + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE x86) Release" + + DEP_CPP_NAVIG=\ + "..\..\..\navigate\navigate_graph.h"\ + "..\..\..\navigate\navigate_main.h"\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_locator.h"\ + "..\..\..\roadmap_messagebox.h"\ + "..\..\..\roadmap_metadata.h"\ + "..\..\..\roadmap_path.h"\ + "..\..\..\roadmap_turns.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + + NODEP_CPP_NAVIG=\ + "..\..\..\navigate\graph.h"\ + "..\..\..\navigate\type.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE x86) Debug" + + DEP_CPP_NAVIG=\ + "..\..\..\navigate\navigate_graph.h"\ + "..\..\..\navigate\navigate_main.h"\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_locator.h"\ + "..\..\..\roadmap_messagebox.h"\ + "..\..\..\roadmap_metadata.h"\ + "..\..\..\roadmap_path.h"\ + "..\..\..\roadmap_turns.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + + NODEP_CPP_NAVIG=\ + "..\..\..\navigate\graph.h"\ + "..\..\..\navigate\type.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARMV4) Debug" + + DEP_CPP_NAVIG=\ + "..\..\..\navigate\navigate_graph.h"\ + "..\..\..\navigate\navigate_main.h"\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_locator.h"\ + "..\..\..\roadmap_messagebox.h"\ + "..\..\..\roadmap_metadata.h"\ + "..\..\..\roadmap_path.h"\ + "..\..\..\roadmap_turns.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + + NODEP_CPP_NAVIG=\ + "..\..\..\navigate\graph.h"\ + "..\..\..\navigate\type.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARMV4) Release" + + DEP_CPP_NAVIG=\ + "..\..\..\dglib\avl.h"\ + "..\..\..\dglib\graph.h"\ + "..\..\..\dglib\heap.h"\ + "..\..\..\dglib\tavl.h"\ + "..\..\..\dglib\tree.h"\ + "..\..\..\dglib\type.h"\ + "..\..\..\navigate\navigate_graph.h"\ + "..\..\..\navigate\navigate_main.h"\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_locator.h"\ + "..\..\..\roadmap_messagebox.h"\ + "..\..\..\roadmap_metadata.h"\ + "..\..\..\roadmap_path.h"\ + "..\..\..\roadmap_turns.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARMV4) Profiler" + + DEP_CPP_NAVIG=\ + "..\..\..\navigate\navigate_graph.h"\ + "..\..\..\navigate\navigate_main.h"\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_locator.h"\ + "..\..\..\roadmap_messagebox.h"\ + "..\..\..\roadmap_metadata.h"\ + "..\..\..\roadmap_path.h"\ + "..\..\..\roadmap_turns.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + + NODEP_CPP_NAVIG=\ + "..\..\..\navigate\graph.h"\ + "..\..\..\navigate\type.h"\ + + + !ENDIF + + # End Source File + # Begin Source File + + SOURCE=..\..\..\navigate\navigate_main.c + + !IF "$(CFG)" == "libroadmap - Win32 (WCE ARM) Release" + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARM) Debug" + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE x86) Release" + + DEP_CPP_NAVIGA=\ + "..\..\..\navigate\navigate_graph.h"\ + "..\..\..\navigate\navigate_main.h"\ + "..\..\..\navigate\navigate_plugin.h"\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_db_line_route.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_file.h"\ + "..\..\..\roadmap_fuzzy.h"\ + "..\..\..\roadmap_gps.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_io.h"\ + "..\..\..\roadmap_line.h"\ + "..\..\..\roadmap_line_route.h"\ + "..\..\..\roadmap_list.h"\ + "..\..\..\roadmap_math.h"\ + "..\..\..\roadmap_messagebox.h"\ + "..\..\..\roadmap_navigate.h"\ + "..\..\..\roadmap_net.h"\ + "..\..\..\roadmap_plugin.h"\ + "..\..\..\roadmap_point.h"\ + "..\..\..\roadmap_pointer.h"\ + "..\..\..\roadmap_screen.h"\ + "..\..\..\roadmap_serial.h"\ + "..\..\..\roadmap_spawn.h"\ + "..\..\..\roadmap_street.h"\ + "..\..\..\roadmap_trip.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ + + NODEP_CPP_NAVIGA=\ + "..\..\..\navigate\graph.h"\ + "..\..\..\navigate\type.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE x86) Debug" + + DEP_CPP_NAVIGA=\ + "..\..\..\navigate\navigate_graph.h"\ + "..\..\..\navigate\navigate_main.h"\ + "..\..\..\navigate\navigate_plugin.h"\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_db_line_route.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_file.h"\ + "..\..\..\roadmap_fuzzy.h"\ + "..\..\..\roadmap_gps.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_io.h"\ + "..\..\..\roadmap_line.h"\ + "..\..\..\roadmap_line_route.h"\ + "..\..\..\roadmap_list.h"\ + "..\..\..\roadmap_math.h"\ + "..\..\..\roadmap_messagebox.h"\ + "..\..\..\roadmap_navigate.h"\ + "..\..\..\roadmap_net.h"\ + "..\..\..\roadmap_plugin.h"\ + "..\..\..\roadmap_point.h"\ + "..\..\..\roadmap_pointer.h"\ + "..\..\..\roadmap_screen.h"\ + "..\..\..\roadmap_serial.h"\ + "..\..\..\roadmap_spawn.h"\ + "..\..\..\roadmap_street.h"\ + "..\..\..\roadmap_trip.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ + + NODEP_CPP_NAVIGA=\ + "..\..\..\navigate\graph.h"\ + "..\..\..\navigate\type.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARMV4) Debug" + + DEP_CPP_NAVIGA=\ + "..\..\..\navigate\navigate_graph.h"\ + "..\..\..\navigate\navigate_main.h"\ + "..\..\..\navigate\navigate_plugin.h"\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_db_line_route.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_file.h"\ + "..\..\..\roadmap_fuzzy.h"\ + "..\..\..\roadmap_gps.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_io.h"\ + "..\..\..\roadmap_line.h"\ + "..\..\..\roadmap_line_route.h"\ + "..\..\..\roadmap_list.h"\ + "..\..\..\roadmap_math.h"\ + "..\..\..\roadmap_messagebox.h"\ + "..\..\..\roadmap_navigate.h"\ + "..\..\..\roadmap_net.h"\ + "..\..\..\roadmap_plugin.h"\ + "..\..\..\roadmap_point.h"\ + "..\..\..\roadmap_pointer.h"\ + "..\..\..\roadmap_screen.h"\ + "..\..\..\roadmap_serial.h"\ + "..\..\..\roadmap_spawn.h"\ + "..\..\..\roadmap_street.h"\ + "..\..\..\roadmap_trip.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ + + NODEP_CPP_NAVIGA=\ + "..\..\..\navigate\graph.h"\ + "..\..\..\navigate\type.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARMV4) Release" + + DEP_CPP_NAVIGA=\ + "..\..\..\dglib\avl.h"\ + "..\..\..\dglib\graph.h"\ + "..\..\..\dglib\heap.h"\ + "..\..\..\dglib\tavl.h"\ + "..\..\..\dglib\tree.h"\ + "..\..\..\dglib\type.h"\ + "..\..\..\navigate\navigate_graph.h"\ + "..\..\..\navigate\navigate_main.h"\ + "..\..\..\navigate\navigate_plugin.h"\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_db_line_route.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_file.h"\ + "..\..\..\roadmap_fuzzy.h"\ + "..\..\..\roadmap_gps.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_io.h"\ + "..\..\..\roadmap_line.h"\ + "..\..\..\roadmap_line_route.h"\ + "..\..\..\roadmap_list.h"\ + "..\..\..\roadmap_math.h"\ + "..\..\..\roadmap_messagebox.h"\ + "..\..\..\roadmap_navigate.h"\ + "..\..\..\roadmap_net.h"\ + "..\..\..\roadmap_plugin.h"\ + "..\..\..\roadmap_point.h"\ + "..\..\..\roadmap_pointer.h"\ + "..\..\..\roadmap_screen.h"\ + "..\..\..\roadmap_serial.h"\ + "..\..\..\roadmap_spawn.h"\ + "..\..\..\roadmap_street.h"\ + "..\..\..\roadmap_trip.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARMV4) Profiler" + + DEP_CPP_NAVIGA=\ + "..\..\..\navigate\navigate_graph.h"\ + "..\..\..\navigate\navigate_main.h"\ + "..\..\..\navigate\navigate_plugin.h"\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_db_line_route.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_file.h"\ + "..\..\..\roadmap_fuzzy.h"\ + "..\..\..\roadmap_gps.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_io.h"\ + "..\..\..\roadmap_line.h"\ + "..\..\..\roadmap_line_route.h"\ + "..\..\..\roadmap_list.h"\ + "..\..\..\roadmap_math.h"\ + "..\..\..\roadmap_messagebox.h"\ + "..\..\..\roadmap_navigate.h"\ + "..\..\..\roadmap_net.h"\ + "..\..\..\roadmap_plugin.h"\ + "..\..\..\roadmap_point.h"\ + "..\..\..\roadmap_pointer.h"\ + "..\..\..\roadmap_screen.h"\ + "..\..\..\roadmap_serial.h"\ + "..\..\..\roadmap_spawn.h"\ + "..\..\..\roadmap_street.h"\ + "..\..\..\roadmap_trip.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ + + NODEP_CPP_NAVIGA=\ + "..\..\..\navigate\graph.h"\ + "..\..\..\navigate\type.h"\ + + + !ENDIF + + # End Source File + # Begin Source File + + SOURCE=..\..\..\navigate\navigate_plugin.c + + !IF "$(CFG)" == "libroadmap - Win32 (WCE ARM) Release" + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARM) Debug" + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE x86) Release" + + DEP_CPP_NAVIGAT=\ + "..\..\..\navigate\navigate_main.h"\ + "..\..\..\navigate\navigate_plugin.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_plugin.h"\ + "..\..\..\roadmap_types.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE x86) Debug" + + DEP_CPP_NAVIGAT=\ + "..\..\..\navigate\navigate_main.h"\ + "..\..\..\navigate\navigate_plugin.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_plugin.h"\ + "..\..\..\roadmap_types.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARMV4) Debug" + + DEP_CPP_NAVIGAT=\ + "..\..\..\navigate\navigate_main.h"\ + "..\..\..\navigate\navigate_plugin.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_plugin.h"\ + "..\..\..\roadmap_types.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARMV4) Release" + + DEP_CPP_NAVIGAT=\ + "..\..\..\navigate\navigate_main.h"\ + "..\..\..\navigate\navigate_plugin.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_plugin.h"\ + "..\..\..\roadmap_types.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARMV4) Profiler" + + DEP_CPP_NAVIGAT=\ + "..\..\..\navigate\navigate_main.h"\ + "..\..\..\navigate\navigate_plugin.h"\ + "..\..\..\roadmap_canvas.h"\ + "..\..\..\roadmap_gui.h"\ + "..\..\..\roadmap_plugin.h"\ + "..\..\..\roadmap_types.h"\ + + + !ENDIF + + # End Source File + # Begin Source File + SOURCE=..\..\..\roadmap_adjust.c *************** *** 3431,3434 **** --- 3854,3858 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 3968,3971 **** --- 4392,4396 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 4150,4153 **** --- 4575,4579 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 4318,4321 **** --- 4744,4748 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 4431,4434 **** --- 4858,4862 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 4682,4685 **** --- 5110,5114 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 4774,4777 **** --- 5203,5207 ---- "..\..\..\roadmap_serial.h"\ "..\..\..\roadmap_spawn.h"\ + "..\..\win32_serial.h"\ *************** *** 5157,5160 **** --- 5587,5591 ---- "..\..\..\roadmap_square.h"\ "..\..\..\roadmap_street.h"\ + "..\..\..\roadmap_turns.h"\ "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ *************** *** 5732,5735 **** --- 6163,6167 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 6740,6743 **** --- 7172,7176 ---- "..\..\..\roadmap_types.h"\ "..\..\roadmap_win32.h"\ + "..\..\win32_serial.h"\ *************** *** 6779,6782 **** --- 7212,7296 ---- # Begin Source File + SOURCE=..\..\..\roadmap_turns.c + + !IF "$(CFG)" == "libroadmap - Win32 (WCE ARM) Release" + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARM) Debug" + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE x86) Release" + + DEP_CPP_ROADMAP_T=\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_db_turns.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_point.h"\ + "..\..\..\roadmap_square.h"\ + "..\..\..\roadmap_turns.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE x86) Debug" + + DEP_CPP_ROADMAP_T=\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_db_turns.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_point.h"\ + "..\..\..\roadmap_square.h"\ + "..\..\..\roadmap_turns.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARMV4) Debug" + + DEP_CPP_ROADMAP_T=\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_db_turns.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_point.h"\ + "..\..\..\roadmap_square.h"\ + "..\..\..\roadmap_turns.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARMV4) Release" + + DEP_CPP_ROADMAP_T=\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_db_turns.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_point.h"\ + "..\..\..\roadmap_square.h"\ + "..\..\..\roadmap_turns.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + + + !ELSEIF "$(CFG)" == "libroadmap - Win32 (WCE ARMV4) Profiler" + + DEP_CPP_ROADMAP_T=\ + "..\..\..\roadmap.h"\ + "..\..\..\roadmap_db.h"\ + "..\..\..\roadmap_db_turns.h"\ + "..\..\..\roadmap_dbread.h"\ + "..\..\..\roadmap_point.h"\ + "..\..\..\roadmap_square.h"\ + "..\..\..\roadmap_turns.h"\ + "..\..\..\roadmap_types.h"\ + "..\..\roadmap_win32.h"\ + + + !ENDIF + + # End Source File + # Begin Source File + SOURCE=..\..\..\roadmap_voice.c |
From: Ehud S. <esh...@us...> - 2006-03-22 08:54:37
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32/wince_env In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8458 Modified Files: Roadmap.vcw Log Message: Add route calculation. Index: Roadmap.vcw =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/wince_env/Roadmap.vcw,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Roadmap.vcw 15 Oct 2005 22:19:21 -0000 1.1.1.1 --- Roadmap.vcw 22 Mar 2006 08:54:34 -0000 1.2 *************** *** 1,7 **** ! Microsoft eMbedded Visual Tools Workspace File, Format Version 3.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "RoadGPS"=.\RoadGPS\RoadGPS.vcp - Package Owner=<4> --- 1,25 ---- ! Microsoft eMbedded Visual Tools Workspace File, Format Version 4.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### + Project: "ComSplit"=C:\Projects\ComSplit\ComSplit.vcp - Package Owner=<4> + + Package=<5> + {{{ + }}} + + Package=<4> + {{{ + Begin Project Dependency + Project_Dep_Name libosroadmap + End Project Dependency + Begin Project Dependency + Project_Dep_Name libroadmap + End Project Dependency + }}} + + ############################################################################### + Project: "RoadGPS"=.\RoadGPS\RoadGPS.vcp - Package Owner=<4> *************** *** 56,59 **** --- 74,110 ---- Project_Dep_Name libwinceguiroadmap End Project Dependency + Begin Project Dependency + Project_Dep_Name libdgl + End Project Dependency + }}} + + ############################################################################### + + Project: "driver_test"=.\driver_test\driver_test.vcp - Package Owner=<4> + + Package=<5> + {{{ + }}} + + Package=<4> + {{{ + Begin Project Dependency + Project_Dep_Name libosroadmap + End Project Dependency + Begin Project Dependency + Project_Dep_Name libroadmap + End Project Dependency + }}} + + ############################################################################### + + Project: "libdgl"=.\libdgl\libdgl.vcp - Package Owner=<4> + + Package=<5> + {{{ + }}} + + Package=<4> + {{{ }}} |
From: Ehud S. <esh...@us...> - 2006-03-22 08:54:16
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8159 Modified Files: roadmap_main.cpp wince_input_mon.c Log Message: Fix wince events bug. Index: wince_input_mon.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/wince_input_mon.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wince_input_mon.c 17 Mar 2006 09:59:00 -0000 1.5 --- wince_input_mon.c 22 Mar 2006 08:54:10 -0000 1.6 *************** *** 41,45 **** DCB dcb; COMMTIMEOUTS ct; ! hCommPort = CreateFile (url_unicode, GENERIC_READ | GENERIC_WRITE, --- 41,45 ---- DCB dcb; COMMTIMEOUTS ct; ! hCommPort = CreateFile (url_unicode, GENERIC_READ | GENERIC_WRITE, *************** *** 208,212 **** /* Send a message to main window so it can read. */ ! SendMessage(RoadMapMainWindow, WM_USER_READ, (WPARAM)data, 0); } --- 208,212 ---- /* Send a message to main window so it can read. */ ! SendMessage(RoadMapMainWindow, WM_USER_READ, (WPARAM)data, 1); } *************** *** 229,233 **** { /* Send a message to main window so it can read. */ ! SendMessage(RoadMapMainWindow, WM_USER_READ, (WPARAM)data, 0); } --- 229,233 ---- { /* Send a message to main window so it can read. */ ! SendMessage(RoadMapMainWindow, WM_USER_READ, (WPARAM)data, 1); } Index: roadmap_main.cpp =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/roadmap_main.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** roadmap_main.cpp 31 Dec 2005 09:58:00 -0000 1.6 --- roadmap_main.cpp 22 Mar 2006 08:54:10 -0000 1.7 *************** *** 107,111 **** return FALSE; } ! ShowWindow(RoadMapMainWindow, nCmdShow); UpdateWindow(RoadMapMainWindow); --- 107,129 ---- return FALSE; } ! ! /* ! DWORD disp; ! HKEY key; ! ! LONG res_key = RegCreateKeyEx(HKEY_LOCAL_MACHINE, _T("RoadMap"), ! 0, NULL, REG_OPTION_NON_VOLATILE, 0, NULL, &key, &disp); ! RegSetValueEx(key, _T("Dll"), 0, REG_SZ, (unsigned char*)_T("ComSplit.dll"), 26); ! RegSetValueEx(key, _T("Prefix"), 0, REG_SZ, (unsigned char*)_T("COM"), 8); ! disp = 4; ! RegSetValueEx(key, _T("Index"), 0, REG_DWORD, (unsigned char*)&disp, sizeof(DWORD)); ! ! RegCloseKey(key); ! ! //res = RegisterDevice(_T("COM"), 4, _T("ComSplit.dll"), 0); ! HANDLE res = ActivateDevice(_T("RoadMap"), NULL); ! ! res = res; ! */ ShowWindow(RoadMapMainWindow, nCmdShow); UpdateWindow(RoadMapMainWindow); *************** *** 391,399 **** { roadmap_main_io *context = (roadmap_main_io *) wParam; ! Win32SerialConn *conn = (Win32SerialConn *) lParam; ! if (!ROADMAP_SERIAL_IS_VALID (conn)) { ! /* An old input which was removed */ ! break; } --- 409,420 ---- { roadmap_main_io *context = (roadmap_main_io *) wParam; ! ! if (lParam != 1) { ! Win32SerialConn *conn = (Win32SerialConn *) lParam; ! if (!ROADMAP_SERIAL_IS_VALID (conn)) { ! /* An old input which was removed */ ! break; ! } } |
From: Ehud S. <esh...@us...> - 2006-03-22 08:53:18
|
Update of /cvsroot/roadmap/roadmap_editor/src/navigate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7864 Added Files: navigate_dglib.c navigate_graph.h navigate_main.c navigate_main.h navigate_plugin.c navigate_plugin.h Log Message: Navigate plugin. --- NEW FILE: navigate_main.c --- /* navigate_main.c - main navigate plugin file * * LICENSE: * * Copyright 2006 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * SYNOPSYS: * * See navigate_main.h */ #include <stdio.h> #include <string.h> #include "type.h" #include "graph.h" #include "roadmap.h" #include "roadmap_pointer.h" #include "roadmap_plugin.h" #include "roadmap_line.h" #include "roadmap_messagebox.h" #include "roadmap_canvas.h" #include "roadmap_street.h" #include "roadmap_trip.h" #include "roadmap_navigate.h" #include "roadmap_screen.h" #include "roadmap_line_route.h" #include "roadmap_math.h" #include "roadmap_point.h" #include "navigate_plugin.h" #include "navigate_graph.h" #include "navigate_main.h" int NavigateEnabled = 0; int NavigatePluginID = -1; static int NavigateTrackEnabled = 0; static RoadMapPen NavigatePen; #define MAX_NAV_SEGEMENTS 100 int NavigateSegments[MAX_NAV_SEGEMENTS]; int NavigateNumSegments = 0; static int navigate_find_track_points (int *from_line, int *from_point, int *to_line, int *to_point) { const RoadMapPosition *position; RoadMapPosition from_position; RoadMapPosition to_position; PluginLine line; int distance; int from_tmp; int to_tmp; position = roadmap_trip_get_position ("Departure"); if (!position) return -1; if ((roadmap_navigate_retrieve_line (position, 20, &line, &distance) == -1) || (roadmap_plugin_get_id (&line) != ROADMAP_PLUGIN_ID)) { roadmap_messagebox ("Error", "Can't find a road near departure point."); return -1; } *from_line = roadmap_plugin_get_line_id (&line); switch (roadmap_line_route_get_direction (*from_line, ROUTE_CAR_ALLOWED)) { case ROUTE_DIRECTION_ANY: case ROUTE_DIRECTION_NONE: roadmap_line_points (*from_line, &from_tmp, &to_tmp); roadmap_point_position (from_tmp, &from_position); roadmap_point_position (to_tmp, &to_position); if (roadmap_math_distance (position, &from_position) < roadmap_math_distance (position, &to_position)) { *from_point = from_tmp; } else { *from_point = to_tmp; } break; case ROUTE_DIRECTION_WITH_LINE: roadmap_line_points (*from_line, &from_tmp, from_point); break; case ROUTE_DIRECTION_AGAINST_LINE: roadmap_line_points (*from_line, from_point, &from_tmp); break; default: roadmap_line_points (*from_line, &from_tmp, to_point); } position = roadmap_trip_get_position ("Destination"); if (!position) return -1; if ((roadmap_navigate_retrieve_line (position, 20, &line, &distance) == -1) || (roadmap_plugin_get_id (&line) != ROADMAP_PLUGIN_ID)) { roadmap_messagebox ("Error", "Can't find a road near destination point."); return -1; } *to_line = roadmap_plugin_get_line_id (&line); switch (roadmap_line_route_get_direction (*to_line, ROUTE_CAR_ALLOWED)) { case ROUTE_DIRECTION_ANY: case ROUTE_DIRECTION_NONE: roadmap_line_points (*to_line, &from_tmp, &to_tmp); roadmap_point_position (from_tmp, &from_position); roadmap_point_position (to_tmp, &to_position); if (roadmap_math_distance (position, &from_position) < roadmap_math_distance (position, &to_position)) { *to_point = from_tmp; } else { *to_point = to_tmp; } break; case ROUTE_DIRECTION_WITH_LINE: roadmap_line_points (*to_line, &to_tmp, to_point); break; case ROUTE_DIRECTION_AGAINST_LINE: roadmap_line_points (*to_line, to_point, &to_tmp); break; default: roadmap_line_points (*to_line, &to_tmp, to_point); } return 0; } int navigate_is_enabled (void) { return NavigateEnabled; } void navigate_main_initialize (void) { NavigatePen = roadmap_canvas_create_pen ("NavigatePen1"); roadmap_canvas_set_foreground ("blue"); roadmap_canvas_set_thickness (3); navigate_main_set (1); NavigatePluginID = navigate_plugin_register (); } void navigate_main_set (int status) { if (status && NavigateEnabled) { return; } else if (!status && !NavigateEnabled) { return; } NavigateEnabled = status; } void navigate_main_calc_route () { int track_time; int from_line; int to_line; int from_point; int to_point; NavigateNumSegments = MAX_NAV_SEGEMENTS - 2; if (navigate_load_data () < 0) return; if (navigate_find_track_points (&from_line, &from_point, &to_line, &to_point) < 0) { return; } track_time = navigate_get_route_segments (from_point, to_point, NavigateSegments, &NavigateNumSegments); if (track_time <= 0) { NavigateTrackEnabled = 0; if (track_time < 0) { roadmap_messagebox("Error", "Error calculating route."); } else { roadmap_messagebox("Error", "Can't find a route."); } } else { char msg[200]; int i; int length = 0; if (NavigateSegments[0] != from_line) { memmove (&NavigateSegments[1], &NavigateSegments[0], NavigateNumSegments * sizeof(NavigateSegments[0])); NavigateNumSegments++; NavigateSegments[0] = from_line; } if (NavigateSegments[NavigateNumSegments-1] != to_line) { NavigateSegments[NavigateNumSegments++] = to_line; } for (i=0; i<NavigateNumSegments; i++) { length += roadmap_line_length (NavigateSegments[i]); } snprintf(msg, sizeof(msg), "Length: %.1f km\nTime: %.1f minutes", length/1000.0, track_time/60.0); NavigateTrackEnabled = 1; roadmap_screen_redraw (); roadmap_messagebox ("Route found", msg); } } int navigate_main_override_pen (int line, int cfcc, int fips, int pen_type, RoadMapPen *override_pen) { int j; for (j=0; j<NavigateNumSegments; j++) { if (line == NavigateSegments[j]) { *override_pen = NavigatePen; return 1; } } *override_pen = NULL; return 0; } --- NEW FILE: navigate_plugin.h --- /* navigate_plugin.h - Editor plugin interfaces * * LICENSE: * * Copyright 2005 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef INCLUDE__NAVIGATE_PLUGIN__H #define INCLUDE__NAVIGATE_PLUGIN__H int navigate_plugin_register (void); void navigate_plugin_unregister (int plugin_id); #endif // INCLUDE__NAVIGATE_PLUGIN__H --- NEW FILE: navigate_dglib.c --- /* navigate_dglib.c - dglib implementation navigate_graph functions * * LICENSE: * * Copyright 2006 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * SYNOPSYS: * * See navigate_dglib.h */ #include <stdio.h> #include <stdlib.h> #include "type.h" #include "graph.h" #include "roadmap.h" #include "roadmap_path.h" #include "roadmap_locator.h" #include "roadmap_turns.h" #include "roadmap_metadata.h" #include "roadmap_messagebox.h" #include "navigate_main.h" #include "navigate_graph.h" static int fips_data_loaded = 0; static dglGraph_s graph; static dglSPCache_s spCache; static int clipper ( dglGraph_s * pgraph , dglSPClipInput_s * pIn , dglSPClipOutput_s * pOut , void * pvarg /* caller's pointer */ ) { if ( roadmap_turns_find_restriction ( dglNodeGet_Id(pgraph, pIn->pnNodeFrom), dglEdgeGet_Id(pgraph, pIn->pnPrevEdge), dglEdgeGet_Id(pgraph, pIn->pnEdge))) { /* printf( " discarder.\n" ); */ return 1; } return 0; } int navigate_load_data (void) { FILE *fd; int nret; char path[255]; int fips; time_t map_unix_time; const char *sequence; fips = roadmap_locator_active (); if (fips_data_loaded == fips) return 0; sequence = roadmap_path_first("maps"); if (sequence == NULL) { return -1; } do { snprintf (path, sizeof(path), "%s/usc%05d.dgl", sequence, fips); fd = fopen( path, "rb" ); if ( fd != NULL ) break; sequence = roadmap_path_next("maps", sequence); } while (sequence != NULL); if ( fd == NULL ) { roadmap_messagebox ("Error", "Can't find route data."); return -1; } nret = dglRead( & graph , fd ); fclose( fd ); if ( nret < 0 ) { roadmap_messagebox ("Error", "Can't load route data."); return -1; } map_unix_time = atoi (roadmap_metadata_get_attribute ("Version", "UnixTime")); if ((time_t) *dglGet_Opaque (&graph) != map_unix_time) { roadmap_messagebox ("Error", "Navigation data is too old."); return -1; } dglInitializeSPCache( & graph, & spCache ); fips_data_loaded = fips; return 0; } int navigate_get_route_segments (int from, int to, int *segments, int *size) { int i; int nret; int total_cost; dglSPReport_s *pReport; if (fips_data_loaded != roadmap_locator_active ()) return -1; nret = dglShortestPath (&graph, &pReport, from, to, clipper, NULL, &spCache); if (nret <= 0) return nret; if (pReport->cArc > *size) return -1; total_cost = pReport->nDistance; *size = pReport->cArc; for(i=0; i < pReport->cArc ;i++) { segments[i] = dglEdgeGet_Id(&graph, pReport->pArc[i].pnEdge); if (segments[i] < 0) { segments[i] = abs(segments[i]); } /* printf( "edge[%d]: from %ld to %ld - travel cost %ld - user edgeid %ld - distance from start node %ld\n" , i, pReport->pArc[i].nFrom, pReport->pArc[i].nTo, dglEdgeGet_Cost(&graph, pReport->pArc[i].pnEdge), * this is the cost from clip() * dglEdgeGet_Id(&graph, pReport->pArc[i].pnEdge), pReport->pArc[i].nDistance ); */ } dglFreeSPReport(&graph, pReport); return total_cost; } --- NEW FILE: navigate_plugin.c --- /* navigate_plugin.c - implement plugin interfaces * * LICENSE: * * Copyright 2005 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * SYNOPSYS: * * See navigate_plugin.h */ #include <stdlib.h> #include "roadmap_plugin.h" #include "navigate_main.h" #include "navigate_plugin.h" static RoadMapPluginHooks navigate_plugin_hooks = { NULL, NULL, NULL, NULL, NULL, &navigate_main_override_pen, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; int navigate_plugin_register (void) { return roadmap_plugin_register (&navigate_plugin_hooks); } void navigate_plugin_unregister (int plugin_id) { roadmap_plugin_unregister (plugin_id); } --- NEW FILE: navigate_graph.h --- /* navigate_graph.h - generic navigate functions * * LICENSE: * * Copyright 2006 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ifndef _NAVIGATE_GRAPH_H_ #define _NAVIGATE_GRAPH_H_ int navigate_load_data (void); int navigate_get_route_segments (int from, int to, int *segments, int *size); #endif /* _NAVIGATE_GRAPH_H_ */ --- NEW FILE: navigate_main.h --- /* navigate_main.h - main plugin file * * LICENSE: * * Copyright 2006 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ifndef INCLUDE__NAVIGATE_MAIN__H #define INCLUDE__NAVIGATE_MAIN__H #include "roadmap_canvas.h" int navigate_is_enabled (void); void navigate_main_initialize (void); void navigate_main_set (int status); void navigate_main_calc_route (void); int navigate_main_override_pen (int line, int cfcc, int fips, int pen_type, RoadMapPen *override_pen); #endif /* INCLUDE__NAVIGATE_MAIN__H */ |
From: Ehud S. <esh...@us...> - 2006-03-22 08:52:55
|
Update of /cvsroot/roadmap/roadmap_editor/src/gtk2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7498 Modified Files: Makefile Log Message: Add route calculation. Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/gtk2/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile 17 Mar 2006 09:56:32 -0000 1.3 --- Makefile 22 Mar 2006 08:52:52 -0000 1.4 *************** *** 49,53 **** CFLAGS = $(STDCFLAGS) $(GPECFLAGS) $(GUICFLAGS) -I.. -I/usr/local/include -DNDEBUG ! LIBS = -L/usr/local/lib $(RDMLIBS) $(GPELDFLAGS) $(GUILDFLAGS) -lm # --- RoadMap sources & targets ----------------------------------- --- 49,53 ---- CFLAGS = $(STDCFLAGS) $(GPECFLAGS) $(GUICFLAGS) -I.. -I/usr/local/include -DNDEBUG ! LIBS = -L/usr/local/lib $(RDMLIBS) $(GPELDFLAGS) $(GUILDFLAGS) -lm -L ../dglib -ldgl # --- RoadMap sources & targets ----------------------------------- |
From: Ehud S. <esh...@us...> - 2006-03-22 08:52:15
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7178 Modified Files: editor_screen.c Log Message: Add route calculation. Index: editor_screen.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/editor_screen.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** editor_screen.c 12 Dec 2005 20:44:44 -0000 1.6 --- editor_screen.c 22 Mar 2006 08:52:12 -0000 1.7 *************** *** 187,192 **** } ! select_count = 0; ! roadmap_screen_redraw (); return; --- 187,191 ---- } ! editor_screen_reset_selected (); return; *************** *** 226,232 **** (&position, 20, &line, &distance) == -1) { - select_count = 0; roadmap_display_hide ("Selected Street"); ! roadmap_screen_redraw (); return; } --- 225,230 ---- (&position, 20, &line, &distance) == -1) { roadmap_display_hide ("Selected Street"); ! editor_screen_reset_selected (); return; } *************** *** 245,248 **** --- 243,250 ---- select_count--; + if (!select_count) { + roadmap_pointer_register_long_click (SaveLongClickHandler); + } + } else { *************** *** 250,253 **** --- 252,259 ---- SelectedLines[select_count].line = line; + if (!select_count) { + SaveLongClickHandler = roadmap_pointer_register_long_click + (editor_screen_long_click); + } select_count++; } *************** *** 712,725 **** SaveShortClickHandler = roadmap_pointer_register_short_click (editor_screen_short_click); - SaveLongClickHandler = roadmap_pointer_register_long_click - (editor_screen_long_click); - - /* TODO: remove this call */ roadmap_layer_adjust(); } else { roadmap_pointer_register_short_click (SaveShortClickHandler); ! roadmap_pointer_register_long_click (SaveLongClickHandler); ! select_count = 0; } } --- 718,729 ---- SaveShortClickHandler = roadmap_pointer_register_short_click (editor_screen_short_click); roadmap_layer_adjust(); } else { roadmap_pointer_register_short_click (SaveShortClickHandler); ! if (select_count) { ! roadmap_pointer_register_long_click (SaveLongClickHandler); ! select_count = 0; ! } } } *************** *** 728,731 **** --- 732,739 ---- void editor_screen_reset_selected (void) { + if (select_count) { + roadmap_pointer_register_long_click (SaveLongClickHandler); + } + select_count = 0; roadmap_screen_redraw (); |
Update of /cvsroot/roadmap/roadmap_editor/src/dglib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6788 Added Files: avl.c avl.h BUGS COPYING dgl.h dglib.dox edgemgmt-template.c graph.c graph.h graph_v1.c graph_v1.h graph_v2.c graph_v2.h heap.c heap.h helpers.c helpers.h Makefile Makefile.alone misc-template.c nodemgmt-template.c README sp-template.c span-template.c tavl.c tavl.h tree.c tree.h type.h v1-defs.h v2-defs.h Log Message: Import dglib sources. --- NEW FILE: v2-defs.h --- /* * Copyright (C) 2002 Roberto Micarelli * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* * best view tabstop=4 */ #define _DGL_V2 1 #undef _DGL_V1 /* * Define function names */ #if defined(DGL_DEFINE_TREE_PROCS) || defined(DGL_DEFINE_FLAT_PROCS) /* sp-template */ #undef DGL_SP_DIJKSTRA_FUNC #undef DGL_SPAN_DEPTHFIRST_SPANNING_FUNC #undef DGL_SPAN_MINIMUM_SPANNING_FUNC #undef _DGL_OUTEDGESET #undef _DGL_INEDGESET #undef _DGL_EDGE_TAILNODE #undef _DGL_EDGE_HEADNODE #endif /* * TREE version algorithms */ #if defined(DGL_DEFINE_TREE_PROCS) /* sp-template */ #define DGL_SP_DIJKSTRA_FUNC dgl_dijkstra_V2_TREE /* span-template */ #define DGL_SPAN_DEPTHFIRST_SPANNING_FUNC dgl_span_depthfirst_spanning_V2_TREE #define DGL_SPAN_MINIMUM_SPANNING_FUNC dgl_span_minimum_spanning_V2_TREE /* portable actions */ #define _DGL_OUTEDGESET(pg,pn) DGL_GET_NODE_OUTEDGESET_FUNC(pg,pn) #define _DGL_INEDGESET(pg,pn) DGL_GET_NODE_INEDGESET_FUNC(pg,pn) #define _DGL_EDGE_HEADNODE(pg,pl) DGL_GET_NODE_FUNC(pg, DGL_EDGE_HEADNODE_OFFSET(pl)) #define _DGL_EDGE_TAILNODE(pg,pl) DGL_GET_NODE_FUNC(pg, DGL_EDGE_TAILNODE_OFFSET(pl)) #endif /* * FLAT version algorithms */ #if defined(DGL_DEFINE_FLAT_PROCS) /* sp-template */ #define DGL_SP_DIJKSTRA_FUNC dgl_dijkstra_V2_FLAT /* span-template */ #define DGL_SPAN_DEPTHFIRST_SPANNING_FUNC dgl_span_depthfirst_spanning_V2_FLAT #define DGL_SPAN_MINIMUM_SPANNING_FUNC dgl_span_minimum_spanning_V2_FLAT /* portable actions */ #define _DGL_OUTEDGESET(pg,pn) DGL_EDGEBUFFER_SHIFT(pg, DGL_NODE_EDGESET_OFFSET(pn)) #define _DGL_INEDGESET(pg,pn) ((dglInt32_t*)(DGL_EDGEBUFFER_SHIFT(pg, DGL_NODE_EDGESET_OFFSET(pn))) + \ *(dglInt32_t*)(DGL_EDGEBUFFER_SHIFT(pg, DGL_NODE_EDGESET_OFFSET(pn))) + 1) #define _DGL_EDGE_HEADNODE(pg,pl) DGL_NODEBUFFER_SHIFT(pg, DGL_EDGE_HEADNODE_OFFSET(pl)) #define _DGL_EDGE_TAILNODE(pg,pl) DGL_NODEBUFFER_SHIFT(pg, DGL_EDGE_TAILNODE_OFFSET(pl)) #endif #if !defined(DGL_DEFINE_TREE_PROCS) && !defined(DGL_DEFINE_FLAT_PROCS) /* sp-template */ #define DGL_SP_CACHE_INITIALIZE_FUNC dgl_sp_cache_initialize_V2 #define DGL_SP_CACHE_RELEASE_FUNC dgl_sp_cache_release_V2 #define DGL_SP_CACHE_REPORT_FUNC dgl_sp_cache_report_V2 #define DGL_SP_CACHE_DISTANCE_FUNC dgl_sp_cache_distance_V2 /* nodemgmt-template */ #define DGL_ADD_NODE_FUNC dgl_add_node_V2 #define DGL_DEL_NODE_OUTEDGE_FUNC dgl_del_node_outedge_V2 #define DGL_DEL_NODE_INEDGE_FUNC dgl_del_node_inedge_V2 #define DGL_DEL_NODE_FUNC dgl_del_node_V2 #define DGL_GET_NODE_FUNC dgl_get_node_V2 #define DGL_GET_NODE_OUTEDGESET_FUNC dgl_getnode_outedgeset_V2 #define DGL_GET_NODE_INEDGESET_FUNC dgl_getnode_inedgeset_V2 /* edgemgmt-template */ #define DGL_ADD_EDGE_FUNC dgl_add_edge_V2 #define DGL_GET_EDGE_FUNC dgl_get_edge_V2 #define DGL_DEL_EDGE_FUNC dgl_del_edge_V2 /* misc-template */ #define DGL_EDGE_T_INITIALIZE_FUNC dgl_edge_t_initialize_V2 #define DGL_EDGE_T_RELEASE_FUNC dgl_edge_t_release_V2 #define DGL_EDGE_T_FIRST_FUNC dgl_edge_t_first_V2 #define DGL_EDGE_T_NEXT_FUNC dgl_edge_t_next_V2 #define DGL_NODE_T_INITIALIZE_FUNC dgl_node_t_initialize_V2 #define DGL_NODE_T_RELEASE_FUNC dgl_node_t_release_V2 #define DGL_NODE_T_FIRST_FUNC dgl_node_t_first_V2 #define DGL_NODE_T_NEXT_FUNC dgl_node_t_next_V2 #define DGL_NODE_T_FIND_FUNC dgl_node_t_find_V2 #define DGL_EDGESET_T_INITIALIZE_FUNC dgl_edgeset_t_initialize_V2 #define DGL_EDGESET_T_RELEASE_FUNC dgl_edgeset_t_release_V2 #define DGL_EDGESET_T_FIRST_FUNC dgl_edgeset_t_first_V2 #define DGL_EDGESET_T_NEXT_FUNC dgl_edgeset_t_next_V2 #define DGL_FLATTEN_FUNC dgl_flatten_V2 #define DGL_UNFLATTEN_FUNC dgl_unflatten_V2 /* * */ /* Node */ #define DGL_NODE_ALLOC DGL_NODE_ALLOC_v2 #define DGL_NODE_SIZEOF DGL_NODE_SIZEOF_v2 #define DGL_NODE_WSIZE DGL_NODE_WSIZE_v2 #define DGL_NODE_STATUS DGL_NODE_STATUS_v2 #define DGL_NODE_ID DGL_NODE_ID_v2 #define DGL_NODE_ATTR_PTR DGL_NODE_ATTR_PTR_v2 #define DGL_NODE_EDGESET_OFFSET DGL_NODE_EDGESET_OFFSET_v2 /* Edge */ #define DGL_EDGE_ALLOC DGL_EDGE_ALLOC_v2 #define DGL_EDGE_SIZEOF DGL_EDGE_SIZEOF_v2 #define DGL_EDGE_WSIZE DGL_EDGE_WSIZE_v2 #define DGL_EDGE_STATUS DGL_EDGE_STATUS_v2 #define DGL_EDGE_COST DGL_EDGE_COST_v2 #define DGL_EDGE_ID DGL_EDGE_ID_v2 #define DGL_EDGE_ATTR_PTR DGL_EDGE_ATTR_PTR_v2 #define DGL_EDGE_HEADNODE_OFFSET DGL_EDGE_HEADNODE_OFFSET_v2 #define DGL_EDGE_TAILNODE_OFFSET DGL_EDGE_TAILNODE_OFFSET_v2 /* Edgeset */ #define DGL_ILA_TOARR DGL_ILA_TOARR_v2 #define DGL_EDGESET_OFFSET DGL_EDGESET_OFFSET_v2 #define DGL_EDGESET_EDGEARRAY_PTR DGL_EDGESET_EDGEARRAY_PTR_v2 #define DGL_EDGESET_EDGECOUNT DGL_EDGESET_EDGECOUNT_v2 #define DGL_EDGESET_EDGE_PTR DGL_EDGESET_EDGE_PTR_v2 #define DGL_EDGESET_ALLOC DGL_EDGESET_ALLOC_v2 #define DGL_EDGESET_REALLOC DGL_EDGESET_REALLOC_v2 #define DGL_EDGESET_SIZEOF DGL_EDGESET_SIZEOF_v2 #define DGL_EDGESET_WSIZE DGL_EDGESET_WSIZE_v2 /* Misc */ #define DGL_NODEBUFFER_SHIFT DGL_NODEBUFFER_SHIFT_v2 #define DGL_NODEBUFFER_OFFSET DGL_NODEBUFFER_OFFSET_v2 #define DGL_EDGEBUFFER_SHIFT DGL_EDGEBUFFER_SHIFT_v2 #define DGL_EDGEBUFFER_OFFSET DGL_EDGEBUFFER_OFFSET_v2 #define DGL_FOREACH_NODE DGL_FOREACH_NODE_v2 #define DGL_FOREACH_EDGE DGL_FOREACH_EDGE_v2 /* * Tree-node portability */ #define DGL_T_NODEITEM_TYPE dglTreeNode2_s #define DGL_T_NODEITEM_NodePTR(p) ((p)->pv) #define DGL_T_NODEITEM_Set_NodePTR(p,ptr) ((p)->pv=(ptr)) #define DGL_T_NODEITEM_OutEdgesetPTR(p) ((p)->pv2) #define DGL_T_NODEITEM_Set_OutEdgesetPTR(p,ptr) ((p)->pv2=(ptr)) #define DGL_T_NODEITEM_InEdgesetPTR(p) ((p)->pv3) #define DGL_T_NODEITEM_Set_InEdgesetPTR(p,ptr) ((p)->pv3=(ptr)) #define DGL_T_NODEITEM_Compare dglTreeNode2Compare #define DGL_T_NODEITEM_Cancel dglTreeNode2Cancel #define DGL_T_NODEITEM_Add dglTreeNode2Add #define DGL_T_NODEITEM_Alloc dglTreeNode2Alloc #endif --- NEW FILE: helpers.h --- /* LIBDGL -- a Directed Graph Library implementation * Copyright (C) 2002 Roberto Micarelli * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* * best view tabstop=4 */ #ifndef _DGL_HELPERS_H_ #define _DGL_HELPERS_H_ #include "tree.h" extern unsigned char * dgl_mempush( unsigned char * pstack , long * istack , long size , void * pv ); extern unsigned char * dgl_mempop( unsigned char * pstack , long * istack , long size ); extern void dgl_swapInt32Bytes( dglInt32_t * pn ); extern void dgl_swapInt64Bytes( dglInt64_t * pn ); extern int dgl_edge_prioritizer_del(dglGraph_s * pG, dglInt32_t nId, dglInt32_t nPriId); extern int dgl_edge_prioritizer_add(dglGraph_s * pG, dglInt32_t nId, dglInt32_t nPriId); extern void * dgl_reduce_edgeset(void * pvSet, int * pc, dglInt32_t nKey); __END_DECLS #endif --- NEW FILE: dglib.dox --- /*! \page dglib Directed Graph Library by GRASS Development Team http://grass.itc.it/dglib/ \section intro Introduction The Directed Graph Library or DGLib (Micarelli 2002) provides functionality for vector network analysis. This library released under GPL is hosted by the GRASS project (in the CVS server). As stand-alone library it may also be used by other software project. A graph is a system of logical connections between a collection of objects called vertices. Graphs are usually represented by a picture, so that each vertex is shown as a point, with the connections shown as line segments. These vertices are also commonly referred to as nodes, edges referred to as arcs. A directed graph (digraph) consists of a finite set of vertices, and a finite set of edges, where an edge is an ordered pair of vertices. A directed graph has the property that edges have a direction, this is the reason for defining an edge as an ordered pair of vertices often referred to as the head and the tail of the edge. The original design idea behind DGLib was to support middle sized graphs in RAM with a near-static structure that doesn't need to be dynamically modified by the user program; ability to read graphs from input streams and process them with no needle to rebuild internal trees. A representation has been defined, where graph data is stored in 32bit word arrays and each element pointer is converted to a relative offset. This representation is serializable from/to input/output streams and allows fast load-and-use processing. Graphs need to be de-serialized in order to be edited. In further refactorings the library has evolved to support dynamic changes and state-independent algorithm (algorithms can be run on both serializable or editable graphs). DGLib defines a serializable graph as being in FLAT state and a editable graph as being in TREE state. The implementation makes intensive use of libavl (http://www.msu.edu/~pfaffben/avl/) AVL data structures to support TREE state. So far DGLib defines three different graph versions, version 1 supports directed graph with a weak concept of the edge, it can support many applications where one doesn't need to know about the input edges of a node (in-degree) and where there is no requirement to directly retrieve edges by their identifier but only by head/tail combinations. Version 2 adds in-degree support and a true edge addressing, yet supporting directed graph. Version 3 uses the same internal representation of version 2 but activates code branches to support undirected graphs. The DGLib user can control a number of static features and can attach a arbitrary amount of data to each node (node-attributes) and each edge (edge-attributes). Attributes are not considered to be part of the graph structure and can be edited also when the graph is in FLAT state. Graph traversal in neither recursive nor hook (callback) based, but built on the use of traversers for nodes and edges. By default, traversal is ordered by node and edge identifiers but can optionally be ordered by other means. For example, it is often useful to visit edges on a weight order} basis (greedy algorithm), this is possible via prioritizers that are activated by setting specific graph options. Both preemptive (blocking) and non-preemptive (non-blocking/multiplexed) I/O is supported, although GRASS does not actually use graph storage it may be easily required by any other library user. Thread safety is so far ensured by a data separation design that keeps all application context states into stack containers, whose life cycle is controlled by the user program. Each graph is a separate container and two or more graphs never conflict. In addition algorithms (ie. shortest path) can safely share the same graph, while concurrent editing on the same graph is unsafe. As DGLib is under development, only a bunch of polynomial time algorithms have been implemented, and the basic structure is being stressed to be a mature core to possibly time wasting computations. Current algorithms are: shortest path, depth spanning, and minimum spanning. Spanning algorithms silently behave as arborescenses when applied to directed graphs. A clip callback function, optionally supplied by the user, comes called by the library while traversing the graph in order to alter default algorithm behavior (i.e. user can control access to specific graph segments while computing shortest path). The Directed Graph Library library provides functionality to assign costs to lines and/or nodes. That means that costs can be accumulated while traveling along polylines. The user can assign individual costs to all lines and/or nodes of a vector map and later calculate shortest path connections based on the accumulated costs. Applications are transport analysis, connectivity and more. Text based on:<br> R. Blazek, M. Neteler, and R. Micarelli. The new GRASS 5.1 vector architecture. In Open source GIS - GRASS users conference 2002, Trento, Italy, 11-13 September 2002. University of Trento, Italy, 2002. <a href="http://www.ing.unitn.it/%7Egrass/conferences/GRASS2002/proceedings/proceedings/pdfs/Blazek_Radim.pdf">http://www.ing.unitn.it/~grass/conferences/GRASS2002/proceedings/proceedings/pdfs/Blazek_Radim.pdf</a> \section seealso See Also GRASS 6 Vector Architecture \ref Vector_Library Last change: $Date: 2006/03/22 08:51:51 $ */ --- NEW FILE: tavl.h --- /* Produced by texiweb from libavl.w on 2002/02/09 at 01:45. */ /* libavl - library for manipulation of binary trees. Copyright (C) 1998-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. The author may be contacted at <bl...@gn...> on the Internet, or as Ben Pfaff, 12167 Airport Rd, DeWitt MI 48820, USA through more mundane means. */ #ifndef TAVL_H #define TAVL_H 1 #include <stddef.h> /* Function types. */ typedef int tavl_comparison_func (const void *tavl_a, const void *tavl_b, void *tavl_param); typedef void tavl_item_func (void *tavl_item, void *tavl_param); typedef void *tavl_copy_func (void *tavl_item, void *tavl_param); #ifndef LIBAVL_ALLOCATOR #define LIBAVL_ALLOCATOR /* Memory allocator. */ struct libavl_allocator { void *(*libavl_malloc) (struct libavl_allocator *, size_t libavl_size); void (*libavl_free) (struct libavl_allocator *, void *libavl_block); }; #endif /* Default memory allocator. */ extern struct libavl_allocator tavl_allocator_default; void *tavl_malloc (struct libavl_allocator *, size_t); void tavl_free (struct libavl_allocator *, void *); /* Maximum TAVL height. */ #ifndef TAVL_MAX_HEIGHT #define TAVL_MAX_HEIGHT 32 #endif /* Tree data structure. */ struct tavl_table { struct tavl_node *tavl_root; /* Tree's root. */ tavl_comparison_func *tavl_compare; /* Comparison function. */ void *tavl_param; /* Extra argument to |tavl_compare|. */ struct libavl_allocator *tavl_alloc; /* Memory allocator. */ size_t tavl_count; /* Number of items in tree. */ }; /* Characterizes a link as a child pointer or a thread. */ enum tavl_tag { TAVL_CHILD, /* Child pointer. */ TAVL_THREAD /* Thread. */ }; /* An TAVL tree node. */ struct tavl_node { struct tavl_node *tavl_link[2]; /* Subtrees. */ void *tavl_data; /* Pointer to data. */ unsigned char tavl_tag[2]; /* Tag fields. */ signed char tavl_balance; /* Balance factor. */ }; /* TAVL traverser structure. */ struct tavl_traverser { struct tavl_table *tavl_table; /* Tree being traversed. */ struct tavl_node *tavl_node; /* Current node in tree. */ }; /* Table functions. */ struct tavl_table *tavl_create (tavl_comparison_func *, void *, struct libavl_allocator *); struct tavl_table *tavl_copy (const struct tavl_table *, tavl_copy_func *, tavl_item_func *, struct libavl_allocator *); void tavl_destroy (struct tavl_table *, tavl_item_func *); void **tavl_probe (struct tavl_table *, void *); void *tavl_insert (struct tavl_table *, void *); void *tavl_replace (struct tavl_table *, void *); void *tavl_delete (struct tavl_table *, const void *); void *tavl_find (const struct tavl_table *, const void *); void tavl_assert_insert (struct tavl_table *, void *); void *tavl_assert_delete (struct tavl_table *, void *); #define tavl_count(table) ((size_t) (table)->tavl_count) /* Table traverser functions. */ void tavl_t_init (struct tavl_traverser *, struct tavl_table *); void *tavl_t_first (struct tavl_traverser *, struct tavl_table *); void *tavl_t_last (struct tavl_traverser *, struct tavl_table *); void *tavl_t_find (struct tavl_traverser *, struct tavl_table *, void *); void *tavl_t_insert (struct tavl_traverser *, struct tavl_table *, void *); void *tavl_t_copy (struct tavl_traverser *, const struct tavl_traverser *); void *tavl_t_next (struct tavl_traverser *); void *tavl_t_prev (struct tavl_traverser *); void *tavl_t_cur (struct tavl_traverser *); void *tavl_t_replace (struct tavl_traverser *, void *); #endif /* tavl.h */ --- NEW FILE: tavl.c --- /* Produced by texiweb from libavl.w on 2002/02/09 at 01:45. */ /* libavl - library for manipulation of binary trees. Copyright (C) 1998-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. The author may be contacted at <bl...@gn...> on the Internet, or as Ben Pfaff, 12167 Airport Rd, DeWitt MI 48820, USA through more mundane means. */ #include <assert.h> #include <stdio.h> #include <stdlib.h> #include "tavl.h" /* Creates and returns a new table with comparison function |compare| using parameter |param| and memory allocator |allocator|. Returns |NULL| if memory allocation failed. */ struct tavl_table * tavl_create (tavl_comparison_func *compare, void *param, struct libavl_allocator *allocator) { struct tavl_table *tree; assert (compare != NULL); if (allocator == NULL) allocator = &tavl_allocator_default; tree = allocator->libavl_malloc (allocator, sizeof *tree); if (tree == NULL) return NULL; tree->tavl_root = NULL; tree->tavl_compare = compare; tree->tavl_param = param; tree->tavl_alloc = allocator; tree->tavl_count = 0; return tree; } /* Search |tree| for an item matching |item|, and return it if found. Otherwise return |NULL|. */ void * tavl_find (const struct tavl_table *tree, const void *item) { const struct tavl_node *p; assert (tree != NULL && item != NULL); p = tree->tavl_root; if (p == NULL) return NULL; for (;;) { int cmp, dir; cmp = tree->tavl_compare (item, p->tavl_data, tree->tavl_param); if (cmp == 0) return p->tavl_data; dir = cmp > 0; if (p->tavl_tag[dir] == TAVL_CHILD) p = p->tavl_link[dir]; else return NULL; } } /* Inserts |item| into |tree| and returns a pointer to |item|'s address. If a duplicate item is found in the tree, returns a pointer to the duplicate without inserting |item|. Returns |NULL| in case of memory allocation failure. */ void ** tavl_probe (struct tavl_table *tree, void *item) { struct tavl_node *y, *z; /* Top node to update balance factor, and parent. */ struct tavl_node *p, *q; /* Iterator, and parent. */ struct tavl_node *n; /* Newly inserted node. */ struct tavl_node *w; /* New root of rebalanced subtree. */ int dir; /* Direction to descend. */ unsigned char da[TAVL_MAX_HEIGHT]; /* Cached comparison results. */ int k = 0; /* Number of cached results. */ assert (tree != NULL && item != NULL); z = (struct tavl_node *) &tree->tavl_root; y = tree->tavl_root; if (y != NULL) { for (q = z, p = y; ; q = p, p = p->tavl_link[dir]) { int cmp = tree->tavl_compare (item, p->tavl_data, tree->tavl_param); if (cmp == 0) return &p->tavl_data; if (p->tavl_balance != 0) z = q, y = p, k = 0; da[k++] = dir = cmp > 0; if (p->tavl_tag[dir] == TAVL_THREAD) break; } } else { p = z; dir = 0; } n = tree->tavl_alloc->libavl_malloc (tree->tavl_alloc, sizeof *n); if (n == NULL) return NULL; tree->tavl_count++; n->tavl_data = item; n->tavl_tag[0] = n->tavl_tag[1] = TAVL_THREAD; n->tavl_link[dir] = p->tavl_link[dir]; if (tree->tavl_root != NULL) { p->tavl_tag[dir] = TAVL_CHILD; n->tavl_link[!dir] = p; } else n->tavl_link[1] = NULL; p->tavl_link[dir] = n; n->tavl_balance = 0; if (tree->tavl_root == n) return &n->tavl_data; for (p = y, k = 0; p != n; p = p->tavl_link[da[k]], k++) if (da[k] == 0) p->tavl_balance--; else p->tavl_balance++; if (y->tavl_balance == -2) { struct tavl_node *x = y->tavl_link[0]; if (x->tavl_balance == -1) { w = x; if (x->tavl_tag[1] == TAVL_THREAD) { x->tavl_tag[1] = TAVL_CHILD; y->tavl_tag[0] = TAVL_THREAD; y->tavl_link[0] = x; } else y->tavl_link[0] = x->tavl_link[1]; x->tavl_link[1] = y; x->tavl_balance = y->tavl_balance = 0; } else { assert (x->tavl_balance == +1); w = x->tavl_link[1]; x->tavl_link[1] = w->tavl_link[0]; w->tavl_link[0] = x; y->tavl_link[0] = w->tavl_link[1]; w->tavl_link[1] = y; if (w->tavl_balance == -1) x->tavl_balance = 0, y->tavl_balance = +1; else if (w->tavl_balance == 0) x->tavl_balance = y->tavl_balance = 0; else /* |w->tavl_balance == +1| */ x->tavl_balance = -1, y->tavl_balance = 0; w->tavl_balance = 0; if (w->tavl_tag[0] == TAVL_THREAD) { x->tavl_tag[1] = TAVL_THREAD; x->tavl_link[1] = w; w->tavl_tag[0] = TAVL_CHILD; } if (w->tavl_tag[1] == TAVL_THREAD) { y->tavl_tag[0] = TAVL_THREAD; y->tavl_link[0] = w; w->tavl_tag[1] = TAVL_CHILD; } } } else if (y->tavl_balance == +2) { struct tavl_node *x = y->tavl_link[1]; if (x->tavl_balance == +1) { w = x; if (x->tavl_tag[0] == TAVL_THREAD) { x->tavl_tag[0] = TAVL_CHILD; y->tavl_tag[1] = TAVL_THREAD; y->tavl_link[1] = x; } else y->tavl_link[1] = x->tavl_link[0]; x->tavl_link[0] = y; x->tavl_balance = y->tavl_balance = 0; } else { assert (x->tavl_balance == -1); w = x->tavl_link[0]; x->tavl_link[0] = w->tavl_link[1]; w->tavl_link[1] = x; y->tavl_link[1] = w->tavl_link[0]; w->tavl_link[0] = y; if (w->tavl_balance == +1) x->tavl_balance = 0, y->tavl_balance = -1; else if (w->tavl_balance == 0) x->tavl_balance = y->tavl_balance = 0; else /* |w->tavl_balance == -1| */ x->tavl_balance = +1, y->tavl_balance = 0; w->tavl_balance = 0; if (w->tavl_tag[0] == TAVL_THREAD) { y->tavl_tag[1] = TAVL_THREAD; y->tavl_link[1] = w; w->tavl_tag[0] = TAVL_CHILD; } if (w->tavl_tag[1] == TAVL_THREAD) { x->tavl_tag[0] = TAVL_THREAD; x->tavl_link[0] = w; w->tavl_tag[1] = TAVL_CHILD; } } } else return &n->tavl_data; z->tavl_link[y != z->tavl_link[0]] = w; return &n->tavl_data; } /* Inserts |item| into |table|. Returns |NULL| if |item| was successfully inserted or if a memory allocation error occurred. Otherwise, returns the duplicate item. */ void * tavl_insert (struct tavl_table *table, void *item) { void **p = tavl_probe (table, item); return p == NULL || *p == item ? NULL : *p; } /* Inserts |item| into |table|, replacing any duplicate item. Returns |NULL| if |item| was inserted without replacing a duplicate, or if a memory allocation error occurred. Otherwise, returns the item that was replaced. */ void * tavl_replace (struct tavl_table *table, void *item) { void **p = tavl_probe (table, item); if (p == NULL || *p == item) return NULL; else { void *r = *p; *p = item; return r; } } /* Returns the parent of |node| within |tree|, or a pointer to |tavl_root| if |s| is the root of the tree. */ static struct tavl_node * find_parent (struct tavl_table *tree, struct tavl_node *node) { if (node != tree->tavl_root) { struct tavl_node *x, *y; for (x = y = node; ; x = x->tavl_link[0], y = y->tavl_link[1]) if (y->tavl_tag[1] == TAVL_THREAD) { struct tavl_node *p = y->tavl_link[1]; if (p == NULL || p->tavl_link[0] != node) { while (x->tavl_tag[0] == TAVL_CHILD) x = x->tavl_link[0]; p = x->tavl_link[0]; } return p; } else if (x->tavl_tag[0] == TAVL_THREAD) { struct tavl_node *p = x->tavl_link[0]; if (p == NULL || p->tavl_link[1] != node) { while (y->tavl_tag[1] == TAVL_CHILD) y = y->tavl_link[1]; p = y->tavl_link[1]; } return p; } } else return (struct tavl_node *) &tree->tavl_root; } /* Deletes from |tree| and returns an item matching |item|. Returns a null pointer if no matching item found. */ void * tavl_delete (struct tavl_table *tree, const void *item) { struct tavl_node *p; /* Traverses tree to find node to delete. */ struct tavl_node *q; /* Parent of |p|. */ int dir; /* Index into |q->tavl_link[]| to get |p|. */ int cmp; /* Result of comparison between |item| and |p|. */ assert (tree != NULL && item != NULL); if (tree->tavl_root == NULL) return NULL; p = (struct tavl_node *) &tree->tavl_root; for (cmp = -1; cmp != 0; cmp = tree->tavl_compare (item, p->tavl_data, tree->tavl_param)) { dir = cmp > 0; q = p; if (p->tavl_tag[dir] == TAVL_THREAD) return NULL; p = p->tavl_link[dir]; } item = p->tavl_data; if (p->tavl_tag[1] == TAVL_THREAD) { if (p->tavl_tag[0] == TAVL_CHILD) { struct tavl_node *t = p->tavl_link[0]; while (t->tavl_tag[1] == TAVL_CHILD) t = t->tavl_link[1]; t->tavl_link[1] = p->tavl_link[1]; q->tavl_link[dir] = p->tavl_link[0]; } else { q->tavl_link[dir] = p->tavl_link[dir]; if (q != (struct tavl_node *) &tree->tavl_root) q->tavl_tag[dir] = TAVL_THREAD; } } else { struct tavl_node *r = p->tavl_link[1]; if (r->tavl_tag[0] == TAVL_THREAD) { r->tavl_link[0] = p->tavl_link[0]; r->tavl_tag[0] = p->tavl_tag[0]; if (r->tavl_tag[0] == TAVL_CHILD) { struct tavl_node *t = r->tavl_link[0]; while (t->tavl_tag[1] == TAVL_CHILD) t = t->tavl_link[1]; t->tavl_link[1] = r; } q->tavl_link[dir] = r; r->tavl_balance = p->tavl_balance; q = r; dir = 1; } else { struct tavl_node *s; for (;;) { s = r->tavl_link[0]; if (s->tavl_tag[0] == TAVL_THREAD) break; r = s; } if (s->tavl_tag[1] == TAVL_CHILD) r->tavl_link[0] = s->tavl_link[1]; else { r->tavl_link[0] = s; r->tavl_tag[0] = TAVL_THREAD; } s->tavl_link[0] = p->tavl_link[0]; if (p->tavl_tag[0] == TAVL_CHILD) { struct tavl_node *t = p->tavl_link[0]; while (t->tavl_tag[1] == TAVL_CHILD) t = t->tavl_link[1]; t->tavl_link[1] = s; s->tavl_tag[0] = TAVL_CHILD; } s->tavl_link[1] = p->tavl_link[1]; s->tavl_tag[1] = TAVL_CHILD; q->tavl_link[dir] = s; s->tavl_balance = p->tavl_balance; q = r; dir = 0; } } tree->tavl_alloc->libavl_free (tree->tavl_alloc, p); while (q != (struct tavl_node *) &tree->tavl_root) { struct tavl_node *y = q; q = find_parent (tree, y); if (dir == 0) { dir = q->tavl_link[0] != y; y->tavl_balance++; if (y->tavl_balance == +1) break; else if (y->tavl_balance == +2) { struct tavl_node *x = y->tavl_link[1]; assert (x != NULL); if (x->tavl_balance == -1) { struct tavl_node *w; assert (x->tavl_balance == -1); w = x->tavl_link[0]; x->tavl_link[0] = w->tavl_link[1]; w->tavl_link[1] = x; y->tavl_link[1] = w->tavl_link[0]; w->tavl_link[0] = y; if (w->tavl_balance == +1) x->tavl_balance = 0, y->tavl_balance = -1; else if (w->tavl_balance == 0) x->tavl_balance = y->tavl_balance = 0; else /* |w->tavl_balance == -1| */ x->tavl_balance = +1, y->tavl_balance = 0; w->tavl_balance = 0; if (w->tavl_tag[0] == TAVL_THREAD) { y->tavl_tag[1] = TAVL_THREAD; y->tavl_link[1] = w; w->tavl_tag[0] = TAVL_CHILD; } if (w->tavl_tag[1] == TAVL_THREAD) { x->tavl_tag[0] = TAVL_THREAD; x->tavl_link[0] = w; w->tavl_tag[1] = TAVL_CHILD; } q->tavl_link[dir] = w; } else { q->tavl_link[dir] = x; if (x->tavl_balance == 0) { y->tavl_link[1] = x->tavl_link[0]; x->tavl_link[0] = y; x->tavl_balance = -1; y->tavl_balance = +1; break; } else /* |x->tavl_balance == +1| */ { if (x->tavl_tag[0] == TAVL_CHILD) y->tavl_link[1] = x->tavl_link[0]; else { y->tavl_tag[1] = TAVL_THREAD; x->tavl_tag[0] = TAVL_CHILD; } x->tavl_link[0] = y; y->tavl_balance = x->tavl_balance = 0; } } } } else { dir = q->tavl_link[0] != y; y->tavl_balance--; if (y->tavl_balance == -1) break; else if (y->tavl_balance == -2) { struct tavl_node *x = y->tavl_link[0]; assert (x != NULL); if (x->tavl_balance == +1) { struct tavl_node *w; assert (x->tavl_balance == +1); w = x->tavl_link[1]; x->tavl_link[1] = w->tavl_link[0]; w->tavl_link[0] = x; y->tavl_link[0] = w->tavl_link[1]; w->tavl_link[1] = y; if (w->tavl_balance == -1) x->tavl_balance = 0, y->tavl_balance = +1; else if (w->tavl_balance == 0) x->tavl_balance = y->tavl_balance = 0; else /* |w->tavl_balance == +1| */ x->tavl_balance = -1, y->tavl_balance = 0; w->tavl_balance = 0; if (w->tavl_tag[0] == TAVL_THREAD) { x->tavl_tag[1] = TAVL_THREAD; x->tavl_link[1] = w; w->tavl_tag[0] = TAVL_CHILD; } if (w->tavl_tag[1] == TAVL_THREAD) { y->tavl_tag[0] = TAVL_THREAD; y->tavl_link[0] = w; w->tavl_tag[1] = TAVL_CHILD; } q->tavl_link[dir] = w; } else { q->tavl_link[dir] = x; if (x->tavl_balance == 0) { y->tavl_link[0] = x->tavl_link[1]; x->tavl_link[1] = y; x->tavl_balance = +1; y->tavl_balance = -1; break; } else /* |x->tavl_balance == -1| */ { if (x->tavl_tag[1] == TAVL_CHILD) y->tavl_link[0] = x->tavl_link[1]; else { y->tavl_tag[0] = TAVL_THREAD; x->tavl_tag[1] = TAVL_CHILD; } x->tavl_link[1] = y; y->tavl_balance = x->tavl_balance = 0; } } } } } tree->tavl_count--; return (void *) item; } /* Initializes |trav| for use with |tree| and selects the null node. */ void tavl_t_init (struct tavl_traverser *trav, struct tavl_table *tree) { trav->tavl_table = tree; trav->tavl_node = NULL; } /* Initializes |trav| for |tree|. Returns data item in |tree| with the least value, or |NULL| if |tree| is empty. */ void * tavl_t_first (struct tavl_traverser *trav, struct tavl_table *tree) { assert (tree != NULL && trav != NULL); trav->tavl_table = tree; trav->tavl_node = tree->tavl_root; if (trav->tavl_node != NULL) { while (trav->tavl_node->tavl_tag[0] == TAVL_CHILD) trav->tavl_node = trav->tavl_node->tavl_link[0]; return trav->tavl_node->tavl_data; } else return NULL; } /* Initializes |trav| for |tree|. Returns data item in |tree| with the greatest value, or |NULL| if |tree| is empty. */ void * tavl_t_last (struct tavl_traverser *trav, struct tavl_table *tree) { assert (tree != NULL && trav != NULL); trav->tavl_table = tree; trav->tavl_node = tree->tavl_root; if (trav->tavl_node != NULL) { while (trav->tavl_node->tavl_tag[1] == TAVL_CHILD) trav->tavl_node = trav->tavl_node->tavl_link[1]; return trav->tavl_node->tavl_data; } else return NULL; } /* Searches for |item| in |tree|. If found, initializes |trav| to the item found and returns the item as well. If there is no matching item, initializes |trav| to the null item and returns |NULL|. */ void * tavl_t_find (struct tavl_traverser *trav, struct tavl_table *tree, void *item) { struct tavl_node *p; assert (trav != NULL && tree != NULL && item != NULL); trav->tavl_table = tree; trav->tavl_node = NULL; p = tree->tavl_root; if (p == NULL) return NULL; for (;;) { int cmp, dir; cmp = tree->tavl_compare (item, p->tavl_data, tree->tavl_param); if (cmp == 0) { trav->tavl_node = p; return p->tavl_data; } dir = cmp > 0; if (p->tavl_tag[dir] == TAVL_CHILD) p = p->tavl_link[dir]; else return NULL; } } /* Attempts to insert |item| into |tree|. If |item| is inserted successfully, it is returned and |trav| is initialized to its location. If a duplicate is found, it is returned and |trav| is initialized to its location. No replacement of the item occurs. If a memory allocation failure occurs, |NULL| is returned and |trav| is initialized to the null item. */ void * tavl_t_insert (struct tavl_traverser *trav, struct tavl_table *tree, void *item) { void **p; assert (trav != NULL && tree != NULL && item != NULL); p = tavl_probe (tree, item); if (p != NULL) { trav->tavl_table = tree; trav->tavl_node = ((struct tavl_node *) ((char *) p - offsetof (struct tavl_node, tavl_data))); return *p; } else { tavl_t_init (trav, tree); return NULL; } } /* Initializes |trav| to have the same current node as |src|. */ void * tavl_t_copy (struct tavl_traverser *trav, const struct tavl_traverser *src) { assert (trav != NULL && src != NULL); trav->tavl_table = src->tavl_table; trav->tavl_node = src->tavl_node; return trav->tavl_node != NULL ? trav->tavl_node->tavl_data : NULL; } /* Returns the next data item in inorder within the tree being traversed with |trav|, or if there are no more data items returns |NULL|. */ void * tavl_t_next (struct tavl_traverser *trav) { assert (trav != NULL); if (trav->tavl_node == NULL) return tavl_t_first (trav, trav->tavl_table); else if (trav->tavl_node->tavl_tag[1] == TAVL_THREAD) { trav->tavl_node = trav->tavl_node->tavl_link[1]; return trav->tavl_node != NULL ? trav->tavl_node->tavl_data : NULL; } else { trav->tavl_node = trav->tavl_node->tavl_link[1]; while (trav->tavl_node->tavl_tag[0] == TAVL_CHILD) trav->tavl_node = trav->tavl_node->tavl_link[0]; return trav->tavl_node->tavl_data; } } /* Returns the previous data item in inorder within the tree being traversed with |trav|, or if there are no more data items returns |NULL|. */ void * tavl_t_prev (struct tavl_traverser *trav) { assert (trav != NULL); if (trav->tavl_node == NULL) return tavl_t_last (trav, trav->tavl_table); else if (trav->tavl_node->tavl_tag[0] == TAVL_THREAD) { trav->tavl_node = trav->tavl_node->tavl_link[0]; return trav->tavl_node != NULL ? trav->tavl_node->tavl_data : NULL; } else { trav->tavl_node = trav->tavl_node->tavl_link[0]; while (trav->tavl_node->tavl_tag[1] == TAVL_CHILD) trav->tavl_node = trav->tavl_node->tavl_link[1]; return trav->tavl_node->tavl_data; } } /* Returns |trav|'s current item. */ void * tavl_t_cur (struct tavl_traverser *trav) { assert (trav != NULL); return trav->tavl_node != NULL ? trav->tavl_node->tavl_data : NULL; } /* Replaces the current item in |trav| by |new| and returns the item replaced. |trav| must not have the null item selected. The new item must not upset the ordering of the tree. */ void * tavl_t_replace (struct tavl_traverser *trav, void *new) { struct tavl_node *old; assert (trav != NULL && trav->tavl_node != NULL && new != NULL); old = trav->tavl_node->tavl_data; trav->tavl_node->tavl_data = new; return old; } /* Creates a new node as a child of |dst| on side |dir|. Copies data and |tavl_balance| from |src| into the new node, applying |copy()|, if non-null. Returns nonzero only if fully successful. Regardless of success, integrity of the tree structure is assured, though failure may leave a null pointer in a |tavl_data| member. */ static int copy_node (struct tavl_table *tree, struct tavl_node *dst, int dir, const struct tavl_node *src, tavl_copy_func *copy) { struct tavl_node *new = tree->tavl_alloc->libavl_malloc (tree->tavl_alloc, sizeof *new); if (new == NULL) return 0; new->tavl_link[dir] = dst->tavl_link[dir]; new->tavl_tag[dir] = TAVL_THREAD; new->tavl_link[!dir] = dst; new->tavl_tag[!dir] = TAVL_THREAD; dst->tavl_link[dir] = new; dst->tavl_tag[dir] = TAVL_CHILD; new->tavl_balance = src->tavl_balance; if (copy == NULL) new->tavl_data = src->tavl_data; else { new->tavl_data = copy (src->tavl_data, tree->tavl_param); if (new->tavl_data == NULL) return 0; } return 1; } static void copy_error_recovery (struct tavl_node *p, struct tavl_table *new, tavl_item_func *destroy) { new->tavl_root = p; if (p != NULL) { while (p->tavl_tag[1] == TAVL_CHILD) p = p->tavl_link[1]; p->tavl_link[1] = NULL; } tavl_destroy (new, destroy); } /* Copies |org| to a newly created tree, which is returned. If |copy != NULL|, each data item in |org| is first passed to |copy|, and the return values are inserted into the tree, with |NULL| return values taken as indications of failure. On failure, destroys the partially created new tree, applying |destroy|, if non-null, to each item in the new tree so far, and returns |NULL|. If |allocator != NULL|, it is used for allocation in the new tree. Otherwise, the same allocator used for |org| is used. */ struct tavl_table * tavl_copy (const struct tavl_table *org, tavl_copy_func *copy, tavl_item_func *destroy, struct libavl_allocator *allocator) { struct tavl_table *new; const struct tavl_node *p; struct tavl_node *q; struct tavl_node rp, rq; assert (org != NULL); new = tavl_create (org->tavl_compare, org->tavl_param, allocator != NULL ? allocator : org->tavl_alloc); if (new == NULL) return NULL; new->tavl_count = org->tavl_count; if (new->tavl_count == 0) return new; p = &rp; rp.tavl_link[0] = org->tavl_root; rp.tavl_tag[0] = TAVL_CHILD; q = &rq; rq.tavl_link[0] = NULL; rq.tavl_tag[0] = TAVL_THREAD; for (;;) { if (p->tavl_tag[0] == TAVL_CHILD) { if (!copy_node (new, q, 0, p->tavl_link[0], copy)) { copy_error_recovery (rq.tavl_link[0], new, destroy); return NULL; } p = p->tavl_link[0]; q = q->tavl_link[0]; } else { while (p->tavl_tag[1] == TAVL_THREAD) { p = p->tavl_link[1]; if (p == NULL) { q->tavl_link[1] = NULL; new->tavl_root = rq.tavl_link[0]; return new; } q = q->tavl_link[1]; } p = p->tavl_link[1]; q = q->tavl_link[1]; } if (p->tavl_tag[1] == TAVL_CHILD) if (!copy_node (new, q, 1, p->tavl_link[1], copy)) { copy_error_recovery (rq.tavl_link[0], new, destroy); return NULL; } } } /* Frees storage allocated for |tree|. If |destroy != NULL|, applies it to each data item in inorder. */ void tavl_destroy (struct tavl_table *tree, tavl_item_func *destroy) { struct tavl_node *p; /* Current node. */ struct tavl_node *n; /* Next node. */ p = tree->tavl_root; if (p != NULL) while (p->tavl_tag[0] == TAVL_CHILD) p = p->tavl_link[0]; while (p != NULL) { n = p->tavl_link[1]; if (p->tavl_tag[1] == TAVL_CHILD) while (n->tavl_tag[0] == TAVL_CHILD) n = n->tavl_link[0]; if (destroy != NULL && p->tavl_data != NULL) destroy (p->tavl_data, tree->tavl_param); tree->tavl_alloc->libavl_free (tree->tavl_alloc, p); p = n; } tree->tavl_alloc->libavl_free (tree->tavl_alloc, tree); } /* Allocates |size| bytes of space using |malloc()|. Returns a null pointer if allocation fails. */ void * tavl_malloc (struct libavl_allocator *allocator, size_t size) { assert (allocator != NULL && size > 0); return malloc (size); } /* Frees |block|. */ void tavl_free (struct libavl_allocator *allocator, void *block) { assert (allocator != NULL && block != NULL); free (block); } /* Default memory allocator that uses |malloc()| and |free()|. */ struct libavl_allocator tavl_allocator_default = { tavl_malloc, tavl_free }; #undef NDEBUG #include <assert.h> /* Asserts that |tavl_insert()| succeeds at inserting |item| into |table|. */ void (tavl_assert_insert) (struct tavl_table *table, void *item) { void **p = tavl_probe (table, item); assert (p != NULL && *p == item); } /* Asserts that |tavl_delete()| really removes |item| from |table|, and returns the removed item. */ void * (tavl_assert_delete) (struct tavl_table *table, void *item) { void *p = tavl_delete (table, item); assert (p != NULL); return p; } --- NEW FILE: helpers.c --- /* LIBDGL -- a Directed Graph Library implementation * Copyright (C) 2002 Roberto Micarelli * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* * best view with tabstop=4 */ #include <stdlib.h> #include <string.h> #include "type.h" #include "tree.h" #include "graph.h" #include "helpers.h" /* * helpers for parametric stack */ unsigned char * dgl_mempush( unsigned char * pstack , long * istack , long size , void * pv ) { if ( *istack == 0 ) pstack = NULL; pstack = realloc( pstack , size * (1 + *istack) ); if ( pstack == NULL ) return NULL; memcpy( & pstack[ (*istack) * size ] , pv , size ); (*istack) ++; return pstack; } unsigned char * dgl_mempop( unsigned char * pstack , long * istack , long size ) { if ( *istack == 0 ) return NULL; return & pstack[ size * (--(*istack)) ]; } void dgl_swapInt32Bytes( dglInt32_t * pn ) { unsigned char * pb = (unsigned char *) pn; pb[0] ^= pb[3]; pb[3] ^= pb[0]; pb[0] ^= pb[3]; pb[1] ^= pb[2]; pb[2] ^= pb[1]; pb[1] ^= pb[2]; } void dgl_swapInt64Bytes( dglInt64_t * pn ) { unsigned char * pb = (unsigned char *) pn; pb[0] ^= pb[7]; pb[7] ^= pb[0]; pb[0] ^= pb[7]; pb[1] ^= pb[6]; pb[6] ^= pb[1]; pb[1] ^= pb[6]; pb[2] ^= pb[5]; pb[5] ^= pb[2]; pb[2] ^= pb[5]; pb[3] ^= pb[4]; pb[4] ^= pb[3]; pb[3] ^= pb[4]; } /* * Keep the edge cost prioritizer in sync */ int dgl_edge_prioritizer_del(dglGraph_s * pG, dglInt32_t nId, dglInt32_t nPriId) { dglTreeEdgePri32_s findPriItem, * pPriItem; register int iEdge1, iEdge2; dglInt32_t * pnNew; if (pG->edgePrioritizer.pvAVL) { findPriItem.nKey = nPriId; pPriItem = avl_find(pG->edgePrioritizer.pvAVL, &findPriItem); if ( pPriItem && pPriItem->pnData ) { pnNew = malloc( sizeof(dglInt32_t) * pPriItem->cnData ); if ( pnNew == NULL ) { pG->iErrno = DGL_ERR_MemoryExhausted; return -pG->iErrno; } for (iEdge1 = 0, iEdge2 = 0 ; iEdge2 < pPriItem->cnData ; iEdge2 ++) { if (pPriItem->pnData[iEdge2] != nId) { pnNew[iEdge1++] = pPriItem->pnData[iEdge2]; } } free(pPriItem->pnData); if ( iEdge1 == 0) { free(pnNew); pPriItem->pnData = NULL; pPriItem->cnData = 0; } else { pPriItem->pnData = pnNew; pPriItem->cnData = iEdge1; } } } return 0; } int dgl_edge_prioritizer_add(dglGraph_s * pG, dglInt32_t nId, dglInt32_t nPriId) { dglTreeEdgePri32_s * pPriItem; if ( pG->edgePrioritizer.pvAVL == NULL ) { pG->edgePrioritizer.pvAVL = avl_create( dglTreeEdgePri32Compare, NULL, dglTreeGetAllocator() ); if ( pG->edgePrioritizer.pvAVL == NULL ) { pG->iErrno = DGL_ERR_MemoryExhausted; return -pG->iErrno; } } pPriItem = dglTreeEdgePri32Add(pG->edgePrioritizer.pvAVL, nPriId); if (pPriItem == NULL) { pG->iErrno = DGL_ERR_MemoryExhausted; return -pG->iErrno; } if (pPriItem->cnData == 0) { pPriItem->pnData = (dglInt32_t*) malloc( sizeof(dglInt32_t) ); } else { pPriItem->pnData = (dglInt32_t*) realloc( pPriItem->pnData , sizeof(dglInt32_t) * (pPriItem->cnData + 1) ); } if ( pPriItem->pnData == NULL ) { pG->iErrno = DGL_ERR_MemoryExhausted; return -pG->iErrno; } pPriItem->pnData[ pPriItem->cnData ] = nId; pPriItem->cnData++; return 0; } --- NEW FILE: graph.h --- /* * Copyright (C) 2002 Roberto Micarelli * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* * best view tabstop=4 */ #ifndef _DGL_GRAPH_H_ #define _DGL_GRAPH_H_ #ifdef DGL_STATS #include <time.h> #endif #include <stdio.h> #include "heap.h" #include "tree.h" __BEGIN_DECLS /* * Graph State bitmask - returned by dglGet_State() function */ #define DGL_GS_FLAT 0x1 /* otherwise is TREE */ /* * Graph Family */ #define DGL_GF_COMPLETE 0x1 #define DGL_GF_BIPARTITE 0x2 #define DGL_GF_REGULAR 0x4 #define DGL_GF_BOUQUET 0x8 #define DGL_GF_DIPOLE 0x10 #define DGL_GF_PATH 0x20 #define DGL_GF_CYCLE 0x40 /* * Graph Options */ #define DGL_GO_EdgePrioritize_COST 0x10 #define DGL_GO_EdgePrioritize_ATTR 0x20 #define DGL_GO_NodePrioritize_ATTR 0x40 /* * Node Status bitmask - returned by dglNodeGet_Status() */ #define DGL_NS_HEAD 0x1 /* node exists as at least one edge's head (static) */ #define DGL_NS_TAIL 0x2 /* node exists as at least one edge's tail (static) */ #define DGL_NS_ALONE 0x4 /* node is a component */ /* * Edge Status bitmask - returned by dglEdgeGet_Status() */ #define DGL_ES_DIRECTED 0x1 /* force edge to be directed */ /* * Endianess Values - returned by dglGet_Endianess() function */ #define DGL_ENDIAN_BIG 1 #define DGL_ENDIAN_LITTLE 2 /* * miscellaneous */ /* add-edge/add-node flags */ #define DGL_STRONGCONNECT 0x1 #define DGL_ALONE 0x2 #define DGL_MERGE_EDGE 0x4 /* */ /* * Shortest Path clip definitions */ typedef struct _dglSPClipInput { dglInt32_t * pnPrevEdge; dglInt32_t * pnNodeFrom; dglInt32_t * pnEdge; dglInt32_t * pnNodeTo; dglInt32_t nFromDistance; } dglSPClipInput_s; typedef struct _dglSPClipOutput { dglInt32_t nEdgeCost; } dglSPClipOutput_s; /* * Spanning clip definitions */ typedef struct _dglSpanClipInput { dglInt32_t * pnNodeFrom; dglInt32_t * pnEdge; dglInt32_t * pnNodeTo; } dglSpanClipInput_s; typedef struct _dglSpanClipOutput { dglInt32_t * pnReserved; } dglSpanClipOutput_s; struct dglGraph; /* * Node Prioritizer */ typedef struct { void * pvAVL; } dglNodePrioritizer_s; /* * Edge Prioritizer */ typedef struct { int cEdge; int iEdge; dglTreeEdgePri32_s * pEdgePri32Item; void * pvAVL; } dglEdgePrioritizer_s; /* * The graph context */ typedef struct _dglGraph { int iErrno; dglByte_t Version; dglByte_t Endian; dglInt32_t NodeAttrSize; dglInt32_t EdgeAttrSize; dglInt32_t aOpaqueSet[ 16 ]; dglInt32_t cNode; dglInt32_t cHead; dglInt32_t cTail; dglInt32_t cAlone; dglInt32_t cEdge; dglInt64_t nnCost; dglInt32_t Flags; dglInt32_t nFamily; dglInt32_t nOptions; void * pNodeTree; void * pEdgeTree; dglByte_t * pNodeBuffer; dglInt32_t iNodeBuffer; dglByte_t * pEdgeBuffer; dglInt32_t iEdgeBuffer; dglEdgePrioritizer_s edgePrioritizer; dglNodePrioritizer_s nodePrioritizer; /* so far statistics are only computed by dglAddEdge() */ #ifdef DGL_STATS clock_t clkAddEdge; /* cycles spent during the last addedge execution */ int cAddEdge; /* # of calls to dglAddEdge() */ clock_t clkNodeTree; /* cycles spent in accessing the node binary tree */ int cNodeTree; /* # of probes in the node tree */ #endif } dglGraph_s; /* * Shortest Path clip function type */ typedef int (*dglSPClip_fn)(dglGraph_s *, dglSPClipInput_s *, dglSPClipOutput_s *, void *); /* * Spanning clip function type */ typedef int (*dglSpanClip_fn)(dglGraph_s *, dglGraph_s *, dglSpanClipInput_s *, dglSpanClipOutput_s *, void *); /* * An ARC defined as : from-node, to-node, edge pointer, to-node-distance (from the path starting node) */ typedef struct _dglSPArc { dglInt32_t nFrom; dglInt32_t nTo; dglInt32_t * pnEdge; dglInt32_t nDistance; } dglSPArc_s; /* * Shortest Path Report */ typedef struct _dglSPReport { dglInt32_t nStartNode; dglInt32_t nDestinationNode; dglInt32_t nDistance; dglInt32_t cArc; dglSPArc_s * pArc; } dglSPReport_s; /* * Shortest Path Cache */ typedef struct { dglInt32_t nStartNode; dglHeap_s NodeHeap; void * pvVisited; void * pvPredist; } dglSPCache_s; /* * Node Traverser */ typedef struct { dglGraph_s * pGraph; void * pvAVLT; dglInt32_t * pnNode; } dglNodeTraverser_s; /* * Edgeset Traverser */ typedef struct { dglGraph_s * pGraph; dglInt32_t * pnEdgeset; void * pvCurrentItem; int cEdge, iEdge; } dglEdgesetTraverser_s; /* * Edge Traverser */ typedef struct { dglGraph_s * pGraph; void * pvAVLT; dglInt32_t * pnEdge; dglEdgePrioritizer_s * pEdgePrioritizer; } dglEdgeTraverser_s; /* * Error codes returned by dglError */ #define DGL_ERR_BadVersion 1 #define DGL_ERR_BadNodeType 2 #define DGL_ERR_MemoryExhausted 3 #define DGL_ERR_HeapError 4 #define DGL_ERR_UndefinedMethod 5 #define DGL_ERR_Write 6 #define DGL_ERR_Read 7 #define DGL_ERR_NotSupported 8 #define DGL_ERR_UnknownByteOrder 9 #define DGL_ERR_HeadNodeNotFound 10 #define DGL_ERR_TailNodeNotFound 11 #define DGL_ERR_BadEdge 12 #define DGL_ERR_BadOnFlatGraph 13 #define DGL_ERR_BadOnTreeGraph 14 #define DGL_ERR_NodeNotFound 15 #define DGL_ERR_TreeSearchError 16 #define DGL_ERR_UnexpectedNullPointer 17 #define DGL_ERR_VersionNotSupported 18 #define DGL_ERR_EdgeNotFound 19 #define DGL_ERR_NodeAlreadyExist 20 #define DGL_ERR_NodeIsAComponent 21 #define DGL_ERR_EdgeAlreadyExist 22 #define DGL_ERR_BadArgument 23 /* * graph context management */ int dglInitialize(dglGraph_s * pGraph, dglByte_t Version, dglInt32_t NodeAttrSize, dglInt32_t EdgeAttrSize, dglInt32_t * pOpaqueSet); int dglRelease( dglGraph_s * pGraph ); int dglUnflatten( dglGraph_s * pGraph ); int dglFlatten( dglGraph_s * pGraph ); void dglResetStats( dglGraph_s * pgraph ); /* * node management */ dglInt32_t * dglGetNode(dglGraph_s * pGraph , dglInt32_t nNodeId); int dglAddNode( dglGraph_s * pGraph , dglInt32_t nNodeId , void * pvNodeAttr , dglInt32_t nFlags ); int dglDelNode( dglGraph_s * pGraph , dglInt32_t nNodeId ); dglInt32_t dglNodeGet_Id(dglGraph_s * pGraph, dglInt32_t * pnNode); dglInt32_t * dglNodeGet_OutEdgeset(dglGraph_s * pGraph, dglInt32_t * pnNode); dglInt32_t * dglNodeGet_InEdgeset(dglGraph_s * pGraph, dglInt32_t * pnNode); dglInt32_t dglNodeGet_Status(dglGraph_s * pGraph, dglInt32_t * pnNode); dglInt32_t * dglNodeGet_Attr(dglGraph_s * pGraph, dglInt32_t * pnNode); void dglNodeSet_Attr(dglGraph_s * pGraph, dglInt32_t * pnNode, dglInt32_t * pnAttr); int dglNodeGet_InDegree(dglGraph_s * pGraph, dglInt32_t * pnNode); int dglNodeGet_OutDegree(dglGraph_s * pGraph, dglInt32_t * pnNode); int dglNodeGet_Valence(dglGraph_s * pGraph, dglInt32_t * pnNode); /* * edge management */ dglInt32_t dglEdgesetGet_EdgeCount(dglGraph_s * pGraph, dglInt32_t * pnOutEdgeset); dglInt32_t dglEdgeGet_Id(dglGraph_s * pGraph , dglInt32_t * pnEdge ); dglInt32_t dglEdgeGet_Cost(dglGraph_s * pGraph , dglInt32_t * pnEdge ); dglInt32_t * dglEdgeGet_Head(dglGraph_s * pGraph , dglInt32_t * pnEdge ); dglInt32_t * dglEdgeGet_Tail(dglGraph_s * pGraph , dglInt32_t * pnEdge ); dglInt32_t * dglEdgeGet_Attr(dglGraph_s * pGraph , dglInt32_t * pnEdge ); int dglEdgeSet_Attr(dglGraph_s * pGraph , dglInt32_t * pnAttr , dglInt32_t * pnEdge ); dglInt32_t * dglGetEdge( dglGraph_s * pGraph , dglInt32_t nEdgeId ); int dglDelEdge( dglGraph_s * pGraph , dglInt32_t nEdgeId ); int dglAddEdge( dglGraph_s * pGraph , dglInt32_t nHead , dglInt32_t nTail , dglInt32_t nCost , dglInt32_t nEdge ); int dglAddEdgeX( dglGraph_s * pGraph , dglInt32_t nHead , dglInt32_t nTail , dglInt32_t nCost , dglInt32_t nEdge , void * pvFnodeAttr , void * pvTnodeAttr , void * pvEdgeAttr , dglInt32_t nFlags ); /* * graph I/O */ int dglWrite( dglGraph_s * pGraph, FILE *fd ); int dglRead( dglGraph_s * pGraph, FILE *fd ); typedef struct { dglGraph_s * pG; int nState; int fSwap; int cb; int ib; unsigned char * pb; unsigned char ab[118]; /* 118 = graph header size */ } dglIOContext_s; int dglIOContextInitialize(dglGraph_s *, dglIOContext_s *); void dglIOContextRelease(dglIOContext_s *); /* * Chunked Write callback function type */ typedef int (*dglWriteChunk_fn)( dglGraph_s *, unsigned char * pbChunk, int cbChunk, void * pvArg ); int dglWriteChunk(dglIOContext_s *, dglWriteChunk_fn, void * pvArg); int dglReadChunk(dglIOContext_s *, dglByte_t * pbChunk, int cbChunk); /* * Algorithms */ int dglShortestPath( dglGraph_s * pGraph, dglSPReport_s ** ppReport, dglInt32_t nStartNode, dglInt32_t nDestinationNode, dglSPClip_fn fnClip, vo... [truncated message content] |
From: Ehud S. <esh...@us...> - 2006-03-22 08:51:20
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6548 Modified Files: roadmap_download.c roadmap_locator.c roadmap_metadata.c roadmap_navigate.c roadmap_point.c roadmap_point.h roadmap_start.c roadmap_start.h roadmap_trip.c roadmap_trip.h Log Message: Add route calculation. Index: roadmap_point.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_point.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** roadmap_point.c 12 Dec 2005 20:40:34 -0000 1.3 --- roadmap_point.c 22 Mar 2006 08:51:13 -0000 1.4 *************** *** 81,89 **** context->BySquare = (RoadMapPointBySquare *) roadmap_db_get_data (bysquare_table); ! context->Point = (RoadMapPoint *) roadmap_db_get_data (point_table); ! if (id_table != NULL) { ! context->PointID = (int *) roadmap_db_get_data (id_table); ! context->PointIDCount = roadmap_db_get_count (id_table); } --- 81,89 ---- context->BySquare = (RoadMapPointBySquare *) roadmap_db_get_data (bysquare_table); ! context->Point = (RoadMapPoint *) roadmap_db_get_data (point_table); ! if (id_table != NULL) { ! context->PointID = (int *) roadmap_db_get_data (id_table); ! context->PointIDCount = roadmap_db_get_count (id_table); } *************** *** 276,277 **** --- 276,285 ---- } + + int roadmap_point_count (void) { + + if (RoadMapPointActive == NULL) return 0; /* No line. */ + + return RoadMapPointActive->PointCount; + } + Index: roadmap_download.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_download.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** roadmap_download.c 17 Mar 2006 09:48:04 -0000 1.3 --- roadmap_download.c 22 Mar 2006 08:51:13 -0000 1.4 *************** *** 235,239 **** if (RoadMapDownloadQueue == NULL) { ! RoadMapDownloadQueueSize = roadmap_county_count(); RoadMapDownloadQueue = --- 235,239 ---- if (RoadMapDownloadQueue == NULL) { ! RoadMapDownloadQueueSize = roadmap_county_count() + 5; RoadMapDownloadQueue = *************** *** 379,383 **** format = roadmap_dialog_get_data (".file", "To"); - roadmap_config_set (&RoadMapConfigDestination, format); snprintf (destination, sizeof(destination), format, fips); --- 379,382 ---- *************** *** 409,414 **** --- 408,430 ---- source, destination)) { + char *tmp; + roadmap_download_uncompress (destination); RoadMapDownloadRefresh = 1; + + /* download navigation data */ + if ((tmp = strstr (source, ".rdm")) != NULL) { + strcpy (tmp, ".dgl"); + + if ((tmp = strstr (destination, ".rdm")) != NULL) { + strcpy (tmp, ".dgl"); + + if (!protocol->handler (&RoadMapDownloadCallbackFunctions, + source, destination)) { + roadmap_messagebox ("Error", + "Error downloading navigation data."); + } + } + } } roadmap_download_unblock (fips); *************** *** 545,552 **** char buffer[2048]; ! if (fips == -1) { ! roadmap_download_usdir (); ! return; ! } source = roadmap_config_get (&RoadMapConfigSource); --- 561,568 ---- char buffer[2048]; ! if (fips == -1) { ! roadmap_download_usdir (); ! return; ! } source = roadmap_config_get (&RoadMapConfigSource); Index: roadmap_point.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_point.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_point.h 28 Nov 2005 19:36:34 -0000 1.2 --- roadmap_point.h 22 Mar 2006 08:51:13 -0000 1.3 *************** *** 31,34 **** --- 31,35 ---- void roadmap_point_position (int point, RoadMapPosition *position); int roadmap_point_db_id (int point); + int roadmap_point_count (void); extern roadmap_db_handler RoadMapPointHandler; Index: roadmap_metadata.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_metadata.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_metadata.c 1 Dec 2005 16:50:03 -0000 1.2 --- roadmap_metadata.c 22 Mar 2006 08:51:13 -0000 1.3 *************** *** 138,148 **** const char *name) { ! int i; ! ! RoadMapString coded_category; ! RoadMapString coded_name; ! ! if (RoadMapMetadataActive == NULL) return ""; ! coded_category = roadmap_dictionary_locate --- 138,148 ---- const char *name) { ! int i; ! ! RoadMapString coded_category; ! RoadMapString coded_name; ! ! if (RoadMapMetadataActive == NULL) return ""; ! coded_category = roadmap_dictionary_locate Index: roadmap_trip.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_trip.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** roadmap_trip.c 1 Dec 2005 12:30:12 -0000 1.4 --- roadmap_trip.c 22 Mar 2006 08:51:13 -0000 1.5 *************** *** 399,403 **** roadmap_dialog_show_list ! ("Names", ".Waypoints", count, Names, (void **)Names, roadmap_trip_remove_dialog_selected); } --- 399,403 ---- roadmap_dialog_show_list ! ("Names", ".Waypoints", i, Names, (void **)Names, roadmap_trip_remove_dialog_selected); } *************** *** 778,781 **** --- 778,792 ---- + const RoadMapPosition *roadmap_trip_get_position (const char *name) { + + RoadMapTripPoint *trip = NULL; + + trip = roadmap_trip_search (name); + if (trip == NULL) return NULL; + + return &trip->map; + } + + void roadmap_trip_start (void) { Index: roadmap_start.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_start.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap_start.h 31 Dec 2005 09:57:09 -0000 1.2 --- roadmap_start.h 22 Mar 2006 08:51:13 -0000 1.3 *************** *** 40,43 **** --- 40,46 ---- const char *roadmap_start_get_title (const char *name); + void roadmap_start_add_long_click_item (const char *name, + const char *description, + RoadMapCallback callback); #endif /* INCLUDE__ROADMAP_START__H */ Index: roadmap_navigate.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_navigate.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** roadmap_navigate.c 25 Dec 2005 23:07:36 -0000 1.6 --- roadmap_navigate.c 22 Mar 2006 08:51:13 -0000 1.7 *************** *** 230,235 **** RoadMapFuzzy connected; int line_direction = 0; ! int azymuth_with_line; ! int azymuth_against_line; int symetric = 0; --- 230,235 ---- RoadMapFuzzy connected; int line_direction = 0; ! int azymuth_with_line = 0; ! int azymuth_against_line = 0; int symetric = 0; Index: roadmap_trip.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_trip.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** roadmap_trip.h 15 Oct 2005 22:18:52 -0000 1.1.1.1 --- roadmap_trip.h 22 Mar 2006 08:51:13 -0000 1.2 *************** *** 53,56 **** --- 53,57 ---- const RoadMapPosition *roadmap_trip_get_focus_position (void); + const RoadMapPosition *roadmap_trip_get_position (const char *name); Index: roadmap_locator.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_locator.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** roadmap_locator.c 17 Mar 2006 09:48:59 -0000 1.6 --- roadmap_locator.c 22 Mar 2006 08:51:13 -0000 1.7 *************** *** 41,44 **** --- 41,45 ---- #include "roadmap_square.h" #include "roadmap_shape.h" + #include "roadmap_turns.h" #include "roadmap_line.h" #include "roadmap_line_route.h" *************** *** 103,106 **** --- 104,110 ---- RoadMapCountyModel = roadmap_db_register + (RoadMapCountyModel, "turns", &RoadMapTurnsHandler); + RoadMapCountyModel = + roadmap_db_register (RoadMapCountyModel, "line", &RoadMapLineHandler); RoadMapCountyModel = Index: roadmap_start.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/roadmap_start.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** roadmap_start.c 17 Mar 2006 09:49:54 -0000 1.12 --- roadmap_start.c 22 Mar 2006 08:51:13 -0000 1.13 *************** *** 71,74 **** --- 71,75 ---- #include "roadmap_pointer.h" + #include "navigate/navigate_main.h" #include "editor/editor_main.h" #include "editor/db/editor_db.h" *************** *** 93,96 **** --- 94,99 ---- ROADMAP_CONFIG_ITEM("Map", "Path"); + static RoadMapMenu LongClickMenu; + /* The menu and toolbar callbacks: --------------------------------------- */ *************** *** 151,157 **** "A Street navigation system\n" "for Linux & UNIX" ! "\n\nEditor Plugin 0.4.3\n" ! "Ehud Shabtai\n" ! "esh...@gm..."); } --- 154,160 ---- "A Street navigation system\n" "for Linux & UNIX" ! "\n\nEditor Plugin 0.5.0\n" ! "Ehud Shabtai\n" ! "esh...@gm..."); } *************** *** 256,259 **** --- 259,267 ---- } + static void roadmap_start_navigate (void) { + + navigate_main_calc_route (); + } + static void roadmap_start_set_destination (void) { *************** *** 262,265 **** --- 270,279 ---- } + static void roadmap_start_set_departure (void) { + + roadmap_trip_set_selection_as ("Departure"); + roadmap_screen_refresh(); + } + static void roadmap_start_set_waypoint (void) { *************** *** 453,460 **** --- 467,482 ---- roadmap_start_trip_reverse}, + {"setasdeparture", "Set as Departure", NULL, NULL, + "Set the selected street block as the trip's departure", + roadmap_start_set_departure}, + {"setasdestination", "Set as Destination", NULL, NULL, "Set the selected street block as the trip's destination", roadmap_start_set_destination}, + {"navigate", "Navigate", NULL, NULL, + "Calculate route", + roadmap_start_navigate}, + {"addaswaypoint", "Add as Waypoint", "Waypoint", "W", "Set the selected street block as waypoint", roadmap_start_set_waypoint}, *************** *** 565,572 **** --- 587,596 ---- "resumetripnorthup", "returntrip", + "navigate", RoadMapFactorySeparator, "setasdestination", + "setasdeparture", "addaswaypoint", "deletewaypoints", *************** *** 858,861 **** --- 882,915 ---- + static void roadmap_start_long_click (RoadMapGuiPoint *point) { + + RoadMapPosition position; + + roadmap_math_to_position (point, &position); + roadmap_trip_set_point ("Selection", &position); + + if (LongClickMenu != NULL) { + roadmap_main_popup_menu (LongClickMenu, point->x, point->y); + } + } + + + void roadmap_start_add_long_click_item (const char *name, + const char *description, + RoadMapCallback callback) { + if (LongClickMenu == NULL) { + LongClickMenu = roadmap_main_new_menu (); + } + + if (name == NULL) { + roadmap_main_add_separator (LongClickMenu); + return; + } + + roadmap_main_add_menu_item (LongClickMenu, name, description, callback); + + } + + void roadmap_start_freeze (void) { *************** *** 895,898 **** --- 949,966 ---- ("preferences", &RoadMapConfigGeometryMain, "800x600"); + roadmap_start_add_long_click_item ("Set as Departure", + "Set current point as Departure point.", + roadmap_start_set_departure); + + roadmap_start_add_long_click_item ("Set as Destination", + "Set current point as Destination point.", + roadmap_start_set_destination); + + roadmap_start_add_long_click_item ("Navigate", + "Calculate a route", + roadmap_start_navigate); + + roadmap_pointer_register_long_click (roadmap_start_long_click); + roadmap_option_initialize (); roadmap_math_initialize (); *************** *** 946,949 **** --- 1014,1018 ---- editor_main_initialize (); + navigate_main_initialize (); roadmap_trip_restore_focus (); *************** *** 955,958 **** --- 1024,1028 ---- roadmap_locator_declare (&roadmap_start_no_download); roadmap_main_set_periodic (200, roadmap_start_periodic); + } |
From: Ehud S. <esh...@us...> - 2006-03-22 08:46:55
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4170 Modified Files: buildmap_main.c buildmap_point.c buildmap_point.h buildmap_postgres.c Makefile Log Message: Add dglib and turn restrictions support. Index: buildmap_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_main.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** buildmap_main.c 12 Dec 2005 20:35:41 -0000 1.5 --- buildmap_main.c 22 Mar 2006 08:46:52 -0000 1.6 *************** *** 44,49 **** --- 44,51 ---- #include "buildmap_line.h" #include "buildmap_line_route.h" + #include "buildmap_dglib.h" #include "buildmap_point.h" #include "buildmap_shape.h" + #include "buildmap_turn_restrictions.h" #include "buildmap_city.h" #include "buildmap_zip.h" *************** *** 68,71 **** --- 70,75 ---- static char *BuildMapResult; + static time_t creation_time; + static struct poptOption BuildMapTigerOptions [] = { *************** *** 162,167 **** --- 166,173 ---- buildmap_line_initialize(); buildmap_line_route_initialize(); + buildmap_dglib_initialize(creation_time); buildmap_polygon_initialize(); buildmap_shape_initialize(); + buildmap_turn_restrictions_initialize(); buildmap_street_initialize(); buildmap_area_initialize(); *************** *** 174,180 **** --- 180,188 ---- buildmap_line_sort (); buildmap_line_route_sort (); + buildmap_dglib_sort (); buildmap_street_sort (); buildmap_range_sort (); buildmap_shape_sort (); + buildmap_turn_restrictions_sort (); buildmap_polygon_sort (); buildmap_metadata_sort (); *************** *** 202,207 **** --- 210,217 ---- buildmap_line_save (); buildmap_line_route_save (); + buildmap_dglib_save (BuildMapResult, db_name); buildmap_point_save (); buildmap_shape_save (); + buildmap_turn_restrictions_save (); buildmap_dictionary_save (); buildmap_city_save (); *************** *** 220,225 **** --- 230,237 ---- buildmap_line_reset (); buildmap_line_route_reset (); + buildmap_dglib_reset (creation_time); buildmap_point_reset (); buildmap_shape_reset (); + buildmap_turn_restrictions_reset (); buildmap_dictionary_reset (); buildmap_city_reset (); *************** *** 236,241 **** int verbose, int canals, int rivers) { ! time_t current_time; ! buildmap_county_initialize (); --- 248,252 ---- int verbose, int canals, int rivers) { ! char unix_time_str[255]; buildmap_county_initialize (); *************** *** 263,269 **** } - time (¤t_time); buildmap_metadata_add_attribute ("Version", "Date", ! asctime (gmtime (¤t_time))); buildmap_county_sort(); --- 274,282 ---- } buildmap_metadata_add_attribute ("Version", "Date", ! asctime (gmtime (&creation_time))); ! ! snprintf (unix_time_str, sizeof(unix_time_str), "%ld", creation_time); ! buildmap_metadata_add_attribute ("Version", "UnixTime", unix_time_str); buildmap_county_sort(); *************** *** 279,284 **** --- 292,299 ---- buildmap_line_summary (); buildmap_line_route_summary (); + buildmap_dglib_summary (); buildmap_range_summary (); buildmap_shape_summary (); + buildmap_turn_restrictions_summary (); buildmap_polygon_summary (); buildmap_metadata_summary (); *************** *** 294,297 **** --- 309,313 ---- const char **leftovers; + time (&creation_time); BuildMapResult = strdup(roadmap_path_preferred("maps")); /* default. */ Index: buildmap_point.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_point.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** buildmap_point.c 12 Dec 2005 20:35:41 -0000 1.3 --- buildmap_point.c 22 Mar 2006 08:46:52 -0000 1.4 *************** *** 72,75 **** --- 72,76 ---- static RoadMapHash *PointByPosition = NULL; + static RoadMapHash *PointById = NULL; static int *SortedPoint = NULL; *************** *** 83,86 **** --- 84,89 ---- void buildmap_point_initialize (void) { + PointById = roadmap_hash_new ("PointById", BUILDMAP_BLOCK); + PointByPosition = roadmap_hash_new ("PointByPosition", BUILDMAP_BLOCK); *************** *** 139,145 **** --- 142,150 ---- roadmap_hash_resize (PointByPosition, (block+1) * BUILDMAP_BLOCK); + roadmap_hash_resize (PointById, (block+1) * BUILDMAP_BLOCK); } roadmap_hash_add (PointByPosition, longitude, PointCount); + roadmap_hash_add (PointById, db_id, PointCount); this_point = Point[block] + offset; *************** *** 255,258 **** --- 260,287 ---- + int buildmap_point_find_sorted (int db_id) { + + int index; + BuildMapPoint *this_point; + + if (SortedPoint == NULL) { + buildmap_fatal (0, "points not sorted yet"); + } + + for (index = roadmap_hash_get_first (PointById, db_id); + index >= 0; + index = roadmap_hash_get_next (PointById, index)) { + + this_point = Point[index / BUILDMAP_BLOCK] + (index % BUILDMAP_BLOCK); + + if (this_point->db_id == db_id) { + return this_point->sorted; + } + } + + return -1; + } + + static int buildmap_point_compare (const void *r1, const void *r2) { *************** *** 429,432 **** --- 458,462 ---- PointByPosition = NULL; + PointById = NULL; SortMaxLongitude = -0x7fffffff; Index: buildmap_postgres.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_postgres.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** buildmap_postgres.c 25 Dec 2005 23:07:08 -0000 1.3 --- buildmap_postgres.c 22 Mar 2006 08:46:52 -0000 1.4 *************** *** 54,61 **** --- 54,63 ---- #include "buildmap_line.h" #include "buildmap_line_route.h" + #include "buildmap_dglib.h" #include "buildmap_street.h" #include "buildmap_range.h" #include "buildmap_area.h" #include "buildmap_shape.h" + #include "buildmap_turn_restrictions.h" #include "buildmap_polygon.h" *************** *** 70,73 **** --- 72,76 ---- static const char *country_borders_sql = "SELECT id AS id, AsText(the_geom) AS the_geom FROM boundaries;"; static const char *water_sql = "SELECT id AS id, AsText(the_geom) AS the_geom FROM water;"; + static const char *turn_restrictions_sql = "SELECT node_id, seg1_id, seg2_id FROM turn_restrictions;"; static BuildMapDictionary DictionaryPrefix; *************** *** 383,386 **** --- 386,394 ---- from_cross_time, to_cross_time, line); + + buildmap_dglib_add + (from_car_allowed, to_car_allowed, from_max_speed, to_max_speed, + from_cross_time, to_cross_time, + line); } *************** *** 457,460 **** --- 465,522 ---- + static void buildmap_postgres_read_turn_restrictions (int verbose) { + + int irec; + int record_count; + + int node_index; + int node_id; + + PGresult *db_result; + + db_result = PQexec(hPGConn, turn_restrictions_sql); + + if (!db_result_ok (db_result)) { + + fprintf + (stderr, "Can't query database: %s\n", PQerrorMessage(hPGConn)); + PQfinish(hPGConn); + exit(-1); + } + + record_count = PQntuples(db_result); + + for (irec=0; irec<record_count; irec++) { + + int from_line; + int to_line; + + buildmap_set_line (irec); + + node_id = atoi(PQgetvalue(db_result, irec, 0)); + from_line = atoi(PQgetvalue(db_result, irec, 1)); + to_line = atoi(PQgetvalue(db_result, irec, 2)); + + node_index = buildmap_point_find_sorted(node_id); + from_line = buildmap_line_find_sorted(from_line); + to_line = buildmap_line_find_sorted(to_line); + + if (node_index < 0) continue; + buildmap_turn_restrictions_add(node_index, from_line, to_line); + + if (verbose) { + if ((irec & 0xff) == 0) { + buildmap_progress (irec, record_count); + } + } + + } + + PQclear(db_result); + + postgres_summary (verbose, record_count); + } + + static void buildmap_postgres_read_borders_lines (int verbose) { *************** *** 757,760 **** --- 819,823 ---- 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); buildmap_postgres_read_water_polygons (verbose); Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/Makefile,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile 17 Mar 2006 09:47:30 -0000 1.9 --- Makefile 22 Mar 2006 08:46:52 -0000 1.10 *************** *** 88,96 **** ! CFLAGS=$(MODECFLAGS) $(SQLCFLAGS) $(ROADMAP_USE_SHAPEFILES) -I/usr/local/include -I$(PWD) -DROADMAP_USE_POSTGRES ! LDFLAGS=$(MODELDFLAGS) $(SQLLDFLAGS) $(SHAPELDFLAGS) -lpq RDMLIBS=libroadmap.a unix/libosroadmap.a ! LIBS=$(RDMLIBS) -lpopt -lm --- 88,96 ---- ! CFLAGS=$(MODECFLAGS) $(SQLCFLAGS) $(ROADMAP_USE_SHAPEFILES) -I/usr/local/include -I$(PWD) -I./dglib -DROADMAP_USE_POSTGRES ! LDFLAGS=$(MODELDFLAGS) $(SQLLDFLAGS) $(SHAPELDFLAGS) -lpq -L ./dglib RDMLIBS=libroadmap.a unix/libosroadmap.a ! LIBS=$(RDMLIBS) -lpopt -lm -ldgl *************** *** 116,119 **** --- 116,120 ---- roadmap_line_route.c \ roadmap_shape.c \ + roadmap_turns.c \ roadmap_place.c \ roadmap_polygon.c \ *************** *** 189,193 **** editor/track/editor_track_unknown.c \ editor/track/editor_track_known.c \ ! editor/db/editor_db.c RMPLUGINOBJS=$(RMPLUGINSRCS:.c=.o) --- 190,197 ---- editor/track/editor_track_unknown.c \ editor/track/editor_track_known.c \ ! editor/db/editor_db.c \ ! navigate/navigate_main.c \ ! navigate/navigate_plugin.c \ ! navigate/navigate_dglib.c \ RMPLUGINOBJS=$(RMPLUGINSRCS:.c=.o) *************** *** 210,214 **** --- 214,220 ---- buildmap_line.c \ buildmap_line_route.c \ + buildmap_dglib.c \ buildmap_shape.c \ + buildmap_turn_restrictions.c \ buildmap_polygon.c \ buildmap_range.c \ Index: buildmap_point.h =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/buildmap_point.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** buildmap_point.h 12 Dec 2005 20:35:41 -0000 1.2 --- buildmap_point.h 22 Mar 2006 08:46:52 -0000 1.3 *************** *** 36,39 **** --- 36,40 ---- int buildmap_point_get_latitude_sorted (int point); int buildmap_point_get_square_sorted (int point); + int buildmap_point_find_sorted (int db_id); void buildmap_point_save (void); |
From: Ehud S. <esh...@us...> - 2006-03-22 08:43:32
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2564 Added Files: roadmap_db_turns.h roadmap_turns.c roadmap_turns.h Log Message: Add functions to access the turn restrictions data. --- NEW FILE: roadmap_turns.h --- /* roadmap_turns.h - Manage the turn restrictions table. * * LICENSE: * * Copyright 2006 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _ROADMAP_TURNS__H_ #define _ROADMAP_TURNS__H_ #include "roadmap_types.h" #include "roadmap_dbread.h" int roadmap_turns_in_square (int square, int *first, int *last); int roadmap_turns_of_line (int line, int begin, int end, int *first, int *last); int roadmap_turns_find_restriction (int node, int from_line, int to_line); extern roadmap_db_handler RoadMapTurnsHandler; #endif // _ROADMAP_TURNS__H_ --- NEW FILE: roadmap_db_turns.h --- /* roadmap_db_turns.h - the format of the turn restrictions table used by RoadMap. * * LICENSE: * * Copyright 2006 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #ifndef _ROADMAP_DB_TURNS_H_ #define _ROADMAP_DB_TURNS_H_ #include "roadmap_types.h" typedef struct { int from_line; int to_line; } RoadMapTurns; typedef struct { int node; int first; int count; } RoadMapTurnsByNode; typedef struct { int first; int count; } RoadMapTurnsBySquare; #endif // _ROADMAP_DB_TURNS_H_ --- NEW FILE: roadmap_turns.c --- /* roadmap_turns.c - Manage turn restrictions db. * * LICENSE: * * Copyright 2006 Ehud Shabtai. * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * SYNOPSYS: * * int roadmap_turns_in_square (int square, int *first, int *last); * int roadmap_turns_of_node (int node, int begin, int end, * int *first, int *last); * int roadmap_turns_find_restriction (int node, int from_line, int to_line); * * These functions are used to retrieve the turn restrictions that belong to a node. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include "roadmap.h" #include "roadmap_dbread.h" #include "roadmap_db_turns.h" #include "roadmap_point.h" #include "roadmap_turns.h" #include "roadmap_square.h" static char *RoadMapTurnsType = "RoadMapTurnsContext"; typedef struct { char *type; RoadMapTurns *Turns; int TurnsCount; RoadMapTurnsByNode *TurnsByNode; int TurnsByNodeCount; RoadMapTurnsBySquare *TurnsBySquare; int TurnsBySquareCount; int *turns_cache; int turns_cache_size; /* This is the size in bits ! */ } RoadMapTurnsContext; static RoadMapTurnsContext *RoadMapTurnsActive = NULL; static int RoadMapTurns2Mask[8*sizeof(int)] = {0}; static void *roadmap_turns_map (roadmap_db *root) { unsigned i; RoadMapTurnsContext *context; roadmap_db *turns_table; roadmap_db *node_table; roadmap_db *square_table; for (i = 0; i < 8*sizeof(int); i++) { RoadMapTurns2Mask[i] = 1 << i; } context = malloc(sizeof(RoadMapTurnsContext)); roadmap_check_allocated(context); context->type = RoadMapTurnsType; turns_table = roadmap_db_get_subsection (root, "data"); node_table = roadmap_db_get_subsection (root, "bynode"); square_table = roadmap_db_get_subsection (root, "bysquare"); context->Turns = (RoadMapTurns *) roadmap_db_get_data (turns_table); context->TurnsCount = roadmap_db_get_count (turns_table); if (roadmap_db_get_size (turns_table) != context->TurnsCount * sizeof(RoadMapTurns)) { roadmap_log (ROADMAP_FATAL, "invalid turns/data structure"); } context->TurnsByNode = (RoadMapTurnsByNode *) roadmap_db_get_data (node_table); context->TurnsByNodeCount = roadmap_db_get_count (node_table); if (roadmap_db_get_size (node_table) != context->TurnsByNodeCount * sizeof(RoadMapTurnsByNode)) { roadmap_log (ROADMAP_FATAL, "invalid turns/byline structure"); } context->TurnsBySquare = (RoadMapTurnsBySquare *) roadmap_db_get_data (square_table); context->TurnsBySquareCount = roadmap_db_get_count (square_table); if (roadmap_db_get_size (square_table) != context->TurnsBySquareCount * sizeof(RoadMapTurnsBySquare)) { roadmap_log (ROADMAP_FATAL, "invalid turns/bysquare structure"); } context->turns_cache = NULL; context->turns_cache_size = 0; return context; } static void roadmap_turns_activate (void *context) { RoadMapTurnsContext *turns_context = (RoadMapTurnsContext *) context; if (turns_context != NULL) { if (turns_context->type != RoadMapTurnsType) { roadmap_log (ROADMAP_FATAL, "cannot activate turns (bad type)"); } if (turns_context->turns_cache == NULL) { turns_context->turns_cache_size = roadmap_point_count(); turns_context->turns_cache = calloc ((turns_context->turns_cache_size / (8 * sizeof(int))) + 1, sizeof(int)); roadmap_check_allocated(turns_context->turns_cache); } } RoadMapTurnsActive = turns_context; } static void roadmap_turns_unmap (void *context) { RoadMapTurnsContext *turns_context = (RoadMapTurnsContext *) context; if (turns_context->type != RoadMapTurnsType) { roadmap_log (ROADMAP_FATAL, "cannot unmap turns (bad type)"); } if (RoadMapTurnsActive == turns_context) { RoadMapTurnsActive = NULL; } if (turns_context->turns_cache != NULL) { free (turns_context->turns_cache); } free(turns_context); } roadmap_db_handler RoadMapTurnsHandler = { "turns", roadmap_turns_map, roadmap_turns_activate, roadmap_turns_unmap }; int roadmap_turns_in_square (int square, int *first, int *last) { RoadMapTurnsBySquare *TurnsBySquare; if (RoadMapTurnsActive == NULL) return 0; square = roadmap_square_index(square); if (square >= 0 && square < RoadMapTurnsActive->TurnsBySquareCount) { TurnsBySquare = RoadMapTurnsActive->TurnsBySquare; *first = TurnsBySquare[square].first; *last = TurnsBySquare[square].first + TurnsBySquare[square].count - 1; return TurnsBySquare[square].count; } return 0; } int roadmap_turns_of_node (int node, int begin, int end, int *first, int *last) { int middle = 0; RoadMapTurnsByNode *turns_by_node; if (RoadMapTurnsActive == NULL) return 0; if (node >= 0 && node < RoadMapTurnsActive->turns_cache_size) { int mask = RoadMapTurnsActive->turns_cache[node / (8 * sizeof(int))]; if (mask & RoadMapTurns2Mask[node & ((8*sizeof(int))-1)]) { return 0; } } turns_by_node = RoadMapTurnsActive->TurnsByNode; begin--; end++; while (end - begin > 1) { middle = (begin + end) / 2; if (node < turns_by_node[middle].node) { end = middle; } else if (node > turns_by_node[middle].node) { begin = middle; } else { end = middle; break; } } if (turns_by_node[end].node == node) { *first = turns_by_node[end].first; *last = turns_by_node[end].first + turns_by_node[end].count - 1; return turns_by_node[end].count; } RoadMapTurnsActive->turns_cache[node / (8 * sizeof(int))] |= RoadMapTurns2Mask[node & ((8*sizeof(int))-1)]; return 0; } int roadmap_turns_find_restriction (int node, int from_line, int to_line) { static int cache_square = -1; static int cache_first = -1; static int cache_last = -1; RoadMapPosition pos; int square; int first_turn; int last_turn; int i; roadmap_point_position (node, &pos); square = roadmap_square_search (&pos); if (square != cache_square) { cache_square = square; if (!roadmap_turns_in_square (cache_square, &cache_first, &cache_last)) { cache_first = cache_last = -1; } } if (cache_first < 0) return 0; i = roadmap_turns_of_node (node, cache_first, cache_last, &first_turn, &last_turn); if (!i) return 0; for (; first_turn <= last_turn; first_turn++) { if ((RoadMapTurnsActive->Turns[first_turn].from_line == from_line) && RoadMapTurnsActive->Turns[first_turn].to_line == to_line) return 1; } return 0; } |
From: Ehud S. <esh...@us...> - 2006-03-22 08:42:38
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2059 Added Files: buildmap_turn_restrictions.c buildmap_turn_restrictions.h Log Message: Buildmap module for turn restrictions. --- NEW FILE: buildmap_turn_restrictions.h --- /* buildmap_turn_restrictions.h - Build a turn restrictions table & index for RoadMap. * * LICENSE: * * Copyright 2006 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _BUILDMAP_TURN_REST_H_ #define _BUILDMAP_TURN_REST_H_ #include "roadmap_types.h" void buildmap_turn_restrictions_initialize (void); int buildmap_turn_restrictions_add (int node, int from_line, int to_line); void buildmap_turn_restrictions_sort (void); void buildmap_turn_restrictions_save (void); void buildmap_turn_restrictions_summary (void); void buildmap_turn_restrictions_reset (void); #endif // _BUILDMAP_TURN_REST_H_ --- NEW FILE: buildmap_turn_restrictions.c --- /* buildmap_turn_restrictions.c - Build turn restrictions table & index for RoadMap. * * LICENSE: * * Copyright 2006 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * SYNOPSYS: * * void buildmap_turn_restrictions_initialize (void); * int buildmap_turn_restrictions_add * (int node, int from_line, int to_line); * void buildmap_turn_restrictions_sort (void); * void buildmap_turn_restrictions_save (void); * void buildmap_turn_restrictions_summary (void); * void buildmap_turn_restrictions_reset (void); * * These functions are used to build a table of shape points from * the Tiger maps. The objective is double: (1) reduce the size of * the Tiger data by sharing all duplicated information and * (2) produce the index data to serve as the basis for a fast * search mechanism for areas in roadmap. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include "roadmap_db_turns.h" #include "roadmap_hash.h" #include "buildmap.h" #include "buildmap_turn_restrictions.h" #include "buildmap_square.h" #include "buildmap_point.h" typedef struct { int node; int from_line; int to_line; } BuildMapTurns; static int TurnsCount = 0; static int TurnsNodeCount = 0; static int TurnsMaxNode = 0; static BuildMapTurns *Turns[BUILDMAP_BLOCK] = {NULL}; static RoadMapHash *TurnsByNode = NULL; static int TurnsAddCount = 0; static int *SortedTurns = NULL; void buildmap_turn_restrictions_initialize (void) { TurnsByNode = roadmap_hash_new ("TurnsByNode", BUILDMAP_BLOCK); TurnsMaxNode = 0; TurnsAddCount = 0; TurnsCount = 0; } int buildmap_turn_restrictions_add (int node, int from_line, int to_line) { int index; int node_exists; int block; int offset; BuildMapTurns *this_turn; TurnsAddCount += 1; /* First search if that shape is not known yet. */ node_exists = 0; for (index = roadmap_hash_get_first (TurnsByNode, node); index >= 0; index = roadmap_hash_get_next (TurnsByNode, index)) { this_turn = Turns[index / BUILDMAP_BLOCK] + (index % BUILDMAP_BLOCK); if (this_turn->node == node) { if ((this_turn->from_line == from_line) && (this_turn->to_line == to_line )) { buildmap_error (0, "duplicated turn_restriction: %d %d %d", node, from_line, to_line); } node_exists = 1; } } /* This shape was not known yet: create a new one. */ block = TurnsCount / BUILDMAP_BLOCK; offset = TurnsCount % BUILDMAP_BLOCK; if (block >= BUILDMAP_BLOCK) { buildmap_fatal (0, "too many shape records"); } if (Turns[block] == NULL) { /* We need to add a new block to the table. */ Turns[block] = calloc (BUILDMAP_BLOCK, sizeof(BuildMapTurns)); if (Turns[block] == NULL) { buildmap_fatal (0, "no more memory"); } roadmap_hash_resize (TurnsByNode, (block+1) * BUILDMAP_BLOCK); } this_turn = Turns[block] + offset; this_turn->node = node; this_turn->from_line = from_line; this_turn->to_line = to_line; if (! node_exists) { TurnsNodeCount += 1; if (node > TurnsMaxNode) { TurnsMaxNode = node; } if (node < 0) { buildmap_fatal (0, "negative node index: %d", node); } } roadmap_hash_add (TurnsByNode, node, TurnsCount); return TurnsCount++; } static int buildmap_turns_compare (const void *r1, const void *r2) { int index1 = *((int *)r1); int index2 = *((int *)r2); BuildMapTurns *record1; BuildMapTurns *record2; record1 = Turns[index1/BUILDMAP_BLOCK] + (index1 % BUILDMAP_BLOCK); record2 = Turns[index2/BUILDMAP_BLOCK] + (index2 % BUILDMAP_BLOCK); if (record1->node != record2->node) { return record1->node - record2->node; } if (record1->from_line != record2->from_line) { return record1->from_line - record2->from_line; } return record1->to_line - record2->to_line; } void buildmap_turn_restrictions_sort (void) { int i; if (SortedTurns != NULL) return; /* Sort was already performed. */ buildmap_info ("sorting turn restrictions..."); SortedTurns = malloc (TurnsCount * sizeof(int)); if (SortedTurns == NULL) { buildmap_fatal (0, "no more memory"); } for (i = 0; i < TurnsCount; i++) { SortedTurns[i] = i; } qsort (SortedTurns, TurnsCount, sizeof(int), buildmap_turns_compare); } void buildmap_turn_restrictions_save (void) { int i; int j; int square; int last_node = -1; int node_index = -1; int turn_index; int last_square = -1; int square_count; int longitude = 0; int latitude = 0; RoadMapTurns *db_turns; BuildMapTurns *one_turn; RoadMapTurnsByNode *db_by_node; RoadMapTurnsBySquare *db_bysquare; buildmap_db *root; buildmap_db *table_square; buildmap_db *table_node; buildmap_db *table_data; buildmap_info ("saving turn restrictions..."); root = buildmap_db_add_section (NULL, "turns"); if (root == NULL) buildmap_fatal (0, "Can't add a new section"); square_count = buildmap_square_get_count(); /* Create the database space. */ table_square = buildmap_db_add_child (root, "bysquare", square_count, sizeof(RoadMapTurnsBySquare)); table_node = buildmap_db_add_child (root, "bynode", TurnsNodeCount, sizeof(RoadMapTurnsByNode)); table_data = buildmap_db_add_child (root, "data", TurnsCount, sizeof(RoadMapTurns)); db_bysquare = (RoadMapTurnsBySquare *) buildmap_db_get_data (table_square); db_by_node = (RoadMapTurnsByNode *) buildmap_db_get_data (table_node); db_turns = (RoadMapTurns *) buildmap_db_get_data (table_data); last_node = -1; for (i = 0, turn_index = 0; i < TurnsCount; i++, turn_index++) { j = SortedTurns[i]; one_turn = Turns[j/BUILDMAP_BLOCK] + (j % BUILDMAP_BLOCK); if (one_turn->node != last_node) { if (last_node > one_turn->node) { buildmap_fatal (0, "decreasing node order in turn restrictions table"); } node_index += 1; db_by_node[node_index].node = one_turn->node; db_by_node[node_index].first = turn_index; db_by_node[node_index].count = 0; last_node = one_turn->node; longitude = buildmap_point_get_longitude_sorted (last_node); latitude = buildmap_point_get_latitude_sorted (last_node); square = buildmap_point_get_square_sorted (last_node); if (square != last_square) { if (square < last_square) { buildmap_fatal (0, "decreasing square order in turns table"); } while (last_square < square) { last_square += 1; db_bysquare[last_square].first = node_index; db_bysquare[last_square].count = 0; } } db_bysquare[last_square].count += 1; } db_by_node[node_index].count += 1; db_turns[turn_index].from_line = one_turn->from_line; db_turns[turn_index].to_line = one_turn->to_line; } if (turn_index != TurnsCount) { buildmap_fatal (0, "inconsistent count of turn restrictions: " "total = %d, saved = %d", TurnsCount, turn_index+1); } if (last_square >= square_count) { buildmap_fatal (0, "inconsistent count of squares: " "total = %d, saved = %d", square_count, last_square+1); } for (last_square += 1; last_square < square_count; last_square += 1) { db_bysquare[last_square].first = node_index; db_bysquare[last_square].count = 0; } if (node_index+1 != TurnsNodeCount) { buildmap_fatal (0, "inconsistent count of nodes: " "total = %d, saved = %d", TurnsNodeCount, node_index+1); } } void buildmap_turn_restrictions_summary (void) { fprintf (stderr, "-- turn restrictions table: %d items, %d add, %d bytes used\n" " %d lines (range %d), max %d points per line\n", TurnsCount, 0, TurnsCount * sizeof(RoadMapTurns) + (TurnsMaxNode + 1) * sizeof(RoadMapTurnsByNode), TurnsNodeCount, TurnsMaxNode, 0); } void buildmap_turn_restrictions_reset (void) { int i; for (i = 0; i < BUILDMAP_BLOCK; i++) { if (Turns[i] != NULL) { free(Turns[i]); Turns[i] = NULL; } } free (SortedTurns); SortedTurns = NULL; TurnsCount = 0; TurnsNodeCount = 0; TurnsMaxNode = 0; TurnsByNode = NULL; } |
From: Ehud S. <esh...@us...> - 2006-03-22 08:41:58
|
Update of /cvsroot/roadmap/roadmap_editor/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1613 Added Files: buildmap_dglib.c buildmap_dglib.h Log Message: Buildmap module to create dglib database. --- NEW FILE: buildmap_dglib.h --- /* buildmap_dglib.h - Build dglib graph. * * LICENSE: * * Copyright 2006 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _BUILDMAP_DGLIB__H_ #define _BUILDMAP_DGLIB__H_ void buildmap_dglib_initialize (time_t creation_time); int buildmap_dglib_add (unsigned char from_flags, unsigned char to_flags, unsigned char from_max_speed, unsigned char to_max_speed, unsigned short from_cross_time, unsigned short to_cross_time, int line); void buildmap_dglib_sort (void); int buildmap_dglib_count (void); void buildmap_dglib_save (const char *path, const char *name); void buildmap_dglib_summary (void); void buildmap_dglib_reset (time_t creation_time); #endif // _BUILDMAP_DGLIB__H_ --- NEW FILE: buildmap_dglib.c --- /* buildmap_dglib.c - Build dglib graph * * LICENSE: * * Copyright 2006 Ehud Shabtai * * This file is part of RoadMap. * * RoadMap is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * RoadMap is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RoadMap; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * SYNOPSYS: * * void buildmap_dglib_initialize (void); * int buildmap_dglib_add * (unsigned char from_flags, * unsigned char to_flags, * unsigned char from_max_speed, * unsigned char to_max_speed, * unsigned short from_cross_time, * unsigned short to_cross_time, * int line); * int buildmap_dglib_count (void); * void buildmap_dglib_sort (void); * void buildmap_dglib_save (void); * void buildmap_dglib_summary (void); * void buildmap_dglib_reset (void); * */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> /* temp for creating a graph file */ #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <stdlib.h> #include <fcntl.h> /* dglib */ #include "type.h" #include "graph.h" #include "buildmap.h" #include "buildmap_line.h" #include "buildmap_line_route.h" #include "buildmap_dglib.h" static dglGraph_s graph; static int EgdesCount = 0; void buildmap_dglib_initialize (time_t creation_time) { dglInt32_t opaqueset[ 16 ] = { creation_time, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; dglInitialize ( & graph , /* graph context to initialize */ 2 , 0 , /* node attributes size */ 0 , /* edge attributes size */ opaqueset /* opaque graph parameters */ ); EgdesCount = 0; } int buildmap_dglib_add (unsigned char from_flags, unsigned char to_flags, unsigned char from_max_speed, unsigned char to_max_speed, unsigned short from_cross_time, unsigned short to_cross_time, int line) { int from; int to; int status; buildmap_line_get_points_sorted (line, &from, &to); if (from_flags & ROUTE_CAR_ALLOWED) { EgdesCount++; status = dglAddEdgeX( &graph , from , to , from_cross_time , line , NULL , NULL , NULL , 0 ); if ( status < 0 ) { buildmap_fatal (0, "dglAddEdge error: %s\n", dglStrerror( &graph ) ); } } if (to_flags & ROUTE_CAR_ALLOWED) { EgdesCount++; status = dglAddEdgeX( &graph , to , from , to_cross_time , -line , NULL , NULL , NULL , 0 ); if ( status < 0 ) { buildmap_fatal (0, "dglAddEdge error: %s\n", dglStrerror( &graph ) ); } } return EgdesCount; } void buildmap_dglib_sort (void) {} void buildmap_dglib_save (const char *path, const char *name) { int nret; FILE *fd; char full_name[255]; snprintf(full_name, sizeof(full_name), "%s/%s.dgl", path, name); printf( "graph flattening..." ); fflush(stdout); nret = dglFlatten( & graph ); if ( nret < 0 ) { buildmap_fatal (0, "dglFlatten error: %s\n", dglStrerror( &graph ) ); } printf( "done.\n" ); printf( "graph write..." ); fflush(stdout); if ( (fd = fopen( full_name , "w")) == NULL ) { buildmap_fatal (0, "dgl open error.\n"); } nret = dglWrite( & graph , fd ); if ( nret < 0 ) { buildmap_fatal (0, "dglWrite error: %s\n", dglStrerror( &graph ) ); } fclose( fd ); printf( "done.\n" ); printf( "graph release..." ); fflush(stdout); dglRelease( & graph ); printf( "program finished.\n" ); return; } void buildmap_dglib_summary (void) { fprintf (stderr, "-- dglib table statistics: %d edges, %d bytes used\n", EgdesCount, 0); } void buildmap_dglib_reset (time_t creation_time) { buildmap_dglib_initialize(creation_time); } |
From: Ehud S. <esh...@us...> - 2006-03-22 08:40:59
|
Update of /cvsroot/roadmap/roadmap_editor/src/navigate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1028/navigate Log Message: Directory /cvsroot/roadmap/roadmap_editor/src/navigate added to the repository |
From: Ehud S. <esh...@us...> - 2006-03-22 08:39:31
|
Update of /cvsroot/roadmap/roadmap_editor/src/dglib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv301/dglib Log Message: Directory /cvsroot/roadmap/roadmap_editor/src/dglib added to the repository |
From: Ehud S. <esh...@us...> - 2006-03-17 09:59:32
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14735 Modified Files: roadmap_fileselection.c Log Message: Add support for default extensions. Index: roadmap_fileselection.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/roadmap_fileselection.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** roadmap_fileselection.c 15 Oct 2005 22:19:11 -0000 1.1.1.1 --- roadmap_fileselection.c 17 Mar 2006 09:59:27 -0000 1.2 *************** *** 43,46 **** --- 43,47 ---- WCHAR filename[MAX_PATH] = {0}; WCHAR strFilter[MAX_PATH] = {0}; + LPWSTR fltr = NULL; LPWSTR title_unicode = ConvertToWideChar(title, CP_UTF8); BOOL res; *************** *** 55,62 **** ofn.lpstrTitle = title_unicode; if (filter != NULL) { ! LPWSTR fltr = ConvertToWideChar(filter, CP_UTF8); _snwprintf(strFilter, sizeof(strFilter)/sizeof(strFilter[0]), ! TEXT("%s\0%s\0"), fltr, fltr); ! free(fltr); ofn.lpstrFilter = strFilter; } else { --- 56,63 ---- ofn.lpstrTitle = title_unicode; if (filter != NULL) { ! fltr = ConvertToWideChar(filter, CP_UTF8); _snwprintf(strFilter, sizeof(strFilter)/sizeof(strFilter[0]), ! TEXT("*.%s\0*.%s\0"), fltr, fltr); ! ofn.lpstrDefExt = fltr; ofn.lpstrFilter = strFilter; } else { *************** *** 74,77 **** --- 75,79 ---- free((char*)ofn.lpstrTitle); + if (fltr) free(fltr); if (res) { |
From: Ehud S. <esh...@us...> - 2006-03-17 09:59:12
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14387 Modified Files: wince_input_mon.c Log Message: Decrease retry timeout to 2 seconds. Index: wince_input_mon.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/wince_input_mon.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wince_input_mon.c 17 Dec 2005 21:59:48 -0000 1.4 --- wince_input_mon.c 17 Mar 2006 09:59:00 -0000 1.5 *************** *** 47,51 **** NULL, OPEN_EXISTING, ! 0, NULL); --- 47,51 ---- NULL, OPEN_EXISTING, ! FILE_FLAG_WRITE_THROUGH, NULL); *************** *** 117,126 **** * and this input will be removed. */ ! /* Sleep to avoid busy loop, as RoadMap will try to create * a new connection as soon as the message is sent ! */ ! ! Sleep(3000); conn->data_count = -1; --- 117,126 ---- * and this input will be removed. */ ! /* Sleep to avoid busy loop, as RoadMap will try to create * a new connection as soon as the message is sent ! */ ! ! Sleep(2000); conn->data_count = -1; *************** *** 128,132 **** } ! while(conn->handle != INVALID_HANDLE_VALUE) { if (conn->data_count == 0) { --- 128,132 ---- } ! while(conn->handle != INVALID_HANDLE_VALUE) { if (conn->data_count == 0) { |
From: Ehud S. <esh...@us...> - 2006-03-17 09:58:32
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14226 Modified Files: roadmap_dialog.c Log Message: Modify the combo boxes to show all their options. Index: roadmap_dialog.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/roadmap_dialog.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** roadmap_dialog.c 31 Dec 2005 09:58:00 -0000 1.3 --- roadmap_dialog.c 17 Mar 2006 09:58:29 -0000 1.4 *************** *** 1032,1037 **** if (item->widget_type == ROADMAP_WIDGET_CHOICE) { widget_height = height - curr_y - 2; ! if (widget_height > MAX_LIST_HEIGHT) { ! widget_height = MAX_LIST_HEIGHT; } } --- 1032,1037 ---- if (item->widget_type == ROADMAP_WIDGET_CHOICE) { widget_height = height - curr_y - 2; ! if (widget_height > MAX_LIST_HEIGHT*2) { ! widget_height = MAX_LIST_HEIGHT*2; } } |
From: Ehud S. <esh...@us...> - 2006-03-17 09:58:15
|
Update of /cvsroot/roadmap/roadmap_editor/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13879 Modified Files: preferences Log Message: Change default download site to www.freemap.co.il Index: preferences =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/win32/preferences,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** preferences 31 Dec 2005 09:58:00 -0000 1.5 --- preferences 17 Mar 2006 09:58:06 -0000 1.6 *************** *** 20,24 **** Map.GPS map offset longitude: 0 Map.GPS map offset latitude: 0 ! Download.Source: http://www.eshabtai.net/roadmap/maps/usc%05d.rdm History.Depth: 100 GPS.Timeout: 10 --- 20,24 ---- Map.GPS map offset longitude: 0 Map.GPS map offset latitude: 0 ! Download.Source: http://www.freemap.co.il/roadmap/maps/usc%05d.rdm History.Depth: 100 GPS.Timeout: 10 |
From: Ehud S. <esh...@us...> - 2006-03-17 09:56:39
|
Update of /cvsroot/roadmap/roadmap_editor/src/gtk2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13267 Modified Files: Makefile Log Message: Add NDEBUG to release mode. Index: Makefile =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/gtk2/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 28 Nov 2005 19:36:34 -0000 1.2 --- Makefile 17 Mar 2006 09:56:32 -0000 1.3 *************** *** 48,52 **** ! CFLAGS = $(STDCFLAGS) $(GPECFLAGS) $(GUICFLAGS) -I.. -I/usr/local/include LIBS = -L/usr/local/lib $(RDMLIBS) $(GPELDFLAGS) $(GUILDFLAGS) -lm --- 48,52 ---- ! CFLAGS = $(STDCFLAGS) $(GPECFLAGS) $(GUICFLAGS) -I.. -I/usr/local/include -DNDEBUG LIBS = -L/usr/local/lib $(RDMLIBS) $(GPELDFLAGS) $(GUILDFLAGS) -lm |
From: Ehud S. <esh...@us...> - 2006-03-17 09:56:06
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/track In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12918 Modified Files: editor_track_main.c editor_track_unknown.c editor_track_util.c Log Message: Fix first new point in unknown location bug. Index: editor_track_util.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_util.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** editor_track_util.c 25 Dec 2005 23:10:43 -0000 1.6 --- editor_track_util.c 17 Mar 2006 09:56:00 -0000 1.7 *************** *** 418,422 **** //editor_track_util_release_focus (); ! assert (result.distance < 3*editor_track_point_distance ()); split_position.longitude = result.intersection.longitude; --- 418,422 ---- //editor_track_util_release_focus (); ! assert (result.distance < 5*editor_track_point_distance ()); split_position.longitude = result.intersection.longitude; Index: editor_track_main.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_main.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** editor_track_main.c 31 Dec 2005 09:58:51 -0000 1.9 --- editor_track_main.c 17 Mar 2006 09:56:00 -0000 1.10 *************** *** 209,213 **** RoadMapNeighbour *new_line) { ! int fips = roadmap_plugin_get_fips (&TrackConfirmedLine.line); if (editor_db_activate (fips) == -1) { --- 209,221 ---- RoadMapNeighbour *new_line) { ! int fips; ! ! if (!TrackConfirmedStreet.valid) { ! TrackConfirmedLine = *new_line; ! TrackConfirmedStreet = *new_street; ! return; ! } ! ! fips = roadmap_plugin_get_fips (&TrackConfirmedLine.line); if (editor_db_activate (fips) == -1) { *************** *** 295,298 **** --- 303,319 ---- NodeNeighbour end_node = NODE_NEIGHBOUR_NULL; + int fips = editor_db_locator (track_point_pos (start_point)); + + if (editor_db_activate (fips) == -1) { + + editor_db_create (fips); + if (editor_db_activate (fips) == -1) { + roadmap_log (ROADMAP_ERROR, "Can't end unknown segment."); + + track_reset_points (-1); + return; + } + } + for (i=0; i<count; i++) { Index: editor_track_unknown.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/track/editor_track_unknown.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** editor_track_unknown.c 25 Dec 2005 23:10:43 -0000 1.3 --- editor_track_unknown.c 17 Mar 2006 09:56:00 -0000 1.4 *************** *** 451,452 **** --- 451,453 ---- } } + |
From: Ehud S. <esh...@us...> - 2006-03-17 09:54:39
|
Update of /cvsroot/roadmap/roadmap_editor/src/editor/static In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12330 Modified Files: editor_dialog.c Log Message: Modify the combo boxes to show all their options. Index: editor_dialog.c =================================================================== RCS file: /cvsroot/roadmap/roadmap_editor/src/editor/static/editor_dialog.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** editor_dialog.c 25 Dec 2005 23:09:19 -0000 1.5 --- editor_dialog.c 17 Mar 2006 09:54:36 -0000 1.6 *************** *** 610,614 **** roadmap_dialog_set_data ("General", "City", r_city); } ! if (strlen(l_zip)) { roadmap_dialog_set_data ("General", "Zip code", l_zip); --- 610,616 ---- roadmap_dialog_set_data ("General", "City", r_city); } ! ! roadmap_dialog_set_data ("General", "Direction", (void *)direction); ! if (strlen(l_zip)) { roadmap_dialog_set_data ("General", "Zip code", l_zip); *************** *** 616,621 **** roadmap_dialog_set_data ("General", "Zip code", r_zip); } - roadmap_dialog_set_data ("General", "Direction", (void *)direction); - snprintf(range_str, sizeof(range_str), "%d", speed_limit); roadmap_dialog_set_data ("General", "Speed Limit", range_str); --- 618,621 ---- *************** *** 692,698 **** roadmap_dialog_new_entry ("General", "Street range"); roadmap_dialog_new_entry ("General", "City"); - roadmap_dialog_new_entry ("General", "Zip code"); roadmap_dialog_new_choice ("General", "Direction", 4, direction_txts, ! (void**)direction_values, NULL); roadmap_dialog_new_entry ("General", "Speed Limit"); --- 692,698 ---- roadmap_dialog_new_entry ("General", "Street range"); roadmap_dialog_new_entry ("General", "City"); roadmap_dialog_new_choice ("General", "Direction", 4, direction_txts, ! (void**)direction_values, NULL); ! roadmap_dialog_new_entry ("General", "Zip code"); roadmap_dialog_new_entry ("General", "Speed Limit"); |