delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/02/09/15:25:32

X-Spam-Check-By: sourceware.org
From: "John W. Eaton" <jwe AT bevo DOT che DOT wisc DOT edu>
MIME-Version: 1.0
Message-ID: <17387.42303.91508.260685@segfault.lan>
Date: Thu, 9 Feb 2006 15:25:35 -0500
To: "Larrie Carr" <larrie AT telus DOT net>
Cc: <cygwin AT cygwin DOT com>
Subject: [octave ] LOADPATH recurses only one level of subdirectories
In-Reply-To: <017b01c62daf$7696d140$0201a8c0@homelarrie>
References: <017b01c62daf$7696d140$0201a8c0 AT homelarrie>
X-CAE-MailScanner-Information: Please contact security AT engr DOT wisc DOT edu if this message contains a virus or has been corrupted in delivery.
X-CAE-MailScanner: Found to be clean (benji)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On  9-Feb-2006, Larrie Carr wrote:

| In short, octave-forge is non-functional as it uses multiple subdirectories.

If that's true for everyone, then I'm surprised as I think you are the
first to report it.

| I've been looking through the sources and nothing has sprung up.  Did find a 
| cut-and-paste code error in oct_file_in_path() in utils.cc where the string 
| length is not properly checked.  Look like a cut and paste from 
| fcn_file_in_path().  But this is for a different group.

Probably the code you are looking for is the function do_subdir in
liboctave/kpse.cc.  This file contains a stripped-down version of the
kpathsearch library.  Most modifications were to remove TeX-specific
stuff and to convert it to use std::string instead of plain C strings
which historically leaked memory.  In any case, that function may use
an optimization to decide when to check for subdirectories.  The
optimization looks at the link count of the current directory.  If it
is 2, then the assumption is that the current directory does not
contain any subdirectories.  That seems to work fine for Unixy
systems.  Does that assumption not hold for Cygwin?  If so, then I
think the fix is fairly simple as there is also Windows-specific code
in that function.  Whether the optimization is performed depends on
what is #defined at compile time, so you'll probably have to do some
checking on a Cygwin system to see what is really going on.

| int len = name.length();
| 
| if( len > 0) {
|    if (len >2 && name [ len-4] == '.' && name [len-3] == 'o'
|       && name[len-2] == 'c' && name [len-1] =='t') 

I've fixed this in my sources.

If you find other bugs in Octave, please report them to
bug AT octave DOT org.

Thanks,

jwe

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019