Commit Graph

69 Commits (db2092907f2eddcaf0b72f4bd0f429001364dbe5)

Author SHA1 Message Date
Pierre Weis 771646e79a Fix bug #4273.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8213 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-05-08 21:30:01 +00:00
Pierre Weis 236baa6ee4 Encapsulation of system specific exports in module Printf.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7735 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-11-17 08:34:05 +00:00
Pierre Weis 044ac2610c New function ifprintf that does not print. (See request #0004031.)
Ifprintf is a one-liner using implementation tools from Printf, whereas it is
not possible to write it in pure Caml.
Useful to conditionally ignore printing.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7717 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-11-06 09:12:53 +00:00
Pierre Weis cf0590146f Code review before adding new typing of format string.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7396 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-05-04 12:52:22 +00:00
Pierre Weis 176b3c0da8 Module Sformat is internal to printf. Better typing specifications of functions working with format strings.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7374 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-04-05 11:49:07 +00:00
Pierre Weis 129535d070 Correcting bug for %{ conversions.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7300 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-01-04 08:50:40 +00:00
Pierre Weis 0e1fb05fc7 The type Printf.sz is used for indexes; hence its renaming to becomes
Printf.index.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7083 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-09-26 10:13:08 +00:00
Pierre Weis 339b08f82f Closing a long standing bug in the implementation of printf-like
functions: partially applied printf functions were printing material
as soon as the first argument was applied (and even before: printing
started as soon as the format string was provided).
This is the first step towards the implementation of $ formats
(i.e. formats that can access directly to any of their arguments,
using a $n notation to denote the nth argument (``a la Yacc'')). This
is supposed to be mandatory to internationalisation of messages.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7060 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-09-20 17:18:03 +00:00
Pierre Weis 93474822f4 Documentation.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7059 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-09-20 08:41:09 +00:00
Damien Doligez a3bfddb98f coercion plus robuste apres magic
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6740 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-01-04 15:39:10 +00:00
Pierre Weis 75b0db3044 Typo.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6725 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-12-07 06:14:49 +00:00
Damien Doligez 9108f88cd8 annotation de Obj.magic pour eviter les warnings
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6711 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-11-29 14:52:02 +00:00
Pierre Weis 83b16075a3 Dead code elimination.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6627 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-10-04 20:21:04 +00:00
Pierre Weis b0270c4cf9 Implementation des meta formats.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6621 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-09-22 09:17:21 +00:00
Xavier Leroy 63c1789b5e Fusion des modifs faites sur la branche release jusqu'a la release 3.08.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-07-13 12:25:21 +00:00
Pierre Weis ea86069c4c open_sys_box simplified.
pp_print_flush reverted to old semantics (handling of bug report
concerning @\n needs further thoughts or should be ignored (?)).


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6140 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-03-08 07:16:37 +00:00
Pierre Weis acdf61dad7 Hardening the behaviour of pp_print_flush.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6134 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-03-05 12:15:31 +00:00
Pierre Weis 6ba80fdf70 Correcting the treatment of @?.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6111 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-02-11 22:20:04 +00:00
Pierre Weis 7fe9b14904 Bugs 2052 and 2053 (off by one for max indentation limit).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6110 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-02-05 17:11:06 +00:00
Pierre Weis 117bab91dd To answer a relevant question asked on the mailing list, introduction
of a general pgc (Print with Given Continuation) facility: kfprintf
with the corresponding profile
val kfprintf : (formatter -> 'a) -> formatter ->
              ('b, formatter, unit, 'a) format4 -> 'b;;


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5886 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-10-27 08:59:08 +00:00
Pierre Weis b5d0102c05 Nouveau format %$. Introduction des types virtuels: step 1 sans inclusion dans Camlp4
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5409 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-02-28 06:59:19 +00:00
Pierre Weis 9bbe6d7d7a Default policy is to ignore tag printing completely.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5389 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-01-24 14:26:56 +00:00
Pierre Weis 9c20fa10d8 Documentation.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5263 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-11-15 10:57:14 +00:00
Pierre Weis 6df4c2b6de Introducing (and using) string and string format coercions.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5211 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-10-31 10:00:02 +00:00
Pierre Weis 1459d3989f Documentation and some rewriting.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4811 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-15 20:29:26 +00:00
Pierre Weis eaa6581cc4 Documentation of the tag facility.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4794 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-08 13:50:29 +00:00
Pierre Weis 5b4c55d7dd Confusion between i and j => bus error!
Generalized names for tags.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4719 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-04-22 21:54:08 +00:00
Pierre Weis 4750850b76 Improved error message.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4564 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-03-26 17:46:09 +00:00
Pierre Weis c4b203f34c Added get_* for tag printing status.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4555 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-03-22 20:43:07 +00:00
Damien Doligez 424fd989f5 Format.kprintf
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-03-21 17:13:02 +00:00
Pierre Weis 219cc8e584 Distinction between tag markers (output as a 0 length token) and tag
printers (regular pretty printing functions applied to tags).


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4549 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-03-20 07:33:20 +00:00
Pierre Weis f46c82bb41 Nouvelle version des tags.
Simplification de champs fonctionnels des formatteurs.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4548 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-03-20 06:51:17 +00:00
Pierre Weis bdc61c17bf Introducing tags.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4510 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-03-11 22:18:20 +00:00
Pierre Weis 9a43942161 Generalisation, simplification, meilleurs messages d'erreur, meilleur
detection des erreurs de format, et documentation comme d'habitude...


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4476 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-03-05 20:56:46 +00:00
Xavier Leroy 7501784c80 MAJ en-tetes pour mentionner la 'special exception' sur la LGPL
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4144 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-12-07 13:41:02 +00:00
Pierre Weis ac35cb1a4e Factorisation de unit_out. Details de polissage.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3975 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-11-04 21:43:01 +00:00
Pierre Weis 80c4f94856 Documentation.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3965 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-10-31 11:34:21 +00:00
Xavier Leroy 11113cbc09 Ajout formats pour int32, nativeint, int64. Support pour * dans les specifications. Partage du code de parsing des %formats.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3934 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-10-28 14:21:27 +00:00
Jacques Garrigue ea299bbbc1 passage aux labels stricts
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3696 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-09-06 08:52:32 +00:00
Pierre Weis 95f084e63d Par defaut le monbre maximum de boites autorisees est max_int.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3534 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-06-18 18:14:29 +00:00
Pierre Weis 2116da4220 Getting rid of obsolete boolean operators & and or
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3359 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-12-28 13:07:42 +00:00
Xavier Leroy cc0f32b054 Changement de la licence
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-17 18:59:06 +00:00
Xavier Leroy a5eb7789fd Revu le module Buffer.
Utilise Buffer dans Printf.sprintf; ajout Printf.bprintf.
Ajout Map.mem.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2309 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-02-25 10:26:38 +00:00
Xavier Leroy 5038f3cdb6 Ajout de Pervasives.ignore. List.remove -> List.remove_ass*
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2304 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-02-24 15:21:50 +00:00
Pierre Weis 6eff10fffe Changement de type de formatter_of_buffer. Ajout de bprintf. Mise en
facteur du code de fprintf et sprintf.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2299 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-02-23 18:01:17 +00:00
Pierre Weis d661c6443d Documentation + cosmétique.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2291 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-02-17 18:48:03 +00:00
Pierre Weis e3f42c3acd Addition of sprintf and formatting on buffers.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2285 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-02-16 09:07:26 +00:00
Pierre Weis 12c5dec537 Ajout d'un échec donnant le format incriminé.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2243 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1998-12-23 18:57:55 +00:00
Pierre Weis facd68e5dc Ajout de la fonction formatter_of_out_channel (n'était pas
exportée). Revu la doc.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2228 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1998-12-08 08:29:54 +00:00
Pierre Weis ec7e60cf1b Ajout de la possibilité de modifier les sémantiques de l'indentation
et du passage à la ligne. (Useful to generate <BR> instead of a new
line and &nbsp; instead of spaces.)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2208 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1998-12-02 10:15:37 +00:00