summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1996-04-18 16:35:43 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1996-04-18 16:35:43 +0000
commitbf16f51e518c8daad273c46f951cb2a0c12db66a (patch)
treed613024d21a459e2a0224290bb567a7a2eb7be11
parentb51e114f02729b8084e7566886a4c4550c5abc61 (diff)
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
-rw-r--r--toplevel/topdirs.ml3
-rw-r--r--toplevel/toploop.ml5
2 files changed, 6 insertions, 2 deletions
diff --git a/toplevel/topdirs.ml b/toplevel/topdirs.ml
index 43368be7f..f72a4daa6 100644
--- a/toplevel/topdirs.ml
+++ b/toplevel/topdirs.ml
@@ -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';
diff --git a/toplevel/toploop.ml b/toplevel/toploop.ml
index 988623829..e019abf89 100644
--- a/toplevel/toploop.ml
+++ b/toplevel/toploop.ml
@@ -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 := "";