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

BUG REPORT for wmk

Hi Ralf,

There is a bug in the wmk's directory traversal algorithm, read_rcfile.
The problem is that @DIR is never cleared; it just keeps growing as wmk
recurses its way through directories.  The result is that the time spent
in read_rcfile grows quadratically!  Also, it looks like the wmk options
set in path/foo/bar wind up affecting the options used while processing
path/baz/quux, which is probably not what you want.

This patch is against the current WML release (1.7.4):

--- wmk.src.orig	Thu Feb  3 17:04:23 2000
+++ wmk.src	Thu Feb  3 17:09:14 2000
@@ -366,6 +366,7 @@
 #   read .wmkrc files and command-line options
 sub read_rcfile {
+    my (@DIR, $cwd, $dir);
     @opt_A_SAV = @opt_A;
     @opt_F_SAV = @opt_F;
     @opt_x_SAV = @opt_x;
@@ -438,7 +439,7 @@
 #   determine files to act on
 sub determine_files {
-    my ($cwd, $dir, @DIR, @files, @filesA, @filesF, $fileA, $fileF, %files);
+    my (@files, @filesA, @filesF, $fileA, $fileF, %files);
     #   determine files
     @filesA = glob(join(' ', @opt_A_CUR));


  - Craig
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com