Re: svn: /phd/trunk/ package.xml phpdotnet/phd/BuildOptionsParser.php phpdotnet/phd/functions.php
| From: | Richard Quadling | Date: | Wed, 13 Jan 2010 13:13:38 +0000 |
| Subject: | Re: svn: /phd/trunk/ package.xml phpdotnet/phd/BuildOptionsParser.php phpdotnet/phd/functions.php | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969381286@lists.php.net to get a copy of this message | ||
2010/1/11 Kalle Sommer Nielsen <kalle@php.net>:
> 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