summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-07-01 13:32:00 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-07-01 13:32:00 -0300
commita9e595cc1d50761b8c3152c9c3796c2f3f7acfef (patch)
tree36ced5ad86c99bb46135f507056c4aafd597d927 /etc
parente6974dfea07189dde387e70d457822af58bb4a1b (diff)
downloadpfsense-a9e595cc1d50761b8c3152c9c3796c2f3f7acfef.zip
pfsense-a9e595cc1d50761b8c3152c9c3796c2f3f7acfef.tar.gz
Remove unused function color()
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/util.inc73
1 files changed, 0 insertions, 73 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 10e5c5e..4d52e6c 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -1774,79 +1774,6 @@ function msort($array, $id="id", $sort_ascending=true) {
}
}
-/****f* util/color
- * NAME
- * color - outputs a color code to the ansi terminal if supported
- * INPUTS
- * color code or color name
- * RESULT
- * Outputs the ansi color sequence for the color specified. Default resets terminal.
- ******/
-function color($color = "0m") {
- /*
- Color codes available:
- 0m reset; clears all colors and styles (to white on black)
- 1m bold on (see below)
- 3m italics on
- 4m underline on
- 7m inverse on; reverses foreground & background colors
- 9m strikethrough on
- 22m bold off (see below)
- 23m italics off
- 24m underline off
- 27m inverse off
- 29m strikethrough off
- 30m set foreground color to black
- 31m set foreground color to red
- 32m set foreground color to green
- 33m set foreground color to yellow
- 34m set foreground color to blue
- 35m set foreground color to magenta (purple)
- 36m set foreground color to cyan
- 37m set foreground color to white
- 40m set background color to black
- 41m set background color to red
- 42m set background color to green
- 43m set background color to yellow
- 44m set background color to blue
- 45m set background color to magenta (purple)
- 46m set background color to cyan
- 47m set background color to white
- 49m set background color to default (black)
- */
- // Allow caching of TERM to
- // speedup subequence requests.
- global $TERM;
- if(!$TERM)
- $TERM=`/usr/bin/env | grep color`;
- if(!$TERM)
- $TERM=`/usr/bin/env | grep cons25`;
- 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";
- }
- return "{$ESCAPE}[{$color}";
- }
-}
-
/****f* util/is_URL
* NAME
* is_URL
OpenPOWER on IntegriCloud