]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/ocaml-http/http_misc.ml
added warn and error for messaging
[helm.git] / helm / DEVEL / ocaml-http / http_misc.ml
index fcec70ca5f4016523fca8e8bf757aa4e4f045cee..c4c9cfea97b457322a45483e07fa38df6b4b42cd 100644 (file)
@@ -19,7 +19,9 @@
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *)
 
-open Http_types;;
+open Printf
+
+open Http_types
 
 let date_822 () =
   Netdate.mk_mail_date ~zone:Netdate.localzone (Unix.time ())
@@ -139,3 +141,6 @@ let buf_of_inchan ?limit ic =
 let list_assoc_all key pairs =
   snd (List.split (List.filter (fun (k, v) -> k = key) pairs))
 
+let warn msg  = prerr_endline (sprintf "ocaml-http WARNING: %s" msg)
+let error msg = prerr_endline (sprintf "ocaml-http ERROR:   %s" msg)
+