summaryrefslogtreecommitdiffstats
path: root/save-html.c
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2014-06-08 07:35:20 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-15 09:17:45 -0700
commit4a69dea972775e666e2309cab0a04d948f54d7b4 (patch)
treec393c155710126680803312cf4886a2b714883f3 /save-html.c
parentd209d35f64c901fe7c0665b3f735c072682761de (diff)
downloadsubsurface-4a69dea972775e666e2309cab0a04d948f54d7b4.tar.gz
HTML: Report saving to file errors.
Use subsurface report_error function in save-html and worldmap-save instead of the ridiculous print to standard output. Also use subsurface_fopen for the sake of different platforms. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'save-html.c')
-rw-r--r--save-html.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/save-html.c b/save-html.c
index 212cf2494..501bc21cc 100644
--- a/save-html.c
+++ b/save-html.c
@@ -191,9 +191,9 @@ void export_HTML(const char *file_name, const bool selected_only)
struct membuffer buf = { 0 };
export_list(&buf, selected_only);
- f = fopen(file_name, "w+");
+ f = subsurface_fopen(file_name, "w+");
if (!f)
- printf("error"); /*report error*/
+ report_error(translate("gettextFromC", "Can't open file %s"), file_name);
flush_buffer(&buf, f); /*check for writing errors? */
free_buffer(&buf);