Commit 4080a54a authored by Pietro Abate's avatar Pietro Abate

[r2004-07-12 19:11:58 by afrisch] Pb to print unterminated string errors

Original author: afrisch
Date: 2004-07-12 19:11:59+00:00
parent bdd87cfc
......@@ -95,9 +95,12 @@ let print_loc ppf ((src,i,j),w) =
let extr s i j =
try
Netencoding.Html.encode_from_latin1
(String.sub s i (j - i))
with e -> failwith "Location.extr"
let n = min (String.length s) j - i in
if n <= 0 then "" else
Netencoding.Html.encode_from_latin1
(String.sub s i n)
with e -> failwith (Printf.sprintf "Location.extr len=%i i=%i j=%i"
(String.length s) i j )
let dump_loc ppf ((src,i,j),w) =
match (src, !viewport) with
......@@ -119,7 +122,6 @@ let rec end_of_line s i =
let html_hilight ppf ((src,i,j),w) =
match (src, !viewport) with
| `String s, `Html ->
(try
if (i < 0) then
Format.fprintf ppf "<b>GHOST LOCATION</b>@\n"
else
......@@ -130,7 +132,6 @@ let html_hilight ppf ((src,i,j),w) =
(extr s i0 i)
(extr s i j)
(extr s j j0)
with e -> failwith "html_hilight")
| _ -> ()
......
# Do "make install_cdml" before running this test
STATIC=
CAML=ocamlc
CAML=ocamlopt
CDUCE=../../cduce
CDO2ML=../../cdo2ml
......
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