|
Packit Service |
a2ae7a |
(*
|
|
Packit Service |
a2ae7a |
Module: Termcap
|
|
Packit Service |
a2ae7a |
Parses termcap capability database
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
Author: Matt Dainty <matt@bodgit-n-scarper.com>
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
About: Reference
|
|
Packit Service |
a2ae7a |
- man 5 termcap
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
Each line represents a record consisting of a number of ':'-separated fields
|
|
Packit Service |
a2ae7a |
the first of which is the name or identifier for the record. The name can
|
|
Packit Service |
a2ae7a |
optionally be split by '|' and each subsequent value is considered an alias
|
|
Packit Service |
a2ae7a |
of the first. Records can be split across multiple lines with '\'.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
module Termcap =
|
|
Packit Service |
a2ae7a |
autoload xfm
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* All termcap capabilities are two characters, optionally preceded by *)
|
|
Packit Service |
a2ae7a |
(* upto two periods and the only types are boolean, numeric or string *)
|
|
Packit Service |
a2ae7a |
let cfield = /\.{0,2}([a-zA-Z0-9]{2}|[@#%&*!][a-zA-Z0-9]|k;)(#?@|#[0-9]+|=([^:\\\\^]|\\\\[0-7]{3}|\\\\[:bBcCeEfFnNrRstT0\\^]|\^.)*)?/
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let lns = ( Util.empty | Getcap.comment | Getcap.record cfield )*
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let filter = incl "/etc/termcap"
|
|
Packit Service |
a2ae7a |
. incl "/usr/share/misc/termcap"
|
|
Packit Service |
a2ae7a |
. Util.stdexcl
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let xfm = transform lns filter
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(* Local Variables: *)
|
|
Packit Service |
a2ae7a |
(* mode: caml *)
|
|
Packit Service |
a2ae7a |
(* End: *)
|