summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1996-07-25 13:18:36 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1996-07-25 13:18:36 +0000
commite9fe2362db535b667cf8f0bbd01d76a9fc915971 (patch)
tree91a0febdcb7e4218fde8435add30e339eb0c7f11
parent1bf083e149b77415e677ee67cd39ef7c53152c46 (diff)
Prompt modifie.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@942 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--toplevel/toploop.ml8
1 files changed, 6 insertions, 2 deletions
diff --git a/toplevel/toploop.ml b/toplevel/toploop.ml
index f26b777e3..a71abfd78 100644
--- a/toplevel/toploop.ml
+++ b/toplevel/toploop.ml
@@ -171,8 +171,11 @@ let execute_phrase phr =
external input_scan_line : in_channel -> int = "input_scan_line"
+let first_line = ref true
+
let refill_lexbuf buffer len =
- output_char stdout '#'; flush stdout;
+ output_string stdout (if !first_line then "# " else " "); flush stdout;
+ first_line := false;
let n = min len (abs(input_scan_line stdin)) in
input stdin buffer 0 n
@@ -201,7 +204,7 @@ let loop() =
print_string Config.version;
print_newline(); print_newline();
(* Add whatever -I options have been specified on the command line,
- but keep the directories that user code linked in with cslmktop
+ but keep the directories that user code linked in with ocamlmktop
may have added to load_path. *)
load_path := "" :: (List.rev !Clflags.include_dirs @ !load_path);
toplevel_env := Compile.initial_env();
@@ -213,6 +216,7 @@ let loop() =
try
empty_lexbuf lb;
Location.reset();
+ first_line := true;
execute_phrase (!parse_toplevel_phrase lb); ()
with
End_of_file ->