1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

* Deprecated some definitions.

* Minor fixes.
This commit is contained in:
Dirk Herrmann 2001-05-14 16:38:08 +00:00
parent 928f20fb87
commit 5cd06d5eaa
9 changed files with 58 additions and 24 deletions

View file

@ -1,3 +1,7 @@
2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
* configure.in (SCM_DEBUG_DEPRECATED): Always defined.
2001-05-13 Thien-Thi Nguyen <ttn@revel.glug.org> 2001-05-13 Thien-Thi Nguyen <ttn@revel.glug.org>
* AUTHORS (Martin Grabmueller, Thien-Thi Nguyen): Update. * AUTHORS (Martin Grabmueller, Thien-Thi Nguyen): Update.

16
NEWS
View file

@ -603,6 +603,22 @@ Return the argument.
Use `identity' instead. Use `identity' instead.
** Deprecated: -1+
Use `1-' instead.
** Deprecated: return-it
Use `noop' instead.
** Deprecated: string-character-length
Use `string-length' instead.
** Deprecated: flags
Use `logior' instead.
** Deprecated: close-all-ports-except. ** Deprecated: close-all-ports-except.
This was intended for closing ports in a child process after a fork, This was intended for closing ports in a child process after a fork,

View file

@ -40,7 +40,8 @@ After signal handling and threading have been fixed:
gc.c: scm_remember gc.c: scm_remember
string.c: scm_makstr string.c: scm_makstr
- remove deprecated procedures: - remove deprecated procedures:
boot-9.scm: eval-in-module, id boot-9.scm: eval-in-module, id, -1+, return-it, string-character-length,
flags
- remove deprecated macros: SCM_OUTOFRANGE, SCM_NALLOC, SCM_HUP_SIGNAL, - remove deprecated macros: SCM_OUTOFRANGE, SCM_NALLOC, SCM_HUP_SIGNAL,
SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL,
SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD,

View file

@ -100,7 +100,7 @@ AC_ARG_ENABLE(deprecated,
[ --disable-deprecated omit deprecated features [no]]) [ --disable-deprecated omit deprecated features [no]])
if test "$enable_deprecated" = no; then if test "$enable_deprecated" = no; then
AC_DEFINE(SCM_DEBUG_DEPRECATED) AC_DEFINE(SCM_DEBUG_DEPRECATED, 1)
else else
if test "$enable_deprecated" = yes || test "$enable_deprecated" = ""; then if test "$enable_deprecated" = yes || test "$enable_deprecated" = ""; then
warn_default=summary warn_default=summary
@ -109,6 +109,7 @@ else
else else
warn_default=$enable_deprecated warn_default=$enable_deprecated
fi fi
AC_DEFINE(SCM_DEBUG_DEPRECATED, 0)
AC_DEFINE_UNQUOTED(GUILE_WARN_DEPRECATED_DEFAULT, "$warn_default") AC_DEFINE_UNQUOTED(GUILE_WARN_DEPRECATED_DEFAULT, "$warn_default")
fi fi

View file

@ -1,3 +1,8 @@
2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
* boot-9.scm (-1+, return-it, string-character-length, flags):
Deprecated.
2001-05-11 Martin Grabmueller <mgrabmue@cs.tu-berlin.de> 2001-05-11 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
* boot-9.scm: Added `cond-expand' (SRFI-0) for portable feature * boot-9.scm: Added `cond-expand' (SRFI-0) for portable feature

View file

@ -107,18 +107,22 @@
(define (identity x) x) (define (identity x) x)
(define (1+ n) (+ n 1)) (define (1+ n) (+ n 1))
(define (-1+ n) (+ n -1)) (define (1- n) (+ n -1))
(define 1- -1+)
(define return-it noop)
(define (and=> value procedure) (and value (procedure value))) (define (and=> value procedure) (and value (procedure value)))
(define (make-hash-table k) (make-vector k '())) (define (make-hash-table k) (make-vector k '()))
(begin-deprecated (begin-deprecated
(define (id x) (define (id x)
(issue-deprecation-warning "`id' is deprecated. Use `identity' instead.") (issue-deprecation-warning "`id' is deprecated. Use `identity' instead.")
(identity x))) (identity x))
(define (-1+ n)
(issue-deprecation-warning "`-1+' is deprecated. Use `1-' instead.")
(1- n))
(define (return-it . args)
(issue-deprecation-warning "`return-it' is deprecated. Use `noop' instead.")
(apply noop args)))
;;; apply-to-args is functionally redunant with apply and, worse, ;;; apply-to-args is functionally redundant with apply and, worse,
;;; is less general than apply since it only takes two arguments. ;;; is less general than apply since it only takes two arguments.
;;; ;;;
;;; On the other hand, apply-to-args is a syntacticly convenient way to ;;; On the other hand, apply-to-args is a syntacticly convenient way to
@ -145,18 +149,13 @@
(if (even? k) acc (proc acc x)) (if (even? k) acc (proc acc x))
proc)))) proc))))
(define string-character-length string-length) (begin-deprecated
(define (string-character-length s)
(issue-deprecation-warning "`string-character-length' is deprecated. Use `string-length' instead.")
(string-length s))
;; A convenience function for combining flag bits. Like logior, but (define (flags . args)
;; handles the cases of 0 and 1 arguments. (issue-deprecation-warning "`flags' is deprecated. Use `logior' instead.")
;; (apply logior args)))
(define (flags . args)
(cond
((null? args) 0)
((null? (cdr args)) (car args))
(else (apply logior args))))
;;; {Symbol Properties} ;;; {Symbol Properties}
@ -178,6 +177,7 @@
(symbol-pset! sym (delq! pair (symbol-pref sym)))))) (symbol-pset! sym (delq! pair (symbol-pref sym))))))
;;; {General Properties} ;;; {General Properties}
;;;
;; This is a more modern interface to properties. It will replace all ;; This is a more modern interface to properties. It will replace all
;; other property-like things eventually. ;; other property-like things eventually.

View file

@ -1,3 +1,10 @@
2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
* deprecation.c: Fixed copyright date.
* deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
DEPRECATION_H to SCM_DEPRECATION_H.
2001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org> 2001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
* guile-doc-snarf.in: Update copyright. * guile-doc-snarf.in: Update copyright.

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1995,1996,1998,1999,2000,2001 Free Software Foundation, Inc. /* Copyright (C) 2001 Free Software Foundation, Inc.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,7 +1,7 @@
/* classes: h_files */ /* classes: h_files */
#ifndef DEPRECATION_H #ifndef SCM_DEPRECATION_H
#define DEPRECATION_H #define SCM_DEPRECATION_H
/* Copyright (C) 2001 Free Software Foundation, Inc. /* Copyright (C) 2001 Free Software Foundation, Inc.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -58,7 +58,7 @@ SCM scm_include_deprecated_features (void);
void scm_init_deprecation (void); void scm_init_deprecation (void);
#endif /* DEPRECATION_H */ #endif /* SCM_DEPRECATION_H */
/* /*
Local Variables: Local Variables: