From b27538feba70b942a9b5d3eb5eae171e04d52461 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 21 Jun 2015 06:37:24 -0700 Subject: [PATCH] Move helper declarations into a better header file This way the helpers can be more easily used by other modules. Signed-off-by: Dirk Hohndel --- qthelperfromc.h | 3 +++ save-html.c | 1 + save-html.h | 2 -- save-xml.c | 3 +-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/qthelperfromc.h b/qthelperfromc.h index c9e400ff8..e83cb9782 100644 --- a/qthelperfromc.h +++ b/qthelperfromc.h @@ -6,5 +6,8 @@ bool canReachCloudServer(); void updateWindowTitle(); bool isCloudUrl(const char *filename); void subsurface_mkdir(const char *dir); +char *get_file_name(const char *fileName); +void copy_image_and_overwrite(const char *cfileName, const char *cnewName); +char *hashstring(char *filename); #endif // QTHELPERFROMC_H diff --git a/save-html.c b/save-html.c index 6814cbc33..c50968e81 100644 --- a/save-html.c +++ b/save-html.c @@ -1,4 +1,5 @@ #include "save-html.h" +#include "qthelperfromc.h" #include "gettext.h" #include "stdio.h" diff --git a/save-html.h b/save-html.h index 3ed757f8e..20743e90a 100644 --- a/save-html.h +++ b/save-html.h @@ -23,8 +23,6 @@ void export_list(struct membuffer *b, const char *photos_dir, bool selected_only void export_translation(const char *file_name); -extern void copy_image_and_overwrite(const char *cfileName, const char *cnewName); -extern char *get_file_name(const char *fileName); #ifdef __cplusplus } #endif diff --git a/save-xml.c b/save-xml.c index 620980a60..988ede1bf 100644 --- a/save-xml.c +++ b/save-xml.c @@ -13,6 +13,7 @@ #include "membuffer.h" #include "strndup.h" #include "git-access.h" +#include "qthelperfromc.h" /* * We're outputting utf8 in xml. @@ -360,8 +361,6 @@ static void save_dc(struct membuffer *b, struct dive *dive, struct divecomputer put_format(b, " \n"); } -extern char * hashstring(char * filename); - static void save_picture(struct membuffer *b, struct picture *pic) { put_string(b, "