topdirs: indentation!

toploop: mettre dans load_path les repertoires donnes par -I sur la
ligne de commande avant de lancer la boucle d'interaction.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@754 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Xavier Leroy 1996-04-18 16:35:43 +00:00
parent b51e114f02
commit bf16f51e51
2 changed files with 6 additions and 2 deletions

View File

@ -74,8 +74,7 @@ let load_compunit ic filename compunit =
let code_size = compunit.cu_codesize + 4 in
let code = Meta.static_alloc code_size in
unsafe_really_input ic code 0 compunit.cu_codesize;
String.unsafe_set code compunit.cu_codesize
(Char.chr Opcodes.opSTOP);
String.unsafe_set code compunit.cu_codesize (Char.chr Opcodes.opSTOP);
String.unsafe_set code (compunit.cu_codesize + 1) '\000';
String.unsafe_set code (compunit.cu_codesize + 2) '\000';
String.unsafe_set code (compunit.cu_codesize + 3) '\000';

View File

@ -15,6 +15,7 @@
open Lexing
open Format
open Config
open Misc
open Parsetree
open Typedtree
@ -188,6 +189,10 @@ let loop() =
print_string "\tCaml Special Light version ";
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
may have added to load_path. *)
load_path := "" :: (List.rev !Clflags.include_dirs @ !load_path);
toplevel_env := Compile.initial_env();
let lb = Lexing.from_function refill_lexbuf in
Location.input_name := "";