octave-maintainers
[Top][All Lists]
Advanced

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

MSVC compiler support [patch 34]: sepchar and load_path


From: John W. Eaton
Subject: MSVC compiler support [patch 34]: sepchar and load_path
Date: Fri, 27 Oct 2006 20:15:41 -0400

On 17-Oct-2006, Michael Goffioul wrote:

| The sepchar being ';' under MSVC, this produces errors in path handling
| Index: src/load-path.cc
| ===================================================================
| RCS file: /cvs/octave/src/load-path.cc,v
| retrieving revision 1.9
| diff -p -c -r1.9 load-path.cc
| *** src/load-path.cc  31 Aug 2006 02:31:57 -0000      1.9
| --- src/load-path.cc  17 Oct 2006 11:07:42 -0000
| *************** load_path::do_initialize (void)
| *** 375,384 ****
| --- 375,391 ----
|     if (! tpath.empty ())
|       xpath += dir_path::path_sep_str + tpath;
|   
| + #ifndef _MSC_VER
|     if (Vsystem_path != ":")
|       xpath += Vsystem_path;
|   
|     do_set (xpath + ":::", false);
| + #else
| +   if (Vsystem_path != ":")
| +     xpath += Vsystem_path.substr(1);
| + 
| +   do_set (xpath, false);
| + #endif
|   }
|   
|   void

I fixed this by initializing Vsystem_path to dir_path::path_sep_str
and comparing to that instead of ":".  Also, I don't know why ":::"
was appended to xpath here.  It doesn't seem to have any purpose, so I
removed that.

Thanks,

jwe


reply via email to

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