monotone-commits-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-commits-diffs] net.venge.monotone.visualc: abfc2dfae3daf7e098


From: code
Subject: [Monotone-commits-diffs] net.venge.monotone.visualc: abfc2dfae3daf7e098068403299f832af48e7908
Date: Mon, 20 Dec 2010 13:52:37 GMT

revision:            abfc2dfae3daf7e098068403299f832af48e7908
date:                2010-12-20T13:50:27
author:              Timothy Brownawell  <address@hidden>
branch:              net.venge.monotone.visualc
changelog:
Windows actually does have isatty(), they just renamed it to _isatty().

We really want to detect being on a smart terminal, but our
have_smart_terminal returns true when run under MinGW *regardless* of
actually outputting to the console window (because it looks at the
environment, because Windows doesn't have proper ptys).

manifest:
format_version "1"

new_manifest [4935e68fa35e4509d89590eee210fdc393ba0e29]

old_revision [e8f8f11aa794a97a6170e93d798c706a3aaad00f]

patch "cmd.cc"
 from [766cc01b793d69b505729dfa1746afb10ebb1f7e]
   to [208f39eef0239f93a5938ab7759111b9180a2392]
============================================================
--- cmd.cc	766cc01b793d69b505729dfa1746afb10ebb1f7e
+++ cmd.cc	208f39eef0239f93a5938ab7759111b9180a2392
@@ -30,6 +30,8 @@
 #ifdef _MSC_VER
 #define popen(a, b) _popen(a, b)
 #define pclose(a) _pclose(a)
+#define isatty(a) _isatty(a)
+#define STDOUT_FILENO 1
 #endif
 #endif
 
@@ -874,7 +876,7 @@ CMD_PRESET_OPTIONS(manpage)
 
 CMD_PRESET_OPTIONS(manpage)
 {
-    opts.formatted = have_smart_terminal();
+    opts.formatted = isatty(STDOUT_FILENO);
 }
 CMD_NO_WORKSPACE(manpage, "manpage", "", CMD_REF(informative), "",
     N_("Generate a manual page from monotone's command help"),

reply via email to

[Prev in Thread] Current Thread [Next in Thread]