aboutsummaryrefslogtreecommitdiffstats
path: root/core/ostctools.c
AgeCommit message (Collapse)Author
2019-08-08Cleanup: move file-related function declarations to file.hGravatar Berthold Stoeger
A number of architecture-dependent functions were declared in dive.h. Move them to file.h so that not all file-manipulating translation units have to include dive.h. This is a small step in avoiding mass-recompilation on every change to dive.h Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-08-08Cleanup: move error reporting function declarations to errorhelper.hGravatar Berthold Stoeger
Move the declarations of the "report_error()" and "set_error_cb()" functions and the "verbose" variable to errorhelper.h. Thus, error-reporting translation units don't have to import the big dive.h header file. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-19Cleanup: remove bogus mark_divelist_changed() callsGravatar Berthold Stoeger
The parsers / downloaders parse into a separate table and do not directly change the divelist. Therefore, they shouldn't call mark_divelist_changed(). Likewise split_dive_at() doesn't modify the dive list and therefore shouldn't call this function. Calling the function has the unwanted side-effect that undoing the change will not clear the *-symbol in the title of the main window. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-04-12Parser: parse into custom dive site tableGravatar Berthold Stoeger
To extend the undo system to dive sites, the importers and downloaders must not parse directly into the global dive site table. Instead, pass a dive_site_table argument to parse into. For now, always pass the global dive_site_table so that this commit should not cause any functional change. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-01-09Core: Rename functions to more generic namesGravatar Berthold Stoeger
Rename - dive_get_insertion_index() -> dive_table_get_insertion_index() - unregister_dive_from_table() -> remove_from_dive_table() - get_idx_in_table() -> get_idx_in_dive_table() - sort_table() -> sort_dive_table() This will make it more straight-forward to generate these functions from macros. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-14Core: introduce new subsurface-string headerGravatar Dirk Hohndel
First small step to shrinking dive.h. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-29cleanup: Unchecked return value from libraryGravatar Jan Mulder
CID 60227 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-12-27Cleanup: correctly prevent memory leakGravatar Dirk Hohndel
The previous attempt to fix this in commit 652e382e68 ("Cleanup: avoid a few memory leaks") was clearly bogus. Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-26Cleanup: avoid a few memory leaksGravatar Dirk Hohndel
Coverity CID 215199 Coverity CID 215195 Coverity CID 215196 Coverity CID 215198 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-21Check return of fread() in core/ostctools.cGravatar Berthold Stoeger
Since the corresponding error message appears thrice, it is translated once at the beginning of the function (even in the non-error case). A single-byte fread() was transformed into getc(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-04-29Add SPDX header to remaining core filesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-12ostctools: Add support for profile version 0x24Gravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-01-12Stop accessing the internals of dc_descriptor_tGravatar Anton Lundin
This removes our own declaration of dc_descriptor_t and all our accesses to its internals, and switches to use the libdivecomputer functions to access those instead. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-01-12ostctools: Correct argument order to get_descriptorGravatar Anton Lundin
This corrects the argument order, which was changed back in 00629c861cc9, but not on this place. Whups. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2016-12-28Rename ostc_get_data_descriptor to get_descriptorGravatar Anton Lundin
This renames and cleans up ostc_get_data_descriptor into get_descriptor, for more generic use. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-28Lift ostc_get_data_descriptor out from ostctools.cGravatar Anton Lundin
This is for later reuse of that function in other source files. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Move subsurface-core to core and qt-mobile to mobile-widgetsGravatar Dirk Hohndel
Having subsurface-core as a directory name really messes with autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an autocomplete conflict and also was inconsistent with the desktop-widget name for the directory containing the "other" UI. And while cleaning up the resulting change in the path name for include files, I decided to clean up those even more to make them consistent overall. This could have been handled in more commits, but since this requires a make clean before the build, it seemed more sensible to do it all in one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>