Changeset - r12751:9f1b9bbb8110
[Not reviewed]
master
0 1 0
matthijs - 15 years ago 2009-08-20 10:01:42
matthijs@openttd.org
(svn r17227) -Feature [Unix]: Only use colorized error output on terminals.
1 file changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/unix.cpp
Show inline comments
 
@@ -222,7 +222,10 @@ void ShowOSErrorBox(const char *buf, boo
 
	ShowMacDialog( buf, "See readme for more info\nMost likely you are missing files from the original TTD", "Quit" );
 
#else
 
	/* all systems, but OSX */
 
	fprintf(stderr, "\033[1;31mError: %s\033[0;39m\n", buf);
 
	if (isatty(fileno(stderr))) /* Only use escape codes on a TTY */
 
		fprintf(stderr, "\033[1;31mError: %s\033[0;39m\n", buf);
 
	else
 
		fprintf(stderr, "Error: %s\n", buf);
 
#endif
 
}
 

	
0 comments (0 inline, 0 general)