|
@@ -541,6 +541,7 @@ and wait_loop boot_com host port =
|
|
Hashtbl.iter (fun _ m -> if m.m_extra.m_file = file then m.m_extra.m_dirty <- true) cache.c_modules
|
|
Hashtbl.iter (fun _ m -> if m.m_extra.m_file = file then m.m_extra.m_dirty <- true) cache.c_modules
|
|
end
|
|
end
|
|
);
|
|
);
|
|
|
|
+ ctx.com.print <- (fun str -> ssend sin ("\x01" ^ String.concat "\x01" (ExtString.String.nsplit str "\n") ^ "\n"));
|
|
ctx
|
|
ctx
|
|
in
|
|
in
|
|
(try
|
|
(try
|
|
@@ -549,7 +550,6 @@ and wait_loop boot_com host port =
|
|
if verbose then print_endline ("Processing Arguments [" ^ String.concat "," data ^ "]");
|
|
if verbose then print_endline ("Processing Arguments [" ^ String.concat "," data ^ "]");
|
|
(try
|
|
(try
|
|
Common.display_default := false;
|
|
Common.display_default := false;
|
|
- Common.default_print := (fun str -> ssend sin ("\x01" ^ str));
|
|
|
|
Parser.resume_display := Ast.null_pos;
|
|
Parser.resume_display := Ast.null_pos;
|
|
Typeload.return_partial_type := false;
|
|
Typeload.return_partial_type := false;
|
|
measure_times := false;
|
|
measure_times := false;
|
|
@@ -605,9 +605,9 @@ and do_connect host port args =
|
|
loop();
|
|
loop();
|
|
let has_error = ref false in
|
|
let has_error = ref false in
|
|
let rec print line =
|
|
let rec print line =
|
|
- match (if line == "" then '\x00' else line.[0]) with
|
|
|
|
|
|
+ match (if line = "" then '\x00' else line.[0]) with
|
|
| '\x01' ->
|
|
| '\x01' ->
|
|
- print_endline (String.concat "" (ExtString.String.nsplit line "\x01"))
|
|
|
|
|
|
+ print_string (String.concat "\n" (List.tl (ExtString.String.nsplit line "\x01")))
|
|
| '\x02' ->
|
|
| '\x02' ->
|
|
has_error := true;
|
|
has_error := true;
|
|
| _ ->
|
|
| _ ->
|