2010/1/11 Kalle Sommer Nielsen <[email protected]>:
> kalle                                    Mon, 11 Jan 2010 05:59:03 +0000
>
> Revision: http://svn.php.net/viewvc?view=revision&revision=293388
>
> Log:
> Disable colored output on Windows (and bump copyright year in 
> BuildOptionsParser.php)
>
> Changed paths:
>    U   phd/trunk/package.xml
>    U   phd/trunk/phpdotnet/phd/BuildOptionsParser.php
>    U   phd/trunk/phpdotnet/phd/functions.php
>
> Modified: phd/trunk/package.xml
> ===================================================================
> --- phd/trunk/package.xml       2010-01-11 05:27:34 UTC (rev 293387)
> +++ phd/trunk/package.xml       2010-01-11 05:59:03 UTC (rev 293388)
> @@ -1,4 +1,4 @@
> -<?xml version="1.0" encoding="UTF-8"?>
> +<?xml version="1.0" encoding="UTF-8"?>
>  <package xmlns="http://pear.php.net/dtd/package-2.0";
>   xmlns:tasks="http://pear.php.net/dtd/tasks-1.0";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> @@ -67,6 +67,7 @@
>     - Updated translations: (Kalle)
>        - Danish
>        - Swedish
> +    - Disabled colored output on Windows. (Kalle)
>     - Fixed bug #45098 - named constants require long opt. (Hannes)
>   </notes>
>
>
> Modified: phd/trunk/phpdotnet/phd/BuildOptionsParser.php
> ===================================================================
> --- phd/trunk/phpdotnet/phd/BuildOptionsParser.php      2010-01-11 05:27:34 
> UTC (rev 293387)
> +++ phd/trunk/phpdotnet/phd/BuildOptionsParser.php      2010-01-11 05:59:03 
> UTC (rev 293388)
> @@ -283,7 +283,7 @@
>     public function option_help($k, $v)
>     {
>         echo "PhD version: " .Config::VERSION;
> -        echo "\nCopyright (c) 2007-2009 The PHP Documentation Group\n
> +        echo "\nCopyright (c) 2007-2010 The PHP Documentation Group\n
>   -v
>   --verbose <int>            Adjusts the verbosity level
>   -f <formatname>
>
> Modified: phd/trunk/phpdotnet/phd/functions.php
> ===================================================================
> --- phd/trunk/phpdotnet/phd/functions.php       2010-01-11 05:27:34 UTC (rev 
> 293387)
> +++ phd/trunk/phpdotnet/phd/functions.php       2010-01-11 05:59:03 UTC (rev 
> 293388)
> @@ -50,7 +50,8 @@
>  /* {{{ Function to get a color escape sequence */
>  function term_color($text, $color)
>  {
> -    return $color === false ? $text : "\033[" . $color . "m" . $text . 
> "\033[m";
> +    // Always disabled on Windows
> +    return defined('PHP_WINDOWS_VERSION_BUILD') || $color === false ? $text 
> : "\033[" . $color . "m" . $text . "\033[m";
>  }
>  /* }}} */
>
>
>
> --
> PHP Documentation Commits Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

Why has coloured output been disabled on Windows? Using Jason Hood's
ANSICON allows full colour support [1]. Full C source code is included
and it is freeware.

I've no problem with the default for coloured output on Windows be set
to false. It is just a case of adding -c on to my command line, but
disabling it completely means I've lost a useful feature of the
logging system.

Richard.

[1] http://adoxa.110mb.com/ansicon/index.html
-- 
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

Reply via email to