From d381ef6af55721ae082f54608f4ca23cbb00249f Mon Sep 17 00:00:00 2001 From: FichteFoll Date: Wed, 8 May 2019 06:34:19 +0200 Subject: Output debug messages on stderr Otherwise consumers can't use verbose mode and interpret stdout at the same time. stderr is usually used for all kinds of logging. --- dragon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dragon.c') diff --git a/dragon.c b/dragon.c index d0e380e..e1da51f 100644 --- a/dragon.c +++ b/dragon.c @@ -84,7 +84,7 @@ void drag_data_get(GtkWidget *widget, struct draggable_thing *dd = (struct draggable_thing *)user_data; if (info == TARGET_TYPE_URI) { if (verbose) - printf("Writing as URI: %s\n", dd->uri); + fprintf(stderr, "Writing as URI: %s\n", dd->uri); char** uris; if(drag_all){ @@ -99,7 +99,7 @@ void drag_data_get(GtkWidget *widget, g_signal_stop_emission_by_name(widget, "drag-data-get"); } else if (info == TARGET_TYPE_TEXT) { if (verbose) - printf("Writing as TEXT: %s\n", dd->text); + fprintf(stderr, "Writing as TEXT: %s\n", dd->text); gtk_selection_data_set_text(data, dd->text, -1); } else { fprintf(stderr, "Error: bad target type %i\n", info); -- cgit