Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-18 18:46:45 -0700 (Sun, 18 Apr 2004)
Revision: 339
Log message:
This is an annoying commit. It looks massive, but many of the changes
are just to "open" statements. Here is the issue that is addressed.
1. Format is a superset of Printf, and it is much better.
2. MetaPRL's Rformat is a superset of Format, and it is much better.
This commit moves Rformat into libmojave, as Lm_rformat. With this
commit, all output normally goes through Lm_rformat. Feel free to
continue to use Format/Printf in special cases, but normal user output
should go through Lm_format/Lm_printf. You will probably need to use
Lm_pervasives as well.
Lm_pervasives defines an (output_rbuffer : out_channel -> Lm_buffer.t -> unit)
that should be used instead of the print_text_channel function.
There is a new FORMAT option in mk/config. Define FORMAT=Format to
enable old behavior if you have trouble.
There are two reasons behind this:
1. We had a mix of files that use Printf and those that use Format
for output. This was a mess. For instance format-style print
directives (like "@[<hv 3>Content of text box@]@.") can't be
used in raw Printf. This meant that output functions had
to be duplicated, one version for Printf, and one for Format.
This commit solves the problem.
2. Another reason, and the real reason behind this, is to allow
output to be diverted based on the display device.