aboutsummaryrefslogtreecommitdiffstats
path: root/driver/Commandline.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2016-08-05 17:48:53 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2016-08-05 17:48:53 +0200
commit8a740c6d441afd980e3bdb43d1844bd23e0ad55b (patch)
treeb421878688446134d9dfc11668c72fbb1268930f /driver/Commandline.ml
parent21156a2fcf48764762c7f2209fa850024378d83a (diff)
downloadcompcert-8a740c6d441afd980e3bdb43d1844bd23e0ad55b.tar.gz
compcert-8a740c6d441afd980e3bdb43d1844bd23e0ad55b.zip
Additional test for color output.
Color output is only enabled if stderr is a tty, and the environment variable TERM is not empty or dumb. Bug 18004
Diffstat (limited to 'driver/Commandline.ml')
-rw-r--r--driver/Commandline.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/driver/Commandline.ml b/driver/Commandline.ml
index 0a2c8fca..c5c2b82c 100644
--- a/driver/Commandline.ml
+++ b/driver/Commandline.ml
@@ -31,6 +31,8 @@ type action =
| Self of (string -> unit)
| String of (string -> unit)
| Integer of (int -> unit)
+ | Ignore
+ | Unit of (unit -> unit)
let match_pattern text = function
| Exact s ->
@@ -95,6 +97,8 @@ let parse_array spec argv first last =
end else begin
eprintf "Option `%s' expects an argument\n" s; exit 2
end
+ | Some (Ignore) -> parse (i+1)
+ | Some (Unit f) -> f (); parse (i+1)
end
in parse first