Mieux sauter #! au debut des scripts

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3871 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Xavier Leroy 2001-10-09 14:56:23 +00:00
parent c771caa3df
commit 48485d8d8a
1 changed files with 1 additions and 4 deletions

View File

@ -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