Mieux sauter #! au debut des scripts
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3871 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
c771caa3df
commit
48485d8d8a
|
@ -298,10 +298,7 @@ let use_file ppf name =
|
|||
let ic = open_in_bin filename in
|
||||
let lb = Lexing.from_channel ic in
|
||||
(* Skip initial #! line if any *)
|
||||
let buffer = String.create 2 in
|
||||
if input ic buffer 0 2 = 2 && buffer = "#!"
|
||||
then ignore(input_line ic)
|
||||
else seek_in ic 0;
|
||||
Lexer.skip_sharp_bang lb;
|
||||
let success =
|
||||
protect Location.input_name filename (fun () ->
|
||||
try
|
||||
|
|
Loading…
Reference in New Issue