To create habc-link command, Connect CmdOpt module and Template module.
And add Swf module to swflib. It is facade.
open Base
+open Swflib
open Swflib.SwfType
let input_bytes ch =
open_in_with path input_bytes in
let swf =
Template.make t bytes in
- swf
+ open_out_with t#output (fun ch -> Swf.write ch swf)
| _ ->
failwith "not suppert many files"
swfBaseOut
swfType
swfOut
+ swf
UseCamlp4(pa_openin pa_oo pa_field)
PROGRAM=../swflib
--- /dev/null
+open Base
+open SwfType
+open SwfOut
+open TagOut
+
+type swf = TagOut.t SwfType.t
+
+module M = SwfOut.Make(TagOut)
+
+let write ch swf =
+ M.to_base swf
+ +> SwfBaseOut.to_list
+ +> List.iter (output_byte ch)