Grammar fix.
[bpt/guile.git] / NEWS
diff --git a/NEWS b/NEWS
index 4b6decf..5ad1570 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,56 @@ Please send Guile bug reports to bug-guile@gnu.org.
 \f
 Changes since Guile 1.3.4:
 
+* New primitive: `simple-format', affects `scm-error', scm_display_error, & scm_error message strings
+
+(ice-9 boot) makes `format' an alias for `simple-format' until possibly
+extended by the more sophisticated version in (ice-9 format)
+
+(simple-format port message . args)
+Write MESSAGE to DESTINATION, defaulting to `current-output-port'.
+MESSAGE can contain ~A (was %s) and ~S (was %S) escapes.  When printed,
+the escapes are replaced with corresponding members of ARGS:
+~A formats using `display' and ~S formats using `write'.
+If DESTINATION is #t, then use the `current-output-port',
+if DESTINATION is #f, then return a string containing the formatted text.
+Does not add a trailing newline."
+
+The two C procedures: scm_display_error and scm_error, as well as the
+primitive `scm-error', now use scm_format to do their work.  This means
+that the message strings of all code must be updated to use ~A where %s
+was used before, and ~S where %S was used before.
+
+* Massive software engineering face-lift by Greg J. Badros <gjb@cs.washington.edu>
+
+Now Guile primitives are defined using the GUILE_PROC/GUILE_PROC1 macros
+and must contain a docstring that is extracted into foo.doc using a new
+guile-doc-snarf script (that uses guile-doc-snarf.awk).
+
+Also, many SCM_VALIDATE_* macros are defined to ease the redundancy and
+improve the readability of argument checking.
+
+All (nearly?) K&R prototypes for functions replaced with ANSI C equivalents.
+
+* Dynamic linking now uses libltdl from the libtool package.
+
+The old system dependent code for doing dynamic linking has been
+replaced with calls to the libltdl functions which do all the hairy
+details for us.
+
+The major improvement is that you can now directly pass libtool
+library names like "libfoo.la" to `dynamic-link' and `dynamic-link'
+will be able to do the best shared library job you can get, via
+libltdl.
+
+The way dynamic libraries are found has changed and is not really
+portable across platforms, probably.  It is therefore recommended to
+use absolute filenames when possible.
+
+If you pass a filename without an extension to `dynamic-link', it will
+try a few appropriate ones.  Thus, the most platform ignorant way is
+to specify a name like "libfoo", without any directories and
+extensions.
+
 * Changes to the distribution
 
 ** Trees from nightly snapshots and CVS now require you to run autogen.sh.
@@ -34,6 +84,7 @@ appropriately.
 
 ** configure has new options to remove support for certain features:
 
+--disable-arrays   omit array and uniform array support
 --disable-posix    omit posix interfaces
 --disable-net      omit networking interfaces
 --disable-regex    omit regular expression interfaces
@@ -58,6 +109,21 @@ turn on this extra processing only when necessary.
 
 * Changes to the stand-alone interpreter
 
+** New primitives: `pkgdata-dir', `site-dir', `library-dir' 
+
+** Positions of erring expression in scripts
+
+With version 1.3.4, the location of the erring expression in Guile
+scipts is no longer automatically reported.  (This should have been
+documented before the 1.3.4 release.)
+
+You can get this information by enabling recording of positions of
+source expressions and running the debugging evaluator.  Put this at
+the top of your script (or in your "site" file):
+
+  (read-enable 'positions)
+  (debug-enable 'debug)
+
 ** Backtraces in scripts
 
 It is now possible to get backtraces in scripts.
@@ -71,6 +137,86 @@ at the top of the script.
 (The first options enables the debugging evaluator.
  The second enables backtraces.)
 
+** New procedure: port-closed? PORT
+Returns #t if PORT is closed or #f if it is open.
+
+** Attempting to get the value of an unbound variable now produces
+an exception with a key of 'unbound-variable instead of 'misc-error.
+
+* Changes to the scm_ interface
+
+** Port internals: the rw_random variable in the scm_port structure
+must be set to non-zero in any random access port.  In recent Guile
+releases it was only set for bidirectional random-access ports.
+
+** Port internals: the seek ptob procedure is now responsible for
+resetting the buffers if required.  The change was made so that in the
+special case of reading the current position (i.e., seek p 0 SEEK_CUR)
+the fport and strport ptobs can avoid resetting the buffers,
+in particular to avoid discarding unread chars.  An existing port
+type can be fixed by adding something like the following to the
+beginning of the ptob seek procedure:
+
+      if (pt->rw_active == SCM_PORT_READ)
+       scm_end_input (object);
+      else if (pt->rw_active == SCM_PORT_WRITE)
+       ptob->flush (object);
+
+although to actually avoid resetting the buffers and discard unread
+chars requires further hacking that depends on the characteristics
+of the ptob.
+
+** The scm_sysmissing procedure is no longer used in libguile.
+Unless it turns out to be unexpectedly useful to somebody, it will be
+removed in a future version.
+
+* Changes to system call interfaces:
+
+** If a facility is not available on the system when Guile is
+compiled, the corresponding primitive procedure will not be defined.
+Previously it would have been defined but would throw a system-error
+exception if called.  Exception handlers which catch this case may
+need minor modification: an error will be thrown with key
+'unbound-variable instead of 'system-error.  Alternatively it's
+now possible to use `defined?' to check whether the facility is
+available.
+
+** Procedures which depend on the timezone should now give the correct
+result on systems which cache the TZ environment variable, even if TZ 
+is changed without calling tzset.
+
+* Changes to the networking interfaces:
+
+** New functions: htons, ntohs, htonl, ntohl: for converting short and
+long integers between network and host format.  For now, it's not
+particularly convenient to do this kind of thing, but consider:
+
+(define write-network-long
+  (lambda (value port)
+    (let ((v (make-uniform-vector 1 1 0)))
+      (uniform-vector-set! v 0 (htonl value))
+      (uniform-vector-write v port))))
+
+(define read-network-long
+  (lambda (port)
+    (let ((v (make-uniform-vector 1 1 0)))
+      (uniform-vector-read! v port)
+      (ntohl (uniform-vector-ref v 0)))))
+
+** If inet-aton fails, it now throws an error with key 'misc-error
+instead of 'system-error, since errno is not relevant.
+
+** Certain gethostbyname/gethostbyaddr failures now throw errors with
+specific keys instead of 'system-error.  The latter is inappropriate
+since errno will not have been set.  The keys are:
+'host-not-found, 'try-again, 'no-recovery and 'no-data.
+
+** sethostent, setnetent, setprotoent, setservent: now take an
+optional argument STAYOPEN, which specifies whether the database
+remains open after a database entry is accessed randomly (e.g., using
+gethostbyname for the hosts database.)  The default is #f.  Previously
+#t was always used.
+
 \f
 Changes since Guile 1.3.2: