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

[r2003-05-10 15:02:02 by cvscast] Empty log message

Original author: cvscast
Date: 2003-05-10 15:02:02+00:00
parent c99690f4
......@@ -105,7 +105,7 @@ and print_quoted_str ppf = function
Chars.print_v_in_string ppf c;
print_quoted_str ppf q
| String_latin1 (i,j,s, q) ->
for k = i to j do
for k = i to j - 1 do
Chars.print_v_in_string ppf (Chars.mk_char s.[k])
done;
print_quoted_str ppf q
......@@ -118,7 +118,7 @@ and print_seq ppf = function
| String_latin1 (i,j,s,y) ->
Format.fprintf ppf "'";
for k = i to j - 1 do
Format.fprintf ppf "%s" (Char.escaped s.[k])
Chars.print_v_in_string ppf (Chars.mk_char s.[k])
done;
Format.fprintf ppf "' %a" print_seq y
| String_utf8 (i,j,s, q) ->
......
......@@ -20,6 +20,8 @@ let print_v_in_string ppf = function
| 10 -> Format.fprintf ppf "\\n"
| 13 -> Format.fprintf ppf "\\r"
| 9 -> Format.fprintf ppf "\\t"
| 39 -> Format.fprintf ppf "\\'"
| 34 -> Format.fprintf ppf "\\\""
| c ->
if (c < 32) || ((c >= 128) && (c < 192)) || (c > 255)
then Format.fprintf ppf "\\%i;" c
......
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