aboutsummaryrefslogtreecommitdiff
path: root/dragon.c
diff options
context:
space:
mode:
authorMichael Homer <mwh@mwh.geek.nz>2014-08-15 18:44:59 +1200
committerMichael Homer <mwh@mwh.geek.nz>2014-08-15 18:57:50 +1200
commit536d5b0e19ad58b8d82f50444a7d57bbaefb0457 (patch)
tree0ff22af61521bbe0188ea67f73c60a2cccb16f6b /dragon.c
parentShow icons when displaying source buttons (diff)
downloaddragon-536d5b0e19ad58b8d82f50444a7d57bbaefb0457.tar.gz
dragon-536d5b0e19ad58b8d82f50444a7d57bbaefb0457.tar.bz2
dragon-536d5b0e19ad58b8d82f50444a7d57bbaefb0457.zip
Set stdout to line buffered for scripting -t
When stdout was not a terminal the default buffering made it hard to script the -t option usefully. With this commit, output is always line buffered, so each URL dragged on will be printed immediately.
Diffstat (limited to 'dragon.c')
-rw-r--r--dragon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dragon.c b/dragon.c
index d1712a3..acdd3d4 100644
--- a/dragon.c
+++ b/dragon.c
@@ -259,6 +259,8 @@ int main (int argc, char **argv) {
progname, argv[i]);
}
}
+ setvbuf(stdout, NULL, _IOLBF, BUFSIZ);
+
GtkAccelGroup *accelgroup;
GClosure *closure;
bgstack15