--- abiword-2.9.1.orig/src/af/util/unix/ut_debugmsg.cpp 2008-04-28 20:53:14.000000000 +0200 +++ abiword-2.9.1/src/af/util/unix/ut_debugmsg.cpp 2011-08-10 00:44:43.000000000 +0200 @@ -31,12 +31,14 @@ { #ifdef DEBUG #define DEBUG_MSG "DEBUG: " + static bool debug_msg = true; va_list marker; va_start(marker, s); - fwrite(DEBUG_MSG, 1, strlen(DEBUG_MSG), stderr); + if (debug_msg) fwrite(DEBUG_MSG, 1, strlen(DEBUG_MSG), stderr); vfprintf(stderr, s, marker); + debug_msg = (s && *s && s[strlen(s) - 1] == '\n'); va_end(marker); #undef DEBUG_MSG