mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-04 08:01:28 +00:00
core: port subsurface-startup.c to C++
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
6b0cdb028f
commit
be3a497885
3 changed files with 7 additions and 7 deletions
|
@ -43,7 +43,7 @@ SOURCES += subsurface-mobile-main.cpp \
|
|||
core/windowtitleupdate.cpp \
|
||||
core/file.c \
|
||||
core/fulltext.cpp \
|
||||
core/subsurfacestartup.c \
|
||||
core/subsurfacestartup.cpp \
|
||||
core/pref.c \
|
||||
core/profile.c \
|
||||
core/device.cpp \
|
||||
|
|
|
@ -173,7 +173,7 @@ set(SUBSURFACE_CORE_LIB_SRCS
|
|||
strtod.c
|
||||
subsurface-float.h
|
||||
subsurface-string.h
|
||||
subsurfacestartup.c
|
||||
subsurfacestartup.cpp
|
||||
subsurfacestartup.h
|
||||
subsurfacesysinfo.cpp
|
||||
subsurfacesysinfo.h
|
||||
|
|
|
@ -25,7 +25,7 @@ char *testqml = NULL;
|
|||
*/
|
||||
bool imported = false;
|
||||
|
||||
void print_version()
|
||||
extern "C" void print_version()
|
||||
{
|
||||
static bool version_printed = false;
|
||||
if (version_printed)
|
||||
|
@ -43,7 +43,7 @@ void print_version()
|
|||
version_printed = true;
|
||||
}
|
||||
|
||||
void print_files()
|
||||
extern "C" void print_files()
|
||||
{
|
||||
struct git_info info = { };
|
||||
const char *filename;
|
||||
|
@ -95,7 +95,7 @@ static void print_help()
|
|||
printf("\n --cloud-timeout=<nr> Set timeout for cloud connection (0 < timeout < 60)\n\n");
|
||||
}
|
||||
|
||||
void parse_argument(const char *arg)
|
||||
extern "C" void parse_argument(const char *arg)
|
||||
{
|
||||
const char *p = arg + 1;
|
||||
|
||||
|
@ -169,7 +169,7 @@ void parse_argument(const char *arg)
|
|||
}
|
||||
#elif SUBSURFACE_MOBILE_DESKTOP
|
||||
if (strncmp(arg, "--testqml=", sizeof("--testqml=") - 1) == 0) {
|
||||
testqml = malloc(strlen(arg) - sizeof("--testqml=") + 1);
|
||||
testqml = (char *)malloc(strlen(arg) - sizeof("--testqml=") + 1);
|
||||
strcpy(testqml, arg + sizeof("--testqml=") - 1);
|
||||
return;
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ void parse_argument(const char *arg)
|
|||
* I guess Burma and Liberia should trigger this too. I'm too
|
||||
* lazy to look up the territory names, though.
|
||||
*/
|
||||
void setup_system_prefs(void)
|
||||
extern "C" void setup_system_prefs(void)
|
||||
{
|
||||
const char *env;
|
||||
|
Loading…
Reference in a new issue