summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-11-22 19:50:50 -0500
committerScott Ullrich <sullrich@pfsense.org>2009-11-22 19:50:56 -0500
commit6028a72d3e16c707ff9b9becb377971c92b8ff03 (patch)
tree6a3caea7394f23072e37cd9aa3809908a13ab0bd /etc
parentb927a013e99565425678ddb35117c72f24543915 (diff)
downloadpfsense-6028a72d3e16c707ff9b9becb377971c92b8ff03.zip
pfsense-6028a72d3e16c707ff9b9becb377971c92b8ff03.tar.gz
Update doc header
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/util.inc40
1 files changed, 20 insertions, 20 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index a2e52ac..a575771 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -1031,7 +1031,7 @@ function msort($array, $id="id", $sort_ascending=true) {
* NAME
* color - outputs a color code to the ansi terminal if supported
* INPUTS
- * color code
+ * color code or color name
* RESULT
* Outputs the ansi color sequence for the color specified. Default resets terminal.
******/
@@ -1072,27 +1072,27 @@ function color($color = "0m") {
global $TERM;
if(!$TERM)
$TERM=`/usr/bin/env | grep color`;
- $ESCAPE=chr(27);
if($TERM) {
+ $ESCAPE=chr(27);
switch ($color) {
- case "black":
- return "{$ESCAPE}[30m";
- case "red":
- return "{$ESCAPE}[31m";
- case "green":
- return "{$ESCAPE}[32m";
- case "yellow":
- return "{$ESCAPE}[33m";
- case "blue":
- return "{$ESCAPE}[34m";
- case "magenta":
- return "{$ESCAPE}[35m";
- case "cyan":
- return "{$ESCAPE}[36m";
- case "white":
- return "{$ESCAPE}[37m";
- case "default":
- return "{$ESCAPE}[39m";
+ case "black":
+ return "{$ESCAPE}[30m";
+ case "red":
+ return "{$ESCAPE}[31m";
+ case "green":
+ return "{$ESCAPE}[32m";
+ case "yellow":
+ return "{$ESCAPE}[33m";
+ case "blue":
+ return "{$ESCAPE}[34m";
+ case "magenta":
+ return "{$ESCAPE}[35m";
+ case "cyan":
+ return "{$ESCAPE}[36m";
+ case "white":
+ return "{$ESCAPE}[37m";
+ case "default":
+ return "{$ESCAPE}[39m";
}
return "{$ESCAPE}[{$color}";
}
OpenPOWER on IntegriCloud