summaryrefslogtreecommitdiff
path: root/navit/navit.c
Commit message (Collapse)AuthorAgeFilesLines
* fix:core:Fix sunrise/sunset layout switchOLFDB2023-01-111-12/+35
| | | | | | | | | | | Fix #1185 2 (#1216) * Initial commit * Fix:1185 Verified against https://api.sunrise-sunset.org for any integer coordinate -180 -90, -179,-90 ... 179 90, 180 90. * Changed loglevel
* fix:core:Forcefully terminate string read with fgetsStefan Wildemann2022-09-211-0/+2
|
* fix:navit: Fix -Waddress warningBastian Koppelmann2022-08-301-1/+1
| | | | | | | | since 'lastline[]' is stack-allocated it can never be NULL, thus we don't need to check for that. This fixes the following compiler warning: warning: the comparison will always evaluate as ‘true’ for the address of ‘lastline’ will never be NULL [-Waddress] 1809 | if ((lastline != NULL) && (strcmp(lastline, TEXTFILE_COMMENT_NAVI_STOPPED))) {
* fix:sailfish:enable sandboxing for sailfish OS. (#1182)Stefan Wildemann2022-05-231-1/+1
| | | | | | | | | | | | | | | * FIX:graphics:qt5 switch path of navit qml to org.navitproject Android uses org/navitproject/navit so do we on qt5 now * FEATURE:core: allow to configure linux home config dir * FIX:sailfish: configure to enable sailjail * CI: remove docker install step from sailfish * SAILFISH: bump release version to .2 * fix:sailfish: add Audio perrmission for espeak
* fix:core:Fix buffer overflow for ticket #1167 (#1170)Bastian Koppelmann2021-12-231-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor:Transform: Create transform func for a single point we have a common pattern where we call transform() for a single point. We have to specify the last 4 parameters as constants in a function with too many parameters. So refactor this function to a simpler signature. While at this, we also rename the function for easy distinction. * Fix:Transform: Fix buffer overflow in transform_point_buf in ticket #1167 When displayitem_transform_holes() is called, we allocate a struct point buffer of size count. Then we call transform_point_buf() to fill that buffer called result. In this function we fill the buffer in a for loop that runs count times. The buffer is indexed using result_idx which is incremented every loop iteration. However, if we are in 3d mode (indicated by t->ddd), we call transform_z_clip_if_necessary(). This can lead to the repetition of the current loop iteration by decreasing the loop variable i by 1. Even though we decreased i we still increment result_idx by 1. So from the point of view of result_idx we are running the loop count+1 times. Thus, we write one element past the allocated buffer. To fix this we give the size of the allocated buffer to transform_point_buf(). Then we check in the loop if the repetition of this loop iteration would fit into the buffer. If not, we double the size of the buffer and try again until we succeed. Co-authored-by: Stefan Wildemann <metalstrolch@users.noreply.github.com>
* Fix:core: cancel drawing on resize request (#1142)Stefan Wildemann2021-09-131-1/+5
| | | | | | | | | | | | | * Fix:core: cancel drawing on resize request This commit causes navit to cancel async drawing in case of resize request. Drawing is started again after that. this should effectively cause a redraw on subsequent calls to resize. Some graphics like qt5 call resize for both dimension changes if the wigdet get's resized. * Fix:graphics:qt5 Clear pixmap on resize To remove ugly artefacts after resizing the widget until navit completes to redraw the screen the widgets pixmap is cleared.
* fix:core:Fix #1135 (#1136)OLFDB2021-08-311-0/+22
| | | | | | | | | | | * Fix #1135 * Revert "Fix #1135" This reverts commit 585ab7bbe2020b574e35ce08153ff2991131b3f3. * Revert "Revert "Fix #1135"" This reverts commit 97ff13fa761a884019e341dd77e62a2735b52213.
* added:core:make it switch to nightlayout when we are in a tunnel (#1089)OLFDB2021-04-031-2/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Address ToDo : make it switch to nightlayout when we are in a tunne Nightlayout is enabled when available and streetflags & AF_UNDERGROUND is true * Addresses ToDo: make it switch to nightlayout when we are in a tunnel * Delete navit.c * Applied suggested changes from review * Applied changes from review * Fix: Fix formatting of file to pass sanity check * Using tracking->tunnel * Update update_download_center.sh * Update config.yml * attributes tunnel_nightlayout, nightlayout_auto, sunrise_degrees added * Use tracking_get_current_tunnel to access tracking object * Revert "Update update_download_center.sh" This reverts commit 0df8099a4533553f837a6f679899cc1a3aefc057. * Revert "Update config.yml" This reverts commit c1cae2e5f3f7f0fe48af0ddf1414ac6e86f36bba. * removed todo for nightlayout in tunnel * removed debug output * Update navit.c Do not return if there is a day layout Co-authored-by: Stefan Wildemann <stefan.wildemann@corpuls.com> Co-authored-by: Stefan Wildemann <metalstrolch@users.noreply.github.com>
* Merge branch 'master' into traff_0_8mvglasow2021-01-231-1/+1
|\ | | | | | | | | # Conflicts: # navit/android/AndroidManifest.xml.cmake
| * change:core:Remove unused argument from attr_searchjkoan2020-08-081-1/+1
| |
* | Fix:core:Fix invalid pointer which would cause unpredictable crashesmvglasow2020-08-131-1/+1
| | | | | | | | Signed-off-by: mvglasow <michael -at- vonglasow.com>
* | Refactor:core:Add documentationmvglasow2020-08-071-0/+22
| | | | | | | | Signed-off-by: mvglasow <michael -at- vonglasow.com>
* | Fix:core:set destination before firing callbacksmvglasow2020-08-071-10/+9
| | | | | | | | Signed-off-by: mvglasow <michael -at- vonglasow.com>
* | Add:traffic:Add basic TraFF 0.8 supportmvglasow2020-08-061-0/+29
|/ | | | Signed-off-by: mvglasow <michael -at- vonglasow.com>
* fix:all:fix compiler warnings (#935)Stefan Wildemann2019-10-291-95/+90
| | | * fix:core:remove many compiler warnings from core
* Fix:android:64 bit and cleanup2 (#877)jandegr2019-09-261-0/+3
| | | https://github.com/navit-gps/navit/pull/877
* fix:core: Correct default layout handling. (#816)Stefan Wildemann2019-08-071-1/+21
| | | | | This commit corrects the default layout handling broken when splitting the layouts to own files. It restores the layout saving of the internal gui. So now it starts again with the last selected layout.
* Refactor:GUI/GTK:Adding pointer and label when displaying POI on map (#729)lains2019-03-051-0/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | * Moving get_search_results_map from internal gui to generic navit functions * Moving square_shape_str() and populate_search_results_map() in generic files (not making them gui_internal-specific) * Adding GList cleanup after adding search results to a map, setting result names properly in GTK POI * Using common navit_populate_search_results_map() in internal GUI (factorizing code) * Adding doxygen comments * Reverting added empty lines * Applying expected style (indentation) * Adding dedicated code to free payload for GList (instead of using unavailable g_list_free_full()) * Avoiding for loop initial declarations * Remove obsolete FIXME comment * Minor tweaking doxygen comments and variables * Removing highlighted points on result map when starting routing
* Refactoring:Xmlconfig:Moving layout definition in their own .xml file (makes ↵lains2018-11-181-2/+64
| | | | | | | | | | main navit.xml file lighter) (#559) Layouts contain quite heavy xml code, and there are many layouts available for navit. They are all inserted inside the main navit.xml, which makes it hard to edit because of its size, even if changes or customizations by users are very rarely on the layout code. I have thus moved the layout code away from navit.xml, each layout having its own xml definition file, called navit_layout_*.xml These files are inserted inside the main navit.xml file by using the already existing xi:include mechanism, this also allow for backwards compatibility (old monolithic navit.xml files are still valid and can be used). The other advantage for this is that f the user wants to have his/her own customized navit.xml, he/she can still include the shipped layout files, making their xml lighter. This also allow to enable/disable specific layouts easily by including or not each layout file. It is also easier to perform side-by-side comparison between two layout files.
* Merge branch 'trunk' into trafficmvglasow2018-06-111-234/+132
|\ | | | | | | | | | | | | | | | | # Conflicts: # navit/binding/dbus/binding_dbus.c # navit/gui/internal/gui_internal_html.c # navit/route.c # navit/util.c # navit/xmlconfig.c
| * Cleanup:global:force the re-attach the return type to the function ↵Joseph Herlant2018-05-301-234/+132
| | | | | | | | | | | | | | | | declaration (#605) * Cleanup:global:force the re-attach the return type to the function declaration * cleanup:global:some loose ends
| * cleanup:global:Use astyle to reformat everythingJoseph Herlant2018-05-251-2760/+2641
| |
* | cleanup:global:Reformat with astyle and remove trailing spacesmvglasow2018-05-261-2784/+2665
| | | | | | | | | | | | Mirrors 8a76acb and 41a1264 Signed-off-by: mvglasow <michael -at- vonglasow.com>
* | Merge branch 'trunk' into trafficmvglasow2018-05-091-85/+85
|\ \ | |/ | | | | | | | | # Conflicts: # navit/route.c # navit/xmlconfig.c
| * Fix:debug:Change line separators for dbg to work also on win* platform (#546)Joseph Herlant2018-04-261-85/+85
| | | | | | | | | | | | | | | | * Fix:debug:Change line separators for dbg to work also on win* platform * Fix:debug:Break multiline dbg statements to use the new model * Fix:debug:Move the EOL into debug_vprintf
* | Fix:core:Add forgotten importmvglasow2018-05-021-0/+1
| | | | | | | | Signed-off-by: mvglasow <michael -at- vonglasow.com>
* | Add:traffic:Map provider (does not work yet)mvglasow2018-01-031-0/+8
| | | | | | | | Signed-off-by: mvglasow <michael -at- vonglasow.com>
* | Merge branch 'trunk' into trafficmvglasow2017-12-071-4/+8
|\ \ | |/
| * fix:gtk:Fix imperial factors. (#380)Charles Curley2017-12-021-4/+8
| | | | | | | | | | Another go at fixing imperial measures. This is ready for testing on a different machine, but not for a pull request. Also, some improvements in some comments.
* | Add:traffic:Store mapset and routemvglasow2017-11-291-0/+15
| | | | | | | | Signed-off-by: mvglasow <michael -at- vonglasow.com>
* | Add:navit:add traffic plugin instances as attributesmvglasow2017-11-281-0/+1
|/ | | | Signed-off-by: mvglasow <michael -at- vonglasow.com>
* fix:gtk:Fix imperial factors (#367)Charles Curley2017-11-111-1/+1
| | | | | | | | | | | | | * Use correct conversion factors for a more accurate display. Also, introduced some new conversion factors in navigation.h. modified: navit/gui/gtk/gui_gtk_statusbar.c modified: navit/navigation.h modified: navit/navit.c * Use the conversion factor #define instead of a hard coded value. modified: navit/vehicle/gpsd/vehicle_gpsd.c
* Once more with feeling. More indentation issues.Charles Curley2017-11-011-8/+8
| | | | modified: navit/navit.c
* Indentation fixes in my last commit. I did not re-indent the entireCharles Curley2017-11-011-10/+10
| | | | | | file. I will leave that for another time. modified: navit/navit.c
* The road book now respects imperial for two more columns. The firstCharles Curley2017-11-011-6/+23
| | | | | | | | | column (Command) was good for both feet and miles. However, column 2 (Length), and the 4th column (Destination Length), were showing up only in metric. This commit fixes columns 2 and 4. This should fix bug 780. modified: navit/navit.c
* Auto pitch and orientation (#306)Johan Fitié2017-08-011-2/+2
| | | | | | | | | | | | * Initial commit * Use original pitch when autozoom is not active * Apply pitch correction in reverse when reading attribute * Always show zoom in and out buttons * Remove space before closing tag
* Pitch correction (#303)Johan Fitié2017-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial commit * First try * Use solution as default * Add comment and debug log message * More technically correct * Move logic to transform * Fix * Do not round as we're using a double now * Even simpler * Fix * Use typedefs * No typedefs * Simplify * Moar simple * Simple math * Static value and comment * Variables for w and h * w,h im transform_new * No rounding errors * Log w and h * Typo * Define default resolution * Remove comment * Move logic * Unused variable cleanup * Do not change pitch if not in 3d mode * Round integer * Move logic again * Round up * [POI] Resize SVG icons to 22x22 (#304) * Initial commit * First try * Use solution as default * Add comment and debug log message * More technically correct * Move logic to transform * Fix * Do not round as we're using a double now * Even simpler * Fix * Use typedefs * No typedefs * Simplify * Moar simple * Simple math * Static value and comment * Variables for w and h * w,h im transform_new * No rounding errors * Log w and h * Typo * Define default resolution * Remove comment * Move logic * Unused variable cleanup * Do not change pitch if not in 3d mode * Round integer * Move logic again * Round up
* keep active vehicle profile when deactivating vehicle (#217)R7393mcapdeville2017-04-191-10/+16
| | | | | | | | | | | | | | | | | | | | When deactivating vehicle, profile is choosen from "car" vehicle_profile or by default the first vehicle_profile in list. So, by example, car_avoid_tolls never work when manually selecting current position (and deactivate vehicle). Now, if there is a selected vehicle profile, we keep it as vehicle_profile (not changing it). Aditionnaly, in internal gui, selecting a vehicle profile when wehicle is deactivated, in gui_internal_cmd_set_active_profile(), call navit_set_vehicleprofile_name() with new vehicle_profile (by name) before setting vehicle_attr to NULL (like in gui_internal_cmd_set_position()). Now, we can switch profile when vehicle is deactivatied and route is update correctly. TO DO : Same in other gui TO TEST : with more than one vehicle enable
* sunrise near poles simplification (#206)R7283jandegr2017-02-191-51/+49
| | | | | | * sunrise near poles simplification * Update navit.c
* Merge pull request #95 from pohlinkzei/paused_autozoomR6671Pierre GRANDIN2016-06-141-1/+15
|\ | | | | Pause the autozoom feature when zoom_in() or zoom_out() is called
| * remove debug messagepohlinkzei2016-04-271-1/+1
| |
| * Add a feature to change zoom level in autozoom modepohlinkzei2016-04-271-1/+15
| |
* | add set_position to command tableR6652jandegr2016-04-091-0/+1
| |
* | typolayoutswitcherjandegr2016-03-061-15/+15
| |
* | Update navit.cjandegr2016-03-061-4/+4
| |
* | layoutswitcher commandjandegr2016-03-061-47/+122
|/ | | introduce layout switching command
* Add:core:Use padding for vehicle cursor if supported by graphics drivermvglasow2016-02-021-0/+26
| | | | Signed-off-by: mvglasow <michael -at- vonglasow.com>
* Refactor:core:Document navit_get_cursor_pnt()R6552mvglasow2016-01-251-1/+13
| | | | Signed-off-by: mvglasow <michael -at- vonglasow.com>
* Fix:core:Exit if GUI or graphics init / connection fails.R6534Sebastian Leske2016-01-111-8/+8
| | | | | | If the initialization of GUI or graphics plugin or connecting the two fails, exit immediately. In that state we cannot reliably continue running, plus there's probably no point anyway.
* Fix:core:Support arbitrary attributes for navit objectR6405mvglasow2015-11-231-4/+4
| | | | Signed-off-by: mvglasow <michael -at- vonglasow.com>