Commit dee7d523 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2002-11-10 01:10:37 by cvscast] Empty log message

Original author: cvscast
Date: 2002-11-10 01:10:37+00:00
parent 0afab732
......@@ -3,7 +3,9 @@ open Netcgi
let main (cgi : Netcgi.std_activation) =
try
cgi # set_header ();
cgi # set_header
~content_type:"text/html; charset=\"iso-8859-1\""
();
let src = cgi # argument_value "prog" in
let ppf = Format.str_formatter
......@@ -35,7 +37,10 @@ let main (cgi : Netcgi.std_activation) =
with
exn ->
cgi # output # rollback_work();
cgi # set_header ~status:`Internal_server_error ();
cgi # set_header
~status:`Internal_server_error
~cache:`No_cache
();
cgi # output # output_string "<h1>Internal software error!</h1>";
cgi # output # output_string (Printexc.to_string exn);
cgi # output # commit_work()
......
......@@ -44,15 +44,16 @@ let print_loc ppf (i,j) =
l1 c1 l2 c2
let extr s i j =
Netencoding.Html.encode_from_latin1 (String.sub s i (j - i))
Netencoding.Html.encode_from_latin1
(String.sub s i (j - i))
let dump_loc ppf (i,j) =
match (!source, !viewport) with
| (`String s, `Html) ->
if (i < 0) then
Format.fprintf ppf "<b>DUMMY</b>@\n"
Format.fprintf ppf "<b>GHOST LOCATION</b>@\n"
else
Format.fprintf ppf "<i>%s</i>@\n" (extr s i j)
Format.fprintf ppf "<i>%s</i>@." (extr s i j)
| _ -> ()
let rec beg_of_line s i =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment