[lasem] render: emit error messages to stderr
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [lasem] render: emit error messages to stderr
- Date: Tue, 28 Jun 2016 18:59:40 +0000 (UTC)
commit 82c79bb4a343b49cff905b895293e7baf5631b65
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Tue Jun 28 20:55:13 2016 +0200
render: emit error messages to stderr
src/lasemrender.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/lasemrender.c b/src/lasemrender.c
index e876773..de2ca2f 100644
--- a/src/lasemrender.c
+++ b/src/lasemrender.c
@@ -27,7 +27,6 @@
#include <lsmmathml.h>
#include <glib.h>
#include <glib/gi18n.h>
-#include <glib/gprintf.h>
#include <gio/gio.h>
#include <cairo-pdf.h>
#include <cairo-svg.h>
@@ -104,21 +103,21 @@ int main(int argc, char **argv)
if (!g_option_context_parse (context, &argc, &argv, &error))
{
g_option_context_free (context);
- printf ("%s %s\n", _("Option parsing failed:"), error->message);
+ fprintf (stderr, "%s %s\n", _("Option parsing failed:"), error->message);
return EXIT_FAILURE;
}
g_option_context_free (context);
if (option_zoom < 0.0) {
- printf ("%s\n", _("Invalid zoom value"));
+ fprintf (stderr, "%s\n", _("Invalid zoom value"));
return EXIT_FAILURE;
}
lsm_debug_enable (option_debug_domains);
if (option_input_filenames == NULL || g_strv_length (option_input_filenames) > 1) {
- printf ("%s\n", _("Missing input filename"));
+ fprintf (stderr, "%s\n", _("Missing input filename"));
return EXIT_FAILURE;
}
@@ -129,7 +128,7 @@ int main(int argc, char **argv)
if (g_ascii_strcasecmp (option_output_file_format, file_formats[format]) == 0)
break;
if (FORMAT_UNKNOWN == format) {
- printf ("%s %s\n", _("Unknown format:"), option_output_file_format);
+ fprintf (stderr, "%s %s\n", _("Unknown format:"), option_output_file_format);
return EXIT_FAILURE;
}
} else
@@ -169,7 +168,7 @@ int main(int argc, char **argv)
}
if (format == FORMAT_UNKNOWN) {
- printf ("%s\n", _("Don't know which format to use, please either give a format (-f) or an
output filename (-o)"));
+ fprintf (stderr, "%s\n", _("Don't know which format to use, please either give a format (-f)
or an output filename (-o)"));
return EXIT_FAILURE;
}
@@ -259,8 +258,8 @@ int main(int argc, char **argv)
lsm_debug_render ("width = %g pt, height = %g pt", width_pt, height_pt);
} else {
- printf (_("Can't load '%s'"), input_filename);
- printf ("\n");
+ fprintf (stderr, _("Can't load '%s'"), input_filename);
+ fprintf (stderr, "\n");
return EXIT_FAILURE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]