Module CharInfo_width.Cfg

Cfg.widthTable

The configuration file contains width info that can be loaded by load_from_path path_of_config_file. The config syntax is a subset of OCaml. You can define several codes set in it:

The type of there value is (int * int) list.

We don't have to define all of the values and the sequence of definition doesn't matter.

Here is a sample config file:

let unprintable= [ (888, 0x379)(* dec, hex *); (0b1110001011, 0o1613)(* bin, oct *) ]
let w2= [(0x01c4, 0x01cc)] (* DŽ  , nj  *)(* (* nested comments *) *)
type widthTable = {
  1. unprintable : CharInfo_width__.Codes.t;
    (*

    set contains unprintable characters

    *)
  2. combining : CharInfo_width__.Codes.t;
    (*

    set contains combinging characters

    *)
  3. w2 : CharInfo_width__.Codes.t;
    (*

    set contains characters of width 2

    *)
  4. w3 : CharInfo_width__.Codes.t;
    (*

    set contains characters of width 3

    *)
  5. w4 : CharInfo_width__.Codes.t;
    (*

    set contains characters of width 4

    *)
  6. w5 : CharInfo_width__.Codes.t;
    (*

    set contains characters of width 5

    *)
  7. w6 : CharInfo_width__.Codes.t;
    (*

    set contains characters of width 6

    *)
}
type t = widthTable
val load_from_string : string -> (t, int) Result.result

load_from_string str parse configurations in string str

val load_from_path : string -> (t, int) Result.result

load_from_path path open and loads the config file from path

val union : t -> t -> t

widthTable union