X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fwww%2Flambda_delta%2Fbin%2Fxhtbl%2FxmlUnparser.ml;fp=helm%2Fwww%2Flambda_delta%2Fbin%2Fxhtbl%2FxmlUnparser.ml;h=17f24671c376af30edcbc7591bf2e48f89dd274a;hb=2b58d92062882492dd024a1196b6f8b788ffe5c6;hp=0000000000000000000000000000000000000000;hpb=d350f5ea4332cf259af7dfe52a09b8800d21c417;p=helm.git
diff --git a/helm/www/lambda_delta/bin/xhtbl/xmlUnparser.ml b/helm/www/lambda_delta/bin/xhtbl/xmlUnparser.ml
new file mode 100644
index 000000000..17f24671c
--- /dev/null
+++ b/helm/www/lambda_delta/bin/xhtbl/xmlUnparser.ml
@@ -0,0 +1,82 @@
+module A = Array
+module F = Filename
+module L = List
+module P = Printf
+module S = String
+
+module O = Options
+module T = Table
+module M = Matrix
+
+let i = 0
+
+let myself = F.basename (Sys.argv.(0))
+
+let msg = P.sprintf "This file was generated by %s, do not edit" myself
+
+let border cell =
+ let str = S.make 4 'n' in
+ if cell.M.cb.T.n then str.[0] <- 's';
+ if cell.M.cb.T.e then str.[1] <- 's';
+ if cell.M.cb.T.s then str.[2] <- 's';
+ if cell.M.cb.T.w then str.[3] <- 's';
+ str :: cell.M.cc
+
+let key cell =
+ if cell.M.ck = "" then "
" else cell.M.ck
+
+let ind i = S.make (2 * i) ' '
+
+let out_cell och cell =
+ let cc = border cell in
+ P.fprintf och "%s