Refer to manual for details of new pretty-print options.
[bpt/guile.git] / NEWS
diff --git a/NEWS b/NEWS
index 2cff4f8..b6181d7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,5 @@
 Guile NEWS --- history of user-visible changes.
-Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 See the end for copying conditions.
 
 Please send Guile bug reports to bug-guile@gnu.org.
@@ -18,6 +18,8 @@ Changes since the stable branch:
 
 ** Guile is now licensed with the GNU Lesser General Public License.
 
+** The manual is now licensed with the GNU Free Documentation License.
+
 ** Guile now requires GNU MP (http://swox.com/gmp).
 
 Guile now uses the GNU MP library for arbitrary precision arithmetic.
@@ -112,6 +114,10 @@ form around the code performing the heavy computations (typically a
 C code primitive), enabling the computations to run in parallel
 while the scripting code runs single-threadedly.
 
+** New module (srfi srfi-26)
+
+This is an implementation of SRFI-26.
+
 ** Guile now includes its own version of libltdl.
 
 We now use a modified version of libltdl that allows us to make
@@ -452,6 +458,51 @@ platform supports this, too.  The two zeros are equal according to
     (eqv? 0.0 (- 0.0))
     => #f
 
+** Guile now has exact rationals.
+
+Guile can now represent fractions such as 1/3 exactly.  Computing with
+them is also done exactly, of course:
+
+    (* 1/3 3/2)
+    => 1/2
+
+** 'floor', 'ceiling', 'round' and 'truncate' now return exact numbers
+   for exact arguments.
+
+For example: (floor 2) now returns an exact 2 where in the past it
+returned an inexact 2.0.  Likewise, (floor 5/4) returns an exact 1.
+
+** inexact->exact no longer returns only integers.
+
+Without exact rationals, the closest exact number was always an
+integer, but now inexact->exact returns the fraction that is exactly
+equal to a floating point number.  For example:
+
+    (inexact->exact 1.234)
+    => 694680242521899/562949953421312
+
+When you want the old behavior, use 'round' explicitely:
+
+    (inexact->exact (round 1.234))
+    => 1
+
+** New function 'rationalize'.
+
+This function finds a simple fraction that is close to a given real
+number.  For example (and compare with inexact->exact above):
+
+    (rationalize (inexact->exact 1.234) 1/2000)
+    => 58/47
+
+Note that, as required by R5RS, rationalize returns only then an exact
+result when both its arguments are exact.
+
+** 'odd?' and 'even?' work also for inexact integers.
+
+Previously, (odd? 1.0) would signal an error since only exact integers
+were recognized as integers.  Now (odd? 1.0) returns #t, (odd? 2.0)
+returns #f and (odd? 1.5) signals an error.
+
 ** We now have uninterned symbols.
 
 The new function 'make-symbol' will return a uninterned symbol.  This
@@ -465,7 +516,7 @@ interned or not.
 
 The function pretty-print from the (ice-9 pretty-print) module can now
 also be invoked with keyword arguments that control things like
-maximum output width.  See its online documentation.
+maximum output width.  See the manual for details.
 
 ** Variables have no longer a special behavior for `equal?'.
 
@@ -533,6 +584,59 @@ starting the week.
 
 * Changes to the C interface
 
+** New way to deal with non-local exits and reentries.
+
+There is a new set of functions that essentially do what
+scm_internal_dynamic_wind does, but in a way that is more convenient
+for C code in some situations.  Here is a quick example of how to
+prevent a potential memory leak:
+
+  void
+  foo ()
+  {
+    char *mem;
+
+    scm_frame_begin (0);
+
+    mem = scm_malloc (100);
+    scm_frame_unwind_handler (free, mem, SCM_F_WIND_EXPLICITELY);
+
+    /* MEM would leak if BAR throws an error.
+       SCM_FRAME_UNWIND_HANDLER frees it nevertheless.  */
+
+    bar ();
+  
+    scm_frame_end ();
+
+    /* Because of SCM_F_WIND_EXPLICITELY, MEM will be freed by 
+       SCM_FRAME_END as well. 
+    */
+  }
+
+For full documentation, see the node "Frames" in the manual.
+
+** New way to block and unblock asyncs
+
+In addition to scm_c_call_with_blocked_asyncs you can now also use
+scm_frame_block_asyncs in a 'frame' (see above).  Likewise for
+scm_c_call_with_unblocked_asyncs and scm_frame_unblock_asyncs.
+
+** New way to temporarily set the current input, output or error ports
+
+C code can now use scm_frame_current_<foo>_port in a 'frame' (see
+above).  <foo> is one of "input", "output" or "error".
+
+** New way to temporarily set fluids
+
+C code can now use scm_frame_fluid in a 'frame' (see
+above) to temporarily set the value of a fluid.
+
+** New types scm_t_intmax and scm_t_uintmax.
+
+On platforms that have them, these types are identical to intmax_t and
+uintmax_t, respectively.  On other platforms, they are identical to
+the largest integer types that Guile knows about.
+
 ** Many public #defines with generic names have been made private.
 
 #defines with generic names like HAVE_FOO or SIZEOF_FOO have been made
@@ -660,12 +764,12 @@ Guile always defines
   scm_t_int32
   scm_t_uint32
 
-Guile always defines
+Guile always defines these to 0 or 1
 
   SCM_HAVE_T_INT64
   SCM_HAVE_T_UINT64
 
-and when either of these are defined to 1, optionally defines 
+and when either of these are defined to 1, also defines
 
   scm_t_int64
   scm_t_uint64