From 9043add656177eeac1491a73d2f3ab92bec0013c Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Sat, 29 Dec 2018 14:31:27 -0500 Subject: Imported Upstream version 8.8.2 --- clib/terminal.mli | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 clib/terminal.mli (limited to 'clib/terminal.mli') diff --git a/clib/terminal.mli b/clib/terminal.mli new file mode 100644 index 00000000..dbf8d464 --- /dev/null +++ b/clib/terminal.mli @@ -0,0 +1,69 @@ +(************************************************************************) +(* * The Coq Proof Assistant / The Coq Development Team *) +(* v * INRIA, CNRS and contributors - Copyright 1999-2018 *) +(* ?bg_color:color -> + ?bold:bool -> ?italic:bool -> ?underline:bool -> + ?negative:bool -> ?style:style -> + ?prefix:string -> ?suffix:string -> unit -> style +(** Create a style from the given flags. It is derived from the optional + [style] argument if given. *) + +val merge : style -> style -> style +(** [merge s1 s2] returns [s1] with all defined values of [s2] overwritten. *) + +val repr : style -> int list +(** Generate the ANSI code representing the given style. *) + +val eval : style -> string +(** Generate an escape sequence from a style. *) + +val reset : string +(** This escape sequence resets all attributes. *) + +val has_style : Unix.file_descr -> bool +(** Whether an output file descriptor handles styles. Very heuristic, only + checks it is a terminal. *) + +val parse : string -> (string * style) list +(** Parse strings describing terminal styles in the LS_COLORS syntax. For + robustness, ignore meaningless entries and drops undefined styles. *) -- cgit v1.2.3