guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. release_1-9-11-252-g1


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-11-252-g1435c7d
Date: Sun, 08 Aug 2010 12:30:30 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=1435c7dcf8a520daba1d221d4da7ff81119e649c

The branch, master has been updated
       via  1435c7dcf8a520daba1d221d4da7ff81119e649c (commit)
       via  8a4ed2dd34c86eb451c5555a85f64f3fbdf9cef6 (commit)
       via  220058a8353815f2cefa67e2510b7132991cf7a7 (commit)
       via  3470a299117479402542fda73b5d64dbd905de6d (commit)
       via  08fc523b0eb477e137d1f6c64c38851f6cddb514 (commit)
      from  4f9691174ddf83c6b5502b6b71262484c7f936e0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1435c7dcf8a520daba1d221d4da7ff81119e649c
Author: Andy Wingo <address@hidden>
Date:   Sun Aug 8 14:26:26 2010 +0200

    loose ends from "discouraged" removal
    
    * README: Remove docs on "discouraged".
    
    * configure.ac: Remove one more "discouraged" thing.
    
    * doc/ref/api-deprecated.texi: Rename from api-discdepr.texi, and remove
      sections on "discouraged".
    
    * doc/ref/Makefile.am:
    * doc/ref/guile.texi: Update referrers.

commit 8a4ed2dd34c86eb451c5555a85f64f3fbdf9cef6
Author: Andy Wingo <address@hidden>
Date:   Sun Aug 8 14:15:47 2010 +0200

    remove "discouraged" infrastructure
    
    * libguile/discouraged.h: Remove.
    
    * libguile/deprecated.c (scm_internal_select, scm_thread_sleep)
      (scm_thread_usleep): Deprecate formerly discouraged names.
    
    * libguile/eq.h (SCM_EQ_P):
    * libguile/pairs.h (SCM_NULLP, SCM_NNULLP, SCM_CONSP, SCM_NCONSP):
    * libguile/boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
      (SCM_NEGATE_BOOL, SCM_BOOL_NOT): Undiscourage these names, because I'm
      not sure deprecating them will do any good.
    
    * libguile.h:
    * libguile/gen-scmconfig.c:
    * libguile/numbers.c:
    * libguile/init.c:
    * libguile/Makefile.am:
    * configure.ac: Remove bits that referenced discouraged.h, and dealt
      with the "discouraging" system.

commit 220058a8353815f2cefa67e2510b7132991cf7a7
Author: Andy Wingo <address@hidden>
Date:   Sun Aug 8 13:43:40 2010 +0200

    deprecated all discouraged functions
    
    * libguile/Makefile.am:
    * libguile/discouraged.c: Remove discouraged.c.
    
    * libguile/deprecated.c:
    * libguile/deprecated.h:
    * libguile/discouraged.h: All functions and declarations moved from
      discouraged.[ch] to deprecated.[ch], adding deprecation warnings.
    
    * libguile/init.c: Remove discouraged init.
    
    * libguile/numbers.c (scm_num2float, scm_num2double): Deprecate.
    
    * test-suite/standalone/test-num2integral.c: Port to modern API.

commit 3470a299117479402542fda73b5d64dbd905de6d
Author: Andy Wingo <address@hidden>
Date:   Sun Aug 8 13:00:57 2010 +0200

    more r6rs incompat
    
    * doc/ref/r6rs.texi (R6RS Incompatibilities): Add section on string
      syntax.

commit 08fc523b0eb477e137d1f6c64c38851f6cddb514
Author: Andy Wingo <address@hidden>
Date:   Sun Aug 8 12:58:05 2010 +0200

    add section on toplevel expansion to r6rs incompatibilities
    
    * doc/ref/r6rs.texi (R6RS Incompatibilities): Add a section about
      toplevel expansion, before taking a look at fixing it...

-----------------------------------------------------------------------

Summary of changes:
 README                                    |   17 +-
 configure.ac                              |   10 -
 doc/ref/Makefile.am                       |    2 +-
 doc/ref/api-deprecated.texi               |   31 +++
 doc/ref/api-discdepr.texi                 |   38 ---
 doc/ref/guile.texi                        |    4 +-
 doc/ref/r6rs.texi                         |   50 ++++
 libguile.h                                |    1 -
 libguile/Makefile.am                      |    4 -
 libguile/boolean.h                        |   14 +-
 libguile/deprecated.c                     |  377 ++++++++++++++++++++++++++++-
 libguile/deprecated.h                     |   97 ++++++++
 libguile/discouraged.c                    |  307 -----------------------
 libguile/discouraged.h                    |  184 --------------
 libguile/eq.h                             |    9 +-
 libguile/gen-scmconfig.c                  |    6 -
 libguile/init.c                           |    5 -
 libguile/numbers.c                        |   10 +-
 libguile/pairs.h                          |   10 +-
 libguile/symbols.h                        |   14 +-
 test-suite/standalone/test-num2integral.c |   45 +---
 21 files changed, 622 insertions(+), 613 deletions(-)
 create mode 100644 doc/ref/api-deprecated.texi
 delete mode 100644 doc/ref/api-discdepr.texi
 delete mode 100644 libguile/discouraged.c
 delete mode 100644 libguile/discouraged.h

diff --git a/README b/README
index 90914e1..f216d7d 100644
--- a/README
+++ b/README
@@ -145,10 +145,6 @@ switches specific to Guile you may find useful in some 
circumstances.
   implementation and helps to keep Guile reasonably clean of historic
   baggage.
 
-  Deprecated features are considered harmful; using them is likely a
-  bug.  See below for the related notion of `discouraged' features,
-  which are OK but have fallen out of favor.
-
   See the file NEWS for a list of features that are currently
   deprecated.  Each entry will also tell you what you should replace
   your code with.
@@ -198,16 +194,9 @@ switches specific to Guile you may find useful in some 
circumstances.
   'warn-deprecated) to enable and disable the detailed messaged at run
   time.
 
---disable-discouraged
-
-  In addition to deprecated features, Guile can also contain things
-  that are merely `discouraged'.  It is OK to continue to use these
-  features in old code, but new code should avoid them since there are
-  better alternatives.
-
-  There is nothing wrong with a discouraged feature per se, but they
-  might have strange names, or be non-standard, for example.  Avoiding
-  them will make your code better.
+  Additionally, if your toolchain is new enough, you will receive
+  warnings at link time if you have a Guile extension that uses
+  deprecated functions provided by Guile.
 
 --disable-shared  ---  Do not build shared libraries.
 --disable-static  ---  Do not build static libraries.
diff --git a/configure.ac b/configure.ac
index 57ba8d6..f3afec3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -130,15 +130,6 @@ AC_ARG_ENABLE(regex,
   [  --disable-regex         omit regular expression interfaces],,
   enable_regex=yes)
 
-AC_ARG_ENABLE([discouraged],
-  AS_HELP_STRING([--disable-discouraged],[omit discouraged features]))
-
-if test "$enable_discouraged" = no; then
-  SCM_I_GSC_ENABLE_DISCOURAGED=0
-else
-  SCM_I_GSC_ENABLE_DISCOURAGED=1
-fi
-
 AC_ARG_ENABLE([deprecated],
   AS_HELP_STRING([--disable-deprecated],[omit deprecated features]))
 
@@ -1613,7 +1604,6 @@ AC_SUBST([sitedir])
 
 # Additional SCM_I_GSC definitions are above.
 AC_SUBST([SCM_I_GSC_GUILE_DEBUG])
-AC_SUBST([SCM_I_GSC_ENABLE_DISCOURAGED])
 AC_SUBST([SCM_I_GSC_ENABLE_DEPRECATED])
 AC_SUBST([SCM_I_GSC_STACK_GROWS_UP])
 AC_SUBST([SCM_I_GSC_C_INLINE])
diff --git a/doc/ref/Makefile.am b/doc/ref/Makefile.am
index f415eeb..beeba0f 100644
--- a/doc/ref/Makefile.am
+++ b/doc/ref/Makefile.am
@@ -61,7 +61,7 @@ guile_TEXINFOS = preface.texi                 \
                 sxml-match.texi                \
                 scheme-scripts.texi            \
                 api-overview.texi              \
-                api-discdepr.texi              \
+                api-deprecated.texi            \
                 scheme-debugging.texi          \
                 scheme-using.texi              \
                 indices.texi                   \
diff --git a/doc/ref/api-deprecated.texi b/doc/ref/api-deprecated.texi
new file mode 100644
index 0000000..ea18e4a
--- /dev/null
+++ b/doc/ref/api-deprecated.texi
@@ -0,0 +1,31 @@
address@hidden -*-texinfo-*-
address@hidden This is part of the GNU Guile Reference Manual.
address@hidden Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2010
address@hidden   Free Software Foundation, Inc.
address@hidden See the file guile.texi for copying conditions.
+
address@hidden Deprecation
address@hidden Deprecation
+
+From time to time functions and other features of Guile become obsolete.
+Guile's @dfn{deprecation} is a mechanism that can help you cope with
+this.
+
+When you use a feature that is deprecated, you will likely get a
+warning message at run-time.  Also, deprecated features are not ready
+for production use: they might be very slow.
+
+Additionally, if you have a new enough toolchain, using a deprecated
+function from @code{libguile} will cause a link-time warning.
+
+The primary source for information about just what things are deprecated
+in a given release is the file @file{NEWS}.  That file also documents
+what you should use instead of the obsoleted things.
+
+The file @file{README} contains instructions on how to control the
+inclusion or removal of the deprecated features from the public API of
+Guile, and how to control the deprecation warning messages.
+
+The idea behind those mechanisms is that normally all deprecated are
+available, but you get feedback when compiling and running code that
+uses them, so that you can migrate to the newer APIs at your leisure.
diff --git a/doc/ref/api-discdepr.texi b/doc/ref/api-discdepr.texi
deleted file mode 100644
index ae6a685..0000000
--- a/doc/ref/api-discdepr.texi
+++ /dev/null
@@ -1,38 +0,0 @@
address@hidden -*-texinfo-*-
address@hidden This is part of the GNU Guile Reference Manual.
address@hidden Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004
address@hidden   Free Software Foundation, Inc.
address@hidden See the file guile.texi for copying conditions.
-
address@hidden Discouraged and Deprecated
address@hidden Discouraged and Deprecated
-
-From time to time functions and other features of Guile become
-obsolete.  Guile has some mechanisms in place that can help you cope
-with this.
-
-Guile has two levels of obsoleteness: things can be @emph{deprecated},
-meaning that their use is considered harmful and should be avoided,
-even in old code; or they can be merely @emph{discouraged}, meaning
-that they are fine in and of themselves, but that there are better
-alternatives that should be used in new code.
-
-When you use a feature that is deprecated, you will likely get a
-warning message at run-time.  Also, deprecated features are not ready
-for production use: they might be very slow.  When something is merely
-discouraged, it performs normally and you wont get any messages at
-run-time.
-
-The primary source for information about just what things are
-discouraged or deprecated in a given release is the file
address@hidden  That file also documents what you should use instead
-of the obsoleted things.
-
-The file @file{README} contains instructions on how to control the
-inclusion or removal of the deprecated and/or discouraged features
-from the public API of Guile, and how to control the warning messages
-for deprecated features.
-
-The idea behind those mechanisms is that normally all deprecated and
-discouraged features are available, but that you can omit them on
-purpose to check whether your code still relies on them.
diff --git a/doc/ref/guile.texi b/doc/ref/guile.texi
index 3536104..c47dfc5 100644
--- a/doc/ref/guile.texi
+++ b/doc/ref/guile.texi
@@ -288,7 +288,7 @@ available through both Scheme and C interfaces.
 
 @menu
 * API Overview::                Overview of the Guile API.
-* Discouraged and Deprecated::  Obsolete back-compatible APIs.
+* Deprecation::                 Obsolete back-compatible APIs.
 * The SCM Type::                The fundamental data type for C code.
 * Initialization::              Initializing Guile.
 * Snarfing Macros::             Macros for snarfing initialization actions.
@@ -316,7 +316,7 @@ available through both Scheme and C interfaces.
 @end menu
 
 @include api-overview.texi
address@hidden api-discdepr.texi
address@hidden api-deprecated.texi
 @include api-scm.texi
 @include api-init.texi
 @include api-snarf.texi
diff --git a/doc/ref/r6rs.texi b/doc/ref/r6rs.texi
index 6c5637e..9417641 100644
--- a/doc/ref/r6rs.texi
+++ b/doc/ref/r6rs.texi
@@ -37,9 +37,59 @@ is because the expansion of @code{library} sets the current 
module, but
 does not restore it.  This is a bug.
 
 @item
+R6RS unicode escapes within strings are disabled by default, because
+they conflict with Guile's already-existing escapes. R6RS behavior can
+be turned on via a reader option. @xref{String Syntax}, for more
+information.
+
address@hidden
 A @code{set!} to a variable transformer may only expand to an 
 expression, not a definition---even if the original @code{set!} 
 expression was in definition context.
+
address@hidden
+Instead of using the algorithm detailed in chapter 10 of the R6RS,
+expansion of toplevel forms happens sequentially.
+
+For example, while the expansion of the following set of recursive
+nested definitions does do the correct thing:
+
address@hidden
+(let ()
+  (define even?
+    (lambda (x)
+      (or (= x 0) (odd? (- x 1)))))
+  (define-syntax odd?
+    (syntax-rules ()
+      ((odd? x) (not (even? x)))))
+  (even? 10))
address@hidden #t
address@hidden example
+
address@hidden
+The same definitions at the toplevel do not:
+
address@hidden
+(begin
+ (define even?
+   (lambda (x)
+     (or (= x 0) (odd? (- x 1)))))
+ (define-syntax odd?
+   (syntax-rules ()
+     ((odd? x) (not (even? x)))))
+ (even? 10))
+<unnamed port>:4:18: In procedure even?:
+<unnamed port>:4:18: Wrong type to apply: #<syntax-transformer odd?>
address@hidden example
+
+This is because when expanding the right-hand-side of @code{even?}, the
+reference to @code{odd?} is not yet marked as a syntax transformer, so
+it is assumed to be a function.
+
+While it is likely that we can fix the case of toplevel forms nested in
+a @code{begin} or a @code{library} form, a fix for toplevel programs
+seems trickier to implement in a backward-compatible way. Suggestions
+and/or patches would be appreciated.
 @end itemize
 
 @node R6RS Standard Libraries
diff --git a/libguile.h b/libguile.h
index 6f1b3f8..5e8c792 100644
--- a/libguile.h
+++ b/libguile.h
@@ -123,7 +123,6 @@ extern "C" {
 #include "libguile/threads.h"
 #include "libguile/inline.h"
 
-#include "libguile/discouraged.h"
 #include "libguile/deprecated.h"
 
 #ifdef __cplusplus
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index 1dcf4c2..3045075 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -128,7 +128,6 @@ address@hidden@_la_SOURCES =                                
\
        debug.c                                 \
        deprecated.c                            \
        deprecation.c                           \
-       discouraged.c                           \
        dynwind.c                               \
        eq.c                                    \
        error.c                                 \
@@ -230,7 +229,6 @@ DOT_X_FILES =                                       \
        debug.x                                 \
        deprecated.x                            \
        deprecation.x                           \
-       discouraged.x                           \
        dynl.x                                  \
        dynwind.x                               \
        eq.x                                    \
@@ -330,7 +328,6 @@ DOT_DOC_FILES =                             \
        debug.doc                               \
        deprecated.doc                          \
        deprecation.doc                         \
-       discouraged.doc                         \
        dynl.doc                                \
        dynwind.doc                             \
        eq.doc                                  \
@@ -490,7 +487,6 @@ modinclude_HEADERS =                                \
        debug.h                                 \
        deprecated.h                            \
        deprecation.h                           \
-       discouraged.h                           \
        dynl.h                                  \
        dynwind.h                               \
        eq.h                                    \
diff --git a/libguile/boolean.h b/libguile/boolean.h
index 7084fdf..8f55f1e 100644
--- a/libguile/boolean.h
+++ b/libguile/boolean.h
@@ -56,8 +56,7 @@
   (SCM_MATCHES_BITS_IN_COMMON ((x), SCM_ELISP_NIL, SCM_BOOL_F))
 #define scm_is_true_and_not_nil(x) (!scm_is_false_or_nil (x))
 
-/* 
-#nil is false. */
+/* #nil is false. */
 #define scm_is_false(x)  (scm_is_false_or_nil (x))
 #define scm_is_true(x)   (!scm_is_false (x))
 
@@ -91,6 +90,17 @@ SCM_API int scm_to_bool (SCM x);
 
 
 
+/* Older spellings for the above routines, kept around for
+   compatibility. */
+#define SCM_FALSEP(x)          (scm_is_false (x))
+#define SCM_NFALSEP(x)         (scm_is_true (x))
+#define SCM_BOOLP(x)            (scm_is_bool (x))
+#define SCM_BOOL(x)            (scm_from_bool (x))
+#define SCM_NEGATE_BOOL(f)     (scm_from_bool (!(f)))
+#define SCM_BOOL_NOT(x)                (scm_not (x))
+
+
+
 /*
  * The following macros efficiently implement boolean truth testing as
  * expected by most lisps, which treat '() aka SCM_EOL as false.
diff --git a/libguile/deprecated.c b/libguile/deprecated.c
index 8405e88..648efe9 100644
--- a/libguile/deprecated.c
+++ b/libguile/deprecated.c
@@ -34,7 +34,6 @@
 #include "libguile/bytevectors.h"
 #include "libguile/bitvectors.h"
 #include "libguile/deprecated.h"
-#include "libguile/discouraged.h"
 #include "libguile/deprecation.h"
 #include "libguile/snarf.h"
 #include "libguile/validate.h"
@@ -1986,6 +1985,382 @@ scm_internal_stack_catch (SCM tag,
 
 
 
+SCM
+scm_short2num (short x)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_short2num' is deprecated. Use scm_from_short instead.");
+  return scm_from_short (x);
+}
+
+SCM
+scm_ushort2num (unsigned short x)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_ushort2num' is deprecated. Use scm_from_ushort instead.");
+  return scm_from_ushort (x);
+}
+
+SCM
+scm_int2num (int x)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_int2num' is deprecated. Use scm_from_int instead.");
+  return scm_from_int (x);
+}
+
+SCM
+scm_uint2num (unsigned int x)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_uint2num' is deprecated. Use scm_from_uint instead.");
+  return scm_from_uint (x);
+}
+
+SCM
+scm_long2num (long x)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_long2num' is deprecated. Use scm_from_long instead.");
+  return scm_from_long (x);
+}
+
+SCM
+scm_ulong2num (unsigned long x)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_ulong2num' is deprecated. Use scm_from_ulong instead.");
+  return scm_from_ulong (x);
+}
+
+SCM
+scm_size2num (size_t x)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_size2num' is deprecated. Use scm_from_size_t instead.");
+  return scm_from_size_t (x);
+}
+
+SCM
+scm_ptrdiff2num (ptrdiff_t x)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_ptrdiff2num' is deprecated. Use scm_from_ssize_t instead.");
+  return scm_from_ssize_t (x);
+}
+
+short
+scm_num2short (SCM x, unsigned long pos, const char *s_caller)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_num2short' is deprecated. Use scm_to_short instead.");
+  return scm_to_short (x);
+}
+
+unsigned short
+scm_num2ushort (SCM x, unsigned long pos, const char *s_caller)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_num2ushort' is deprecated. Use scm_to_ushort instead.");
+  return scm_to_ushort (x);
+}
+
+int
+scm_num2int (SCM x, unsigned long pos, const char *s_caller)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_num2int' is deprecated. Use scm_to_int instead.");
+  return scm_to_int (x);
+}
+
+unsigned int
+scm_num2uint (SCM x, unsigned long pos, const char *s_caller)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_num2uint' is deprecated. Use scm_to_uint instead.");
+  return scm_to_uint (x);
+}
+
+long
+scm_num2long (SCM x, unsigned long pos, const char *s_caller)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_num2long' is deprecated. Use scm_to_long instead.");
+  return scm_to_long (x);
+}
+
+unsigned long
+scm_num2ulong (SCM x, unsigned long pos, const char *s_caller)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_num2ulong' is deprecated. Use scm_to_ulong instead.");
+  return scm_to_ulong (x);
+}
+
+size_t
+scm_num2size (SCM x, unsigned long pos, const char *s_caller)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_num2size' is deprecated. Use scm_to_size_t instead.");
+  return scm_to_size_t (x);
+}
+
+ptrdiff_t
+scm_num2ptrdiff (SCM x, unsigned long pos, const char *s_caller)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_num2ptrdiff' is deprecated. Use scm_to_ssize_t instead.");
+  return scm_to_ssize_t (x);
+}
+
+#if SCM_SIZEOF_LONG_LONG != 0
+
+SCM
+scm_long_long2num (long long x)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_long_long2num' is deprecated. Use scm_from_long_long instead.");
+  return scm_from_long_long (x);
+}
+
+SCM
+scm_ulong_long2num (unsigned long long x)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_ulong_long2num' is deprecated. Use scm_from_ulong_long instead.");
+  return scm_from_ulong_long (x);
+}
+
+long long
+scm_num2long_long (SCM x, unsigned long pos, const char *s_caller)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_num2long_long' is deprecated. Use scm_to_long_long instead.");
+  return scm_to_long_long (x);
+}
+
+unsigned long long
+scm_num2ulong_long (SCM x, unsigned long pos, const char *s_caller)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_num2ulong_long' is deprecated. Use scm_from_ulong_long instead.");
+  return scm_to_ulong_long (x);
+}
+
+#endif
+
+SCM
+scm_make_real (double x)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_make_real' is deprecated. Use scm_from_double instead.");
+  return scm_from_double (x);
+}
+
+double
+scm_num2dbl (SCM a, const char *why)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_num2dbl' is deprecated. Use scm_to_double instead.");
+  return scm_to_double (a);
+}
+
+SCM
+scm_float2num (float n)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_float2num' is deprecated. Use scm_from_double instead.");
+  return scm_from_double ((double) n);
+}
+
+SCM
+scm_double2num (double n)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_double2num' is deprecated. Use scm_from_double instead.");
+  return scm_from_double (n);
+}
+
+SCM
+scm_make_complex (double x, double y)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_make_complex' is deprecated. Use scm_c_make_rectangular instead.");
+  return scm_c_make_rectangular (x, y);
+}
+
+SCM
+scm_mem2symbol (const char *mem, size_t len)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_mem2symbol' is deprecated. Use scm_from_locale_symboln instead.");
+  return scm_from_locale_symboln (mem, len);
+}
+
+SCM
+scm_mem2uninterned_symbol (const char *mem, size_t len)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_mem2uninterned_symbol' is deprecated. "
+     "Use scm_make_symbol and scm_from_locale_symboln instead.");
+  return scm_make_symbol (scm_from_locale_stringn (mem, len));
+}
+
+SCM
+scm_str2symbol (const char *str)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_str2symbol' is deprecated. Use scm_from_locale_symbol instead.");
+  return scm_from_locale_symbol (str);
+}
+
+
+/* This function must only be applied to memory obtained via malloc,
+   since the GC is going to apply `free' to it when the string is
+   dropped.
+
+   Also, s[len] must be `\0', since we promise that strings are
+   null-terminated.  Perhaps we could handle non-null-terminated
+   strings by claiming they're shared substrings of a string we just
+   made up.  */
+SCM
+scm_take_str (char *s, size_t len)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_take_str' is deprecated. Use scm_take_locale_stringn instead.");
+  return scm_take_locale_stringn (s, len);
+}
+
+/* `s' must be a malloc'd string.  See scm_take_str.  */
+SCM
+scm_take0str (char *s)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_take0str' is deprecated. Use scm_take_locale_string instead.");
+  return scm_take_locale_string (s);
+}
+
+SCM 
+scm_mem2string (const char *src, size_t len)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_mem2string' is deprecated. Use scm_from_locale_stringn instead.");
+  return scm_from_locale_stringn (src, len);
+}
+
+SCM
+scm_str2string (const char *src)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_str2string' is deprecated. Use scm_from_locale_string instead.");
+  return scm_from_locale_string (src);
+}
+
+SCM 
+scm_makfrom0str (const char *src)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_makfrom0str' is deprecated."
+     "Use scm_from_locale_string instead, but check for NULL first.");
+  if (!src) return SCM_BOOL_F;
+  return scm_from_locale_string (src);
+}
+
+SCM 
+scm_makfrom0str_opt (const char *src)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_makfrom0str_opt' is deprecated."
+     "Use scm_from_locale_string instead, but check for NULL first.");
+  return scm_makfrom0str (src);
+}
+
+
+SCM
+scm_allocate_string (size_t len)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_allocate_string' is deprecated. Use scm_c_make_string instead.");
+  return scm_i_make_string (len, NULL);
+}
+
+SCM_DEFINE (scm_make_keyword_from_dash_symbol, 
"make-keyword-from-dash-symbol", 1, 0, 0, 
+            (SCM symbol),
+            "Make a keyword object from a @var{symbol} that starts with a 
dash.")
+#define FUNC_NAME s_scm_make_keyword_from_dash_symbol
+{
+  SCM dash_string, non_dash_symbol;
+
+  scm_c_issue_deprecation_warning
+    ("`scm_make_keyword_from_dash_symbol' is deprecated. Don't use dash 
symbols.");
+
+  SCM_ASSERT (scm_is_symbol (symbol)
+             && (scm_i_symbol_ref (symbol, 0) == '-'),
+             symbol, SCM_ARG1, FUNC_NAME);
+
+  dash_string = scm_symbol_to_string (symbol);
+  non_dash_symbol =
+    scm_string_to_symbol (scm_c_substring (dash_string,
+                                          1,
+                                          scm_c_string_length (dash_string)));
+
+  return scm_symbol_to_keyword (non_dash_symbol);
+}
+#undef FUNC_NAME
+
+SCM_DEFINE (scm_keyword_dash_symbol, "keyword-dash-symbol", 1, 0, 0, 
+            (SCM keyword),
+           "Return the dash symbol for @var{keyword}.\n"
+           "This is the inverse of @code{make-keyword-from-dash-symbol}.")
+#define FUNC_NAME s_scm_keyword_dash_symbol
+{
+  SCM symbol = scm_keyword_to_symbol (keyword);
+  SCM parts = scm_list_2 (scm_from_locale_string ("-"),
+                         scm_symbol_to_string (symbol));
+  scm_c_issue_deprecation_warning
+    ("`scm_keyword_dash_symbol' is deprecated. Don't use dash symbols.");
+
+  return scm_string_to_symbol (scm_string_append (parts));
+}
+#undef FUNC_NAME
+
+SCM
+scm_c_make_keyword (const char *s)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_c_make_keyword' is deprecated. Use scm_from_locale_keyword 
instead.");
+  return scm_from_locale_keyword (s);
+}
+
+unsigned int
+scm_thread_sleep (unsigned int t)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_thread_sleep' is deprecated. Use scm_std_sleep instead.");
+  return scm_std_sleep (t);
+}
+
+unsigned long
+scm_thread_usleep (unsigned long t)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_thread_usleep' is deprecated. Use scm_std_usleep instead.");
+  return scm_std_usleep (t);
+}
+
+int scm_internal_select (int fds,
+                         SELECT_TYPE *rfds,
+                         SELECT_TYPE *wfds,
+                         SELECT_TYPE *efds,
+                         struct timeval *timeout)
+{
+  scm_c_issue_deprecation_warning
+    ("`scm_internal_select' is deprecated. Use scm_std_select instead.");
+  return scm_std_select (fds, rfds, wfds, efds, timeout);
+}
+
+
+
 void
 scm_i_init_deprecated ()
 {
diff --git a/libguile/deprecated.h b/libguile/deprecated.h
index 65eda5b..893523f 100644
--- a/libguile/deprecated.h
+++ b/libguile/deprecated.h
@@ -27,6 +27,7 @@
 #include "libguile/strings.h"
 #include "libguile/eval.h"
 #include "libguile/throw.h"
+#include "libguile/iselect.h"
 
 #if (SCM_ENABLE_DEPRECATED == 1)
 
@@ -640,6 +641,102 @@ SCM_DEPRECATED SCM scm_internal_stack_catch (SCM tag,
 
 
 
+/* These functions were "discouraged" in 1.8, and now are deprecated. */
+
+/* scm_to_int, scm_from_int are the official functions to do the job,
+   but there is nothing wrong with using scm_num2int, etc.
+
+   These could be trivially defined via macros, but we leave them as
+   functions since existing code may take their addresses.
+*/
+
+SCM_DEPRECATED SCM scm_short2num (short n);
+SCM_DEPRECATED SCM scm_ushort2num (unsigned short n);
+SCM_DEPRECATED SCM scm_int2num (int n);
+SCM_DEPRECATED SCM scm_uint2num (unsigned int n);
+SCM_DEPRECATED SCM scm_long2num (long n);
+SCM_DEPRECATED SCM scm_ulong2num (unsigned long n);
+SCM_DEPRECATED SCM scm_size2num (size_t n);
+SCM_DEPRECATED SCM scm_ptrdiff2num (scm_t_ptrdiff n);
+SCM_DEPRECATED short scm_num2short (SCM num, unsigned long int pos,
+                            const char *s_caller);
+SCM_DEPRECATED unsigned short scm_num2ushort (SCM num, unsigned long int pos,
+                                      const char *s_caller);
+SCM_DEPRECATED int scm_num2int (SCM num, unsigned long int pos,
+                        const char *s_caller);
+SCM_DEPRECATED unsigned int scm_num2uint (SCM num, unsigned long int pos,
+                                  const char *s_caller);
+SCM_DEPRECATED long scm_num2long (SCM num, unsigned long int pos,
+                          const char *s_caller);
+SCM_DEPRECATED unsigned long scm_num2ulong (SCM num, unsigned long int pos,
+                                    const char *s_caller);
+SCM_DEPRECATED scm_t_ptrdiff scm_num2ptrdiff (SCM num, unsigned long int pos,
+                                       const char *s_caller);
+SCM_DEPRECATED size_t scm_num2size (SCM num, unsigned long int pos,
+                            const char *s_caller);
+#if SCM_SIZEOF_LONG_LONG != 0
+SCM_DEPRECATED SCM scm_long_long2num (long long sl);
+SCM_DEPRECATED SCM scm_ulong_long2num (unsigned long long sl);
+SCM_DEPRECATED long long scm_num2long_long (SCM num, unsigned long int pos,
+                                    const char *s_caller);
+SCM_DEPRECATED unsigned long long scm_num2ulong_long (SCM num, unsigned long 
int pos,
+                                              const char *s_caller);
+#endif
+
+SCM_DEPRECATED SCM scm_make_real (double x);
+SCM_DEPRECATED double scm_num2dbl (SCM a, const char * why);
+SCM_DEPRECATED SCM scm_float2num (float n);
+SCM_DEPRECATED SCM scm_double2num (double n);
+
+/* The next two are implemented in numbers.c since they use features
+   only available there.
+*/
+SCM_DEPRECATED float scm_num2float (SCM num, unsigned long int pos,
+                            const char *s_caller);
+SCM_DEPRECATED double scm_num2double (SCM num, unsigned long int pos,
+                              const char *s_caller);
+
+SCM_DEPRECATED SCM scm_make_complex (double x, double y);
+
+/* Discouraged because they don't make the encoding explicit.
+ */
+
+SCM_DEPRECATED SCM scm_mem2symbol (const char *mem, size_t len);
+SCM_DEPRECATED SCM scm_mem2uninterned_symbol (const char *mem, size_t len);
+SCM_DEPRECATED SCM scm_str2symbol (const char *str);
+
+SCM_DEPRECATED SCM scm_take_str (char *s, size_t len);
+SCM_DEPRECATED SCM scm_take0str (char *s);
+SCM_DEPRECATED SCM scm_mem2string (const char *src, size_t len);
+SCM_DEPRECATED SCM scm_str2string (const char *src);
+SCM_DEPRECATED SCM scm_makfrom0str (const char *src);
+SCM_DEPRECATED SCM scm_makfrom0str_opt (const char *src);
+
+/* Discouraged because scm_c_make_string has a better name and is more
+   consistent with make-string.
+ */
+SCM_DEPRECATED SCM scm_allocate_string (size_t len);
+
+/* Discouraged because they are just strange.
+ */
+
+SCM_DEPRECATED SCM scm_make_keyword_from_dash_symbol (SCM symbol);
+SCM_DEPRECATED SCM scm_keyword_dash_symbol (SCM keyword);
+
+/* Discouraged because it does not state what encoding S is in.
+ */
+
+SCM_DEPRECATED SCM scm_c_make_keyword (const char *s);
+
+SCM_DEPRECATED unsigned int scm_thread_sleep (unsigned int);
+SCM_DEPRECATED unsigned long scm_thread_usleep (unsigned long);
+SCM_DEPRECATED int scm_internal_select (int fds,
+                                        SELECT_TYPE *rfds,
+                                        SELECT_TYPE *wfds,
+                                        SELECT_TYPE *efds,
+                                        struct timeval *timeout);
+
+
 void scm_i_init_deprecated (void);
 
 #endif
diff --git a/libguile/discouraged.c b/libguile/discouraged.c
deleted file mode 100644
index 2621428..0000000
--- a/libguile/discouraged.c
+++ /dev/null
@@ -1,307 +0,0 @@
-/* This file contains definitions for discouraged features.  When you
-   discourage something, move it here when that is feasible.
-*/
-
-/* Copyright (C) 2003, 2004, 2006, 2008 Free Software Foundation, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 3 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <libguile.h>
-
-
-#if (SCM_ENABLE_DISCOURAGED == 1)
-
-SCM
-scm_short2num (short x)
-{
-  return scm_from_short (x);
-}
-
-SCM
-scm_ushort2num (unsigned short x)
-{
-  return scm_from_ushort (x);
-}
-
-SCM
-scm_int2num (int x)
-{
-  return scm_from_int (x);
-}
-
-SCM
-scm_uint2num (unsigned int x)
-{
-  return scm_from_uint (x);
-}
-
-SCM
-scm_long2num (long x)
-{
-  return scm_from_long (x);
-}
-
-SCM
-scm_ulong2num (unsigned long x)
-{
-  return scm_from_ulong (x);
-}
-
-SCM
-scm_size2num (size_t x)
-{
-  return scm_from_size_t (x);
-}
-
-SCM
-scm_ptrdiff2num (ptrdiff_t x)
-{
-  return scm_from_ssize_t (x);
-}
-
-short
-scm_num2short (SCM x, unsigned long pos, const char *s_caller)
-{
-  return scm_to_short (x);
-}
-
-unsigned short
-scm_num2ushort (SCM x, unsigned long pos, const char *s_caller)
-{
-  return scm_to_ushort (x);
-}
-
-int
-scm_num2int (SCM x, unsigned long pos, const char *s_caller)
-{
-  return scm_to_int (x);
-}
-
-unsigned int
-scm_num2uint (SCM x, unsigned long pos, const char *s_caller)
-{
-  return scm_to_uint (x);
-}
-
-long
-scm_num2long (SCM x, unsigned long pos, const char *s_caller)
-{
-  return scm_to_long (x);
-}
-
-unsigned long
-scm_num2ulong (SCM x, unsigned long pos, const char *s_caller)
-{
-  return scm_to_ulong (x);
-}
-
-size_t
-scm_num2size (SCM x, unsigned long pos, const char *s_caller)
-{
-  return scm_to_size_t (x);
-}
-
-ptrdiff_t
-scm_num2ptrdiff (SCM x, unsigned long pos, const char *s_caller)
-{
-  return scm_to_ssize_t (x);
-}
-
-#if SCM_SIZEOF_LONG_LONG != 0
-
-SCM
-scm_long_long2num (long long x)
-{
-  return scm_from_long_long (x);
-}
-
-SCM
-scm_ulong_long2num (unsigned long long x)
-{
-  return scm_from_ulong_long (x);
-}
-
-long long
-scm_num2long_long (SCM x, unsigned long pos, const char *s_caller)
-{
-  return scm_to_long_long (x);
-}
-
-unsigned long long
-scm_num2ulong_long (SCM x, unsigned long pos, const char *s_caller)
-{
-  return scm_to_ulong_long (x);
-}
-
-#endif
-
-SCM
-scm_make_real (double x)
-{
-  return scm_from_double (x);
-}
-
-double
-scm_num2dbl (SCM a, const char *why)
-{
-  return scm_to_double (a);
-}
-
-SCM
-scm_float2num (float n)
-{
-  return scm_from_double ((double) n);
-}
-
-SCM
-scm_double2num (double n)
-{
-  return scm_from_double (n);
-}
-
-SCM
-scm_make_complex (double x, double y)
-{
-  return scm_c_make_rectangular (x, y);
-}
-
-SCM
-scm_mem2symbol (const char *mem, size_t len)
-{
-  return scm_from_locale_symboln (mem, len);
-}
-
-SCM
-scm_mem2uninterned_symbol (const char *mem, size_t len)
-{
-  return scm_make_symbol (scm_from_locale_stringn (mem, len));
-}
-
-SCM
-scm_str2symbol (const char *str)
-{
-  return scm_from_locale_symbol (str);
-}
-
-
-/* This function must only be applied to memory obtained via malloc,
-   since the GC is going to apply `free' to it when the string is
-   dropped.
-
-   Also, s[len] must be `\0', since we promise that strings are
-   null-terminated.  Perhaps we could handle non-null-terminated
-   strings by claiming they're shared substrings of a string we just
-   made up.  */
-SCM
-scm_take_str (char *s, size_t len)
-{
-  SCM answer = scm_from_locale_stringn (s, len);
-  free (s);
-  return answer;
-}
-
-/* `s' must be a malloc'd string.  See scm_take_str.  */
-SCM
-scm_take0str (char *s)
-{
-  return scm_take_locale_string (s);
-}
-
-SCM 
-scm_mem2string (const char *src, size_t len)
-{
-  return scm_from_locale_stringn (src, len);
-}
-
-SCM
-scm_str2string (const char *src)
-{
-  return scm_from_locale_string (src);
-}
-
-SCM 
-scm_makfrom0str (const char *src)
-{
-  if (!src) return SCM_BOOL_F;
-  return scm_from_locale_string (src);
-}
-
-SCM 
-scm_makfrom0str_opt (const char *src)
-{
-  return scm_makfrom0str (src);
-}
-
-
-SCM
-scm_allocate_string (size_t len)
-{
-  return scm_i_make_string (len, NULL);
-}
-
-SCM_DEFINE (scm_make_keyword_from_dash_symbol, 
"make-keyword-from-dash-symbol", 1, 0, 0, 
-            (SCM symbol),
-            "Make a keyword object from a @var{symbol} that starts with a 
dash.")
-#define FUNC_NAME s_scm_make_keyword_from_dash_symbol
-{
-  SCM dash_string, non_dash_symbol;
-
-  SCM_ASSERT (scm_is_symbol (symbol)
-             && (scm_i_symbol_ref (symbol, 0) == '-'),
-             symbol, SCM_ARG1, FUNC_NAME);
-
-  dash_string = scm_symbol_to_string (symbol);
-  non_dash_symbol =
-    scm_string_to_symbol (scm_c_substring (dash_string,
-                                          1,
-                                          scm_c_string_length (dash_string)));
-
-  return scm_symbol_to_keyword (non_dash_symbol);
-}
-#undef FUNC_NAME
-
-SCM_DEFINE (scm_keyword_dash_symbol, "keyword-dash-symbol", 1, 0, 0, 
-            (SCM keyword),
-           "Return the dash symbol for @var{keyword}.\n"
-           "This is the inverse of @code{make-keyword-from-dash-symbol}.")
-#define FUNC_NAME s_scm_keyword_dash_symbol
-{
-  SCM symbol = scm_keyword_to_symbol (keyword);
-  SCM parts = scm_list_2 (scm_from_locale_string ("-"),
-                         scm_symbol_to_string (symbol));
-  return scm_string_to_symbol (scm_string_append (parts));
-}
-#undef FUNC_NAME
-
-SCM
-scm_c_make_keyword (const char *s)
-{
-  return scm_from_locale_keyword (s);
-}
-
-
-void
-scm_i_init_discouraged (void)
-{
-#include "libguile/discouraged.x"
-}
-
-#endif
diff --git a/libguile/discouraged.h b/libguile/discouraged.h
deleted file mode 100644
index dfa5811..0000000
--- a/libguile/discouraged.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/* This file contains definitions for discouraged features.  When you
-   discourage something, move it here when that is feasible.
-
-   A discouraged feature is one that shouldn't be used in new code
-   since we have a better alternative now.  However, there is nothing
-   wrong with using the old feature, so it is OK to continue to use
-   it.
-
-   Eventually, discouraged features can be deprecated since removing
-   them will make Guile simpler.
-*/
-
-#ifndef SCM_DISCOURAGED_H
-#define SCM_DISCOURAGED_H
-
-/* Copyright (C) 2004, 2006, 2010 Free Software Foundation, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 3 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-
-#include "libguile/__scm.h"
-
-#if SCM_ENABLE_DISCOURAGED == 1
-
-/* Discouraged because they do not follow the naming convention.  That
-   is, they end in "P" but return a C boolean.  Also, SCM_BOOLP
-   evaluates its argument twice.
-*/
-
-#define SCM_FALSEP             scm_is_false
-#define SCM_NFALSEP            scm_is_true
-#define SCM_BOOLP               scm_is_bool
-#define SCM_EQ_P                scm_is_eq
-
-
-/* Convert from a C boolean to a SCM boolean value */
-#define SCM_BOOL               scm_from_bool
-
-/* Convert from a C boolean to a SCM boolean value and negate it */
-#define SCM_NEGATE_BOOL(f)     scm_from_bool(!(f))
-
-/* SCM_BOOL_NOT returns the other boolean.  
- * The order of ^s here is important for Borland C++ (!?!?!)
- */
-#define SCM_BOOL_NOT(x)                (SCM_PACK (SCM_UNPACK (x) \
-                                          ^ (SCM_UNPACK (SCM_BOOL_T) \
-                                             ^ SCM_UNPACK (SCM_BOOL_F))))
-
-/* scm_to_int, scm_from_int are the official functions to do the job,
-   but there is nothing wrong with using scm_num2int, etc.
-
-   These could be trivially defined via macros, but we leave them as
-   functions since existing code may take their addresses.
-*/
-
-SCM_API SCM scm_short2num (short n);
-SCM_API SCM scm_ushort2num (unsigned short n);
-SCM_API SCM scm_int2num (int n);
-SCM_API SCM scm_uint2num (unsigned int n);
-SCM_API SCM scm_long2num (long n);
-SCM_API SCM scm_ulong2num (unsigned long n);
-SCM_API SCM scm_size2num (size_t n);
-SCM_API SCM scm_ptrdiff2num (scm_t_ptrdiff n);
-SCM_API short scm_num2short (SCM num, unsigned long int pos,
-                            const char *s_caller);
-SCM_API unsigned short scm_num2ushort (SCM num, unsigned long int pos,
-                                      const char *s_caller);
-SCM_API int scm_num2int (SCM num, unsigned long int pos,
-                        const char *s_caller);
-SCM_API unsigned int scm_num2uint (SCM num, unsigned long int pos,
-                                  const char *s_caller);
-SCM_API long scm_num2long (SCM num, unsigned long int pos,
-                          const char *s_caller);
-SCM_API unsigned long scm_num2ulong (SCM num, unsigned long int pos,
-                                    const char *s_caller);
-SCM_API scm_t_ptrdiff scm_num2ptrdiff (SCM num, unsigned long int pos,
-                                       const char *s_caller);
-SCM_API size_t scm_num2size (SCM num, unsigned long int pos,
-                            const char *s_caller);
-#if SCM_SIZEOF_LONG_LONG != 0
-SCM_API SCM scm_long_long2num (long long sl);
-SCM_API SCM scm_ulong_long2num (unsigned long long sl);
-SCM_API long long scm_num2long_long (SCM num, unsigned long int pos,
-                                    const char *s_caller);
-SCM_API unsigned long long scm_num2ulong_long (SCM num, unsigned long int pos,
-                                              const char *s_caller);
-#endif
-
-SCM_API SCM scm_make_real (double x);
-SCM_API double scm_num2dbl (SCM a, const char * why);
-SCM_API SCM scm_float2num (float n);
-SCM_API SCM scm_double2num (double n);
-
-/* The next two are implemented in numbers.c since they use features
-   only available there.
-*/
-SCM_API float scm_num2float (SCM num, unsigned long int pos,
-                            const char *s_caller);
-SCM_API double scm_num2double (SCM num, unsigned long int pos,
-                              const char *s_caller);
-
-SCM_API SCM scm_make_complex (double x, double y);
-
-/* Discouraged because they don't make the encoding explicit.
- */
-
-SCM_API SCM scm_mem2symbol (const char *mem, size_t len);
-SCM_API SCM scm_mem2uninterned_symbol (const char *mem, size_t len);
-SCM_API SCM scm_str2symbol (const char *str);
-
-SCM_API SCM scm_take_str (char *s, size_t len);
-SCM_API SCM scm_take0str (char *s);
-SCM_API SCM scm_mem2string (const char *src, size_t len);
-SCM_API SCM scm_str2string (const char *src);
-SCM_API SCM scm_makfrom0str (const char *src);
-SCM_API SCM scm_makfrom0str_opt (const char *src);
-
-/* Discouraged because scm_c_make_string has a better name and is more
-   consistent with make-string.
- */
-SCM_API SCM scm_allocate_string (size_t len);
-
-/* Discouraged because scm_is_symbol has a better name,
- */
-#define SCM_SYMBOLP scm_is_symbol
-
-/* Discouraged because the alternatives have the better names.
- */
-#define SCM_SYMBOL_FUNC                    scm_symbol_fref
-#define SCM_SET_SYMBOL_FUNC         scm_symbol_fset_x
-#define SCM_SYMBOL_PROPS           scm_symbol_pref
-#define SCM_SET_SYMBOL_PROPS        scm_symbol_pset_x
-
-/* Discouraged because there are better ways.
- */
-#define SCM_SYMBOL_HASH             scm_i_symbol_hash
-#define SCM_SYMBOL_INTERNED_P(X)    scm_i_symbol_is_interned
-
-/* Discouraged because they evaluated their arguments twice and/or
-   don't fit the naming scheme.
-*/
-
-#define SCM_CONSP(x)            (scm_is_pair (x))
-#define SCM_NCONSP(x)           (!SCM_CONSP (x))
-#define SCM_NULLP(x)           (scm_is_null (x))
-#define SCM_NNULLP(x)          (!scm_is_null (x))
-
-/* Discouraged because they are just strange.
- */
-
-SCM_API SCM scm_make_keyword_from_dash_symbol (SCM symbol);
-SCM_API SCM scm_keyword_dash_symbol (SCM keyword);
-
-/* Discouraged because it does not state what encoding S is in.
- */
-
-SCM_API SCM scm_c_make_keyword (const char *s);
-
-/* Discouraged because the 'internal' and 'thread' moniker is
-   confusing.
- */
-
-#define scm_internal_select scm_std_select
-#define scm_thread_sleep    scm_std_sleep
-#define scm_thread_usleep   scm_std_usleep
-
-SCM_INTERNAL void scm_i_init_discouraged (void);
-
-#endif /* SCM_ENABLE_DISCOURAGED == 1 */
-
-#endif /* SCM_DISCOURAGED_H */
diff --git a/libguile/eq.h b/libguile/eq.h
index 1aeb1c4..c09d667 100644
--- a/libguile/eq.h
+++ b/libguile/eq.h
@@ -3,7 +3,7 @@
 #ifndef SCM_EQ_H
 #define SCM_EQ_H
 
-/* Copyright (C) 1995,1996,2000, 2006, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,2000, 2006, 2008, 2010 Free Software Foundation, 
Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -27,6 +27,13 @@
 
 
 
+/* scm_is_eq is defined in tags.h for some reason. */
+
+/* An older spelling for scm_is_eq. */
+#define SCM_EQ_P(x,y) (scm_is_eq (x, y))
+
+
+
 SCM_API SCM scm_eq_p (SCM x, SCM y);
 SCM_API SCM scm_eqv_p (SCM x, SCM y);
 SCM_API SCM scm_equal_p (SCM x, SCM y);
diff --git a/libguile/gen-scmconfig.c b/libguile/gen-scmconfig.c
index 79a7d37..73f847f 100644
--- a/libguile/gen-scmconfig.c
+++ b/libguile/gen-scmconfig.c
@@ -218,12 +218,6 @@ main (int argc, char *argv[])
   else
     pf ("/* #undef GUILE_DEBUG */\n");
 
-  /*** SCM_ENABLE_DISCOURAGED (0 or 1) ***/
-  pf ("\n");
-  pf ("/* Set to 1 if you want to enable discouraged features. */\n");
-  pf ("/* (value will be 0 or 1). */\n");
-  pf ("#define SCM_ENABLE_DISCOURAGED %d\n", SCM_I_GSC_ENABLE_DISCOURAGED);
-  
   /*** SCM_ENABLE_DEPRECATED (0 or 1) ***/
   pf ("\n");
   pf ("/* Set to 1 if you want to enable deprecated features. */\n");
diff --git a/libguile/init.c b/libguile/init.c
index 4843910..b511aae 100644
--- a/libguile/init.c
+++ b/libguile/init.c
@@ -134,7 +134,6 @@
 #include "libguile/extensions.h"
 #include "libguile/uniform.h"
 #include "libguile/srfi-4.h"
-#include "libguile/discouraged.h"
 #include "libguile/deprecated.h"
 
 #include "libguile/init.h"
@@ -562,10 +561,6 @@ scm_i_init_guile (SCM_STACKITEM *base)
 
   scm_init_goops ();
 
-#if SCM_ENABLE_DISCOURAGED == 1
-  scm_i_init_discouraged ();
-#endif
-
 #if SCM_ENABLE_DEPRECATED == 1
   scm_i_init_deprecated ();
 #endif
diff --git a/libguile/numbers.c b/libguile/numbers.c
index 72c0387..6f04ea5 100644
--- a/libguile/numbers.c
+++ b/libguile/numbers.c
@@ -67,8 +67,6 @@
 
 #include "libguile/eq.h"
 
-#include "libguile/discouraged.h"
-
 /* values per glibc, if not already defined */
 #ifndef M_LOG10E
 #define M_LOG10E   0.43429448190325182765
@@ -6353,11 +6351,14 @@ scm_from_double (double val)
   return z;
 }
 
-#if SCM_ENABLE_DISCOURAGED == 1
+#if SCM_ENABLE_DEPRECATED == 1
 
 float
 scm_num2float (SCM num, unsigned long int pos, const char *s_caller)
 {
+  scm_c_issue_deprecation_warning
+    ("`scm_num2float' is deprecated. Use scm_to_double instead.");
+
   if (SCM_BIGP (num))
     {
       float res = mpz_get_d (SCM_I_BIG_MPZ (num));
@@ -6373,6 +6374,9 @@ scm_num2float (SCM num, unsigned long int pos, const char 
*s_caller)
 double
 scm_num2double (SCM num, unsigned long int pos, const char *s_caller)
 {
+  scm_c_issue_deprecation_warning
+    ("`scm_num2double' is deprecated. Use scm_to_double instead.");
+
   if (SCM_BIGP (num))
     {
       double res = mpz_get_d (SCM_I_BIG_MPZ (num));
diff --git a/libguile/pairs.h b/libguile/pairs.h
index 0e98162..6edfc9c 100644
--- a/libguile/pairs.h
+++ b/libguile/pairs.h
@@ -56,11 +56,19 @@
   (SCM_MATCHES_BITS_IN_COMMON ((x), SCM_ELISP_NIL, SCM_EOL))
 
 
-/* Older spellings for these nil predicates. */
+
+
+/* Older spellings for these null, nil, and pair predicates. */
 #define SCM_NILP(x) (scm_is_eq ((x), SCM_ELISP_NIL))
 #define SCM_NULL_OR_NIL_P(x) (scm_is_null_or_nil (x))
+#define SCM_NULLP(x) (scm_is_null (x))
+#define SCM_NNULLP(x) (!scm_is_null (x))
+#define SCM_CONSP(x)            (scm_is_pair (x))
+#define SCM_NCONSP(x)           (!SCM_CONSP (x))
 
 
+
+
 /* #nil is null. */
 #define scm_is_null(x)         (scm_is_null_or_nil(x))
 
diff --git a/libguile/symbols.h b/libguile/symbols.h
index e4bc333..8f96d65 100644
--- a/libguile/symbols.h
+++ b/libguile/symbols.h
@@ -3,7 +3,7 @@
 #ifndef SCM_SYMBOLS_H
 #define SCM_SYMBOLS_H
 
-/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003, 2004, 2006, 2008 Free 
Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003, 2004, 2006, 2008, 2010 
Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -36,6 +36,18 @@
 
 
 
+/* Older spellings; don't use in new code.
+ */
+#define SCM_SYMBOLP(x)                 (scm_is_symbol (x))
+#define SCM_SYMBOL_FUNC(x)             (scm_symbol_fref (x))
+#define SCM_SET_SYMBOL_FUNC(x,f)       (scm_symbol_fset_x (x, f))
+#define SCM_SYMBOL_PROPS(x)            (scm_symbol_pref (x))
+#define SCM_SET_SYMBOL_PROPS(x,p)      (scm_symbol_pset_x (x, p))
+#define SCM_SYMBOL_HASH(x)             (scm_i_symbol_hash (x))
+#define SCM_SYMBOL_INTERNED_P(x)       (scm_i_symbol_is_interned (x))
+
+
+
 #ifdef GUILE_DEBUG
 SCM_API SCM scm_sys_symbols (void);
 #endif
diff --git a/test-suite/standalone/test-num2integral.c 
b/test-suite/standalone/test-num2integral.c
index 8b69b07..af995ec 100644
--- a/test-suite/standalone/test-num2integral.c
+++ b/test-suite/standalone/test-num2integral.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999,2000,2001,2003,2004, 2006, 2008 Free Software 
Foundation, Inc.
+/* Copyright (C) 1999,2000,2001,2003,2004, 2006, 2008, 2010 Free Software 
Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -25,8 +25,6 @@
 #include <stdio.h>
 #include <assert.h>
 
-#if SCM_ENABLE_DISCOURAGED == 1
-
 SCM out_of_range_handler (void *data, SCM key, SCM args);
 SCM call_num2long_long_body (void *data);
 SCM call_num2ulong_long_body (void *data);
@@ -35,37 +33,36 @@ SCM call_num2ulong_long_body (void *data);
 SCM
 out_of_range_handler (void *data, SCM key, SCM args)
 {
-  assert (scm_equal_p (key, scm_str2symbol ("out-of-range")));
+  assert (scm_equal_p (key, scm_from_locale_symbol ("out-of-range")));
   return SCM_BOOL_T;
 }
 
 SCM
 call_num2long_long_body (void *data)
 {
-  scm_num2long_long (* (SCM *) data, SCM_ARG1, "call_num2long_long_body");
+  scm_to_long_long (* (SCM *) data);
   return SCM_BOOL_F;
 }
 
 SCM
 call_num2ulong_long_body (void *data)
 {
-  scm_num2ulong_long (* (SCM *) data, SCM_ARG1, "call_num2ulong_long_body");
+  scm_to_ulong_long (* (SCM *) data);
   return SCM_BOOL_F;
 }
 
 static void
 test_long_long ()
 {
-#if SCM_SIZEOF_LONG_LONG != 0
   {
-    SCM n = scm_long_long2num (SCM_I_LLONG_MIN);
-    long long result = scm_num2long_long(n, 0, "main");
+    SCM n = scm_from_long_long (SCM_I_LLONG_MIN);
+    long long result = scm_to_long_long(n);
     assert (result == SCM_I_LLONG_MIN);
   }
 
   /* LLONG_MIN - 1 */
   {
-    SCM n = scm_difference (scm_long_long2num (SCM_I_LLONG_MIN), scm_from_int 
(1));
+    SCM n = scm_difference (scm_from_long_long (SCM_I_LLONG_MIN), scm_from_int 
(1));
     SCM caught = scm_internal_catch (SCM_BOOL_T, call_num2long_long_body, &n,
                                      out_of_range_handler, NULL);
     assert (scm_is_true (caught));
@@ -73,8 +70,8 @@ test_long_long ()
 
   /* SCM_I_LLONG_MIN + SCM_I_LLONG_MIN/2 */
   {
-    SCM n = scm_sum (scm_long_long2num (SCM_I_LLONG_MIN),
-                     scm_long_long2num (SCM_I_LLONG_MIN / 2));
+    SCM n = scm_sum (scm_from_long_long (SCM_I_LLONG_MIN),
+                     scm_from_long_long (SCM_I_LLONG_MIN / 2));
     SCM caught = scm_internal_catch (SCM_BOOL_T, call_num2long_long_body, &n,
                                      out_of_range_handler, NULL);
     assert (scm_is_true (caught));
@@ -82,7 +79,7 @@ test_long_long ()
 
   /* SCM_I_LLONG_MAX + 1 */
   {
-    SCM n = scm_sum (scm_long_long2num (SCM_I_LLONG_MAX), scm_from_int (1));
+    SCM n = scm_sum (scm_from_long_long (SCM_I_LLONG_MAX), scm_from_int (1));
     SCM caught = scm_internal_catch (SCM_BOOL_T, call_num2long_long_body, &n,
                                      out_of_range_handler, NULL);
     assert (scm_is_true (caught));
@@ -104,18 +101,14 @@ test_long_long ()
                                      out_of_range_handler, NULL);
     assert (scm_is_true (caught));
   }
-
-#endif /* SCM_SIZEOF_LONG_LONG != 0 */
 }
 
 static void
 test_ulong_long ()
 {
-#if SCM_SIZEOF_LONG_LONG != 0
-
   {
-    SCM n = scm_ulong_long2num (SCM_I_ULLONG_MAX);
-    unsigned long long result = scm_num2ulong_long(n, 0, "main");
+    SCM n = scm_from_ulong_long (SCM_I_ULLONG_MAX);
+    unsigned long long result = scm_to_ulong_long(n);
     assert (result == SCM_I_ULLONG_MAX);
   }
 
@@ -129,7 +122,7 @@ test_ulong_long ()
 
   /* SCM_I_ULLONG_MAX + 1 */
   {
-    SCM n = scm_sum (scm_ulong_long2num (SCM_I_ULLONG_MAX), scm_from_int (1));
+    SCM n = scm_sum (scm_from_ulong_long (SCM_I_ULLONG_MAX), scm_from_int (1));
     SCM caught = scm_internal_catch (SCM_BOOL_T, call_num2ulong_long_body, &n,
                                      out_of_range_handler, NULL);
     assert (scm_is_true (caught));
@@ -142,8 +135,6 @@ test_ulong_long ()
                                      out_of_range_handler, NULL);
     assert (scm_is_true (caught));
   }
-
-#endif /* SCM_SIZEOF_LONG_LONG != 0 */
 }
 
 static void
@@ -159,13 +150,3 @@ main (int argc, char *argv[])
   scm_boot_guile (argc, argv, tests, NULL);
   return 0;
 }
-
-#else  /* SCM_ENABLE_DISCOURAGED == 0 */
-
-int
-main (int argc, char *argv[])
-{
-  return 0;
-}
-
-#endif /* SCM_ENABLE_DISCOURAGED == 0 */


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]