Fix #548: Send text output to stdout
[geeqie.git] / src / ui_fileops.c
index e3fee9d..a58777d 100644 (file)
 
 
 
-void print_term(const gchar *text_utf8)
+void print_term(gboolean err, const gchar *text_utf8)
 {
        gchar *text_l;
 
        text_l = g_locale_from_utf8(text_utf8, -1, NULL, NULL, NULL);
-       fputs((text_l) ? text_l : text_utf8, stderr);
+       if (err)
+               {
+               fputs((text_l) ? text_l : text_utf8, stderr);
+               }
+       else
+               {
+               fputs((text_l) ? text_l : text_utf8, stdout);
+               }
        if(command_line && command_line->ssi)
                secure_fputs(command_line->ssi, (text_l) ? text_l : text_utf8);
        g_free(text_l);