9 i: int; (* indentation *)
10 out: string -> unit; (* output function *)
14 i = 0; out = print_string
20 let add st = {st with i = st.i + 3}
22 let sub st = {st with i = st.i - 3}
30 P.sprintf "(%u, %u); (%u+%u, %u+%u); %s"
31 ts.T.y ts.T.x ts.T.rf ts.T.ri ts.T.cf ts.T.ci (parent ts.T.p)
34 let str = S.make 4 ' ' in
35 if tb.T.w then str.[0] <- 'W';
36 if tb.T.n then str.[1] <- 'N';
37 if tb.T.e then str.[2] <- 'E';
38 if tb.T.s then str.[3] <- 'S';
42 P.sprintf "\"%s\"" (S.concat " " tc)
46 let map s = P.sprintf "\"%s\"" s in
47 S.concat " + " (L.map map sl)
49 | T.Glue (Some i) -> P.sprintf "%u" i
55 (****************************************************************************)
59 P.sprintf "%s[{#%u: %s; %s; %s}\n"
60 (indent st) t.T.ti (size t.T.ts) (border t.T.tb) (css t.T.tc)
64 let close_table st t =
66 let str = P.sprintf "%s]\n" (indent st) in
70 let str = P.sprintf "%s%s\n" (indent st) (key k) in
74 let str = P.sprintf "%s%s\n" (indent st) (entry b) in
77 let close_line b st = st
79 let open_entry b st = st
81 let close_entry b st sst = st
84 F.open_table = open_table; F.close_table = close_table;
85 F.open_line = open_line; F.close_line = close_line;
86 F.open_entry = open_entry; F.close_entry = close_entry;
91 let _ = F.fold_table cb home t in ()