Browse thread
[Caml-list] Filename.quote - again
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Vitaly Lugovsky <vsl@o...> |
| Subject: | [Caml-list] Filename.quote - again |
Hi!
I already reported about Filename.quote bug
(or feature?) in current ocaml cvs. I can't
understand the meaning of the following code:
-----------------------
(* $Id: filename.ml,v 1.25 2002/03/12 16:16:56 xleroy Exp $ *)
let generic_quote quotequote s =
let l = String.length s in
let b = Buffer.create (l + 20) in
Buffer.add_char b '\''; (* HERE!!! *)
for i = 0 to l - 1 do
if s.[i] = '\''
then Buffer.add_string b quotequote
else Buffer.add_char b s.[i]
done;
Buffer.add_char b '\''; (* AND HERE!!!! *)
Buffer.contents b
---------------------------
It makes gcc crazy when you passing linking
options with spaces inside (try to compile
camltk418 for example).
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners