summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2005-07-14 13:05:41 +0000
committerArch Librarian <arch@canonical.com>2005-07-14 13:05:41 +0000
commit7207c289d8727ca2182bf0939f46b0e083736784 (patch)
treea496ee5a36bfec956952ffc9970e2239998454d8 /main.c
parent70fbf4c00a9f07c66c3d8563dec90c312e72cacc (diff)
downloadpkg-config-7207c289d8727ca2182bf0939f46b0e083736784.tar.gz
2003-02-15 Havoc Pennington <hp@pobox.com>
Author: hp Date: 2003-02-15 15:04:07 GMT 2003-02-15 Havoc Pennington <hp@pobox.com> Fixes suggested by Werner Trobin * main.c (verbose_error): honor --errors-to-stdout and flush the same stream we write to * parse.c (parse_url): support an "url" field so if someone has a .pc file they can figure out where to go for newer versions and such
Diffstat (limited to 'main.c')
-rw-r--r--main.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/main.c b/main.c
index 7f40703..3506299 100644
--- a/main.c
+++ b/main.c
@@ -72,7 +72,8 @@ verbose_error (const char *format, ...)
{
va_list args;
gchar *str;
-
+ FILE* stream;
+
g_return_if_fail (format != NULL);
if (!want_verbose_errors)
@@ -82,8 +83,13 @@ verbose_error (const char *format, ...)
str = g_strdup_vprintf (format, args);
va_end (args);
- fputs (str, stderr);
- fflush (stdout);
+ if (want_stdout_errors)
+ stream = stdout;
+ else
+ stream = stderr;
+
+ fputs (str, stream);
+ fflush (stream);
g_free (str);
}