desactivation du format %$

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5644 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Damien Doligez 2003-07-02 14:06:05 +00:00
parent 3e4bf9252b
commit 0a1f0f864b
3 changed files with 0 additions and 20 deletions

View File

@ -113,11 +113,6 @@ let extract_format fmt start stop widths =
Buffer.add_char b c; fill_format (succ i) w
in fill_format start (List.rev widths)
let substitute_string f s =
let b = Buffer.create (2 * String.length s) in
Buffer.add_substitute b f s;
Buffer.contents b;;
let format_int_with_conv conv fmt i =
match conv with
| 'b' -> format_binary_int fmt i
@ -219,9 +214,6 @@ let scan_format fmt pos cont_s cont_a cont_t cont_f =
end
| '!' ->
Obj.magic (cont_f (succ i))
| '$' ->
Obj.magic (fun f s ->
cont_s (substitute_string f s) (succ i))
| _ ->
bad_format fmt pos
in scan_flags [] (pos + 1)

View File

@ -64,13 +64,6 @@ val fprintf : out_channel -> ('a, out_channel, unit, unit) format -> 'a
in the output of [fprintf] at the current point.
- [t]: same as [%a], but takes only one argument (with type
[out_channel -> unit]) and apply it to [outchan].
- [$]: variable substitution in strings. Takes two arguments: a
function mapping from variable names to string values and a
string pattern where any identifier following a dollar sign is
considered a variable name. Each variable name is replaced by its
value as specified by the mapping, and the resulting string
pattern is inserted in the output. See {!Buffer.add_substitute} for
details on variable syntax.
- [!]: take no argument and flush the output.
- [%]: take no argument and output one [%] character.

View File

@ -677,11 +677,6 @@ let type_format loc fmt =
let ty_a = ty_arrow ty_input (ty_arrow ty_arg ty_aresult) in
let ty_aresult, ty_result = conversion j ty_arg in
ty_aresult, ty_arrow ty_a ty_result
| '$' ->
let ty_arg = Predef.type_string in
let ty_f = ty_arrow Predef.type_string Predef.type_string in
let ty_aresult, ty_result = conversion j ty_arg in
ty_aresult, ty_arrow ty_f ty_result
| 't' -> conversion j (ty_arrow ty_input ty_aresult)
| 'n' when j + 1 = len -> conversion j Predef.type_int
| 'l' | 'n' | 'L' as conv ->