Hi,
this is a simple patch to remove the deprecated variant of find-files.
As it is now the old variant is always choosen when calling find-files
with just 1 argument.
There is one discrepancy left as we do follow symlinks by default
and the docs say the opposite. Which way is the better behaviour?
I will change either the default or the docs then.
Cheers,
Christian
--
Who can (make) the muddy water (clear)? Let it be still, and it will
gradually become clear. Who can secure the condition of rest? Let
movement go on, and the condition of rest will gradually arise.
-- Lao Tse.
From a03d5bdaebe91f35a5e71ca19aecc2feae958451 Mon Sep 17 00:00:00 2001
From: Christian Kellermann ck...@pestilenz.org
Date: Thu, 22 Sep 2011 09:57:26 +0200
Subject: [PATCH] Remove deprecated find-files variant. Deprecated since 4.6.0.
---
posix-common.scm | 25 +++--
1 files changed, 7 insertions(+), 18 deletions(-)
diff --git a/posix-common.scm b/posix-common.scm
index 4b4e217..827e8a9 100644
--- a/posix-common.scm
+++ b/posix-common.scm
@@ -417,24 +417,13 @@ EOF
((pproc f) (loop rest (action f r)))
(else (loop rest r)) ) ) ) ) ) ) )
-(define (find-files dir . args)
- (cond ((or (null? args) (not (keyword? (car args
-;; old signature - DEPRECATED
-(let-optionals args ((pred (lambda _ #t))
- (action (lambda (x y) (cons x y))) ; we want
`cons' inlined
- (id '())
- (limit #f) )
- (##sys#find-files dir pred action id limit #t #f 'find-files)))
- (else
-(apply
- (lambda (#!key (test (lambda _ #t))
-(action (lambda (x y) (cons x y))) ; s.a.
-(seed '())
-(limit #f)
-(dotfiles #f)
-(follow-symlinks #t))
- (##sys#find-files dir test action seed limit follow-symlinks
dotfiles 'find-files))
- args
+(define (find-files dir #!key (test (lambda _ #t))
+ (action (lambda (x y) (cons x y)))
+ (seed '())
+ (limit #f)
+ (dotfiles #f)
+ (follow-symlinks #t))
+ (##sys#find-files dir test action seed limit follow-symlinks dotfiles
'find-files))
;;; umask
--
1.7.2.5
___
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers