From: erg Date: Fri, 12 Jan 2007 17:25:55 +0000 (+0000) Subject: Re-enable printf emulation on Windows, and make sure text window is turned off X-Git-Tag: LAST_LIBGRAPH~32^2~5716 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ebbc9f34f3db8fb58ef498790541a0c5be4cf92b;p=graphviz Re-enable printf emulation on Windows, and make sure text window is turned off by default in dotty. Merge the Windows versions of dotty.c and lneato.c. --- diff --git a/cmd/lefty/common.c b/cmd/lefty/common.c index c3ea6ed25..a9979dc69 100644 --- a/cmd/lefty/common.c +++ b/cmd/lefty/common.c @@ -423,3 +423,23 @@ void panic2 (char *file, int line, char *func, char *fmt, ...) { abort (); } +#ifdef FEATURE_MS +int gprintf (const char *fmt, ...) { + va_list args; + char buf[10240]; + int l; + + va_start(args, fmt); + vsprintf (buf, fmt, args); + l = strlen (buf); + if (buf[l - 1] == '\n') + buf[l - 1] = 0; + if (buf[0]) { + Gnocallbacks = TRUE; + MessageBox ((HWND) NULL, buf, "Lefty printf", MB_APPLMODAL); + Gnocallbacks = FALSE; + } + va_end(args); +} +#endif +