octave-maintainers
[Top][All Lists]
Advanced

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

MSVC patch: default history file


From: michael . goffioul
Subject: MSVC patch: default history file
Date: Thu, 16 Nov 2006 09:32:30 +0100

This patch constructs the default history file in a more system-independent way.
This avoids ending up with a history file like "D:\\/.octave_hist", which is wrong
under MSVC ("D:/.octave_hist" and "D:\\.octave_hist" are OK, but the
successive '\\' and '/' is not)
 
Michael.
 
Index: src/oct-hist.cc
===================================================================
RCS file: /cvs/octave/src/oct-hist.cc,v
retrieving revision 1.86
diff -c -p -r1.86 oct-hist.cc
*** src/oct-hist.cc     6 Nov 2006 17:52:52 -0000       1.86
--- src/oct-hist.cc     16 Nov 2006 08:29:09 -0000
*************** default_history_file (void)
*** 93,99 ****
        if (! home_dir.empty ())
        {
          file = home_dir;
!         file.append ("/.octave_hist");
        }
        else
        file = ".octave_hist";
--- 93,101 ----
        if (! home_dir.empty ())
        {
          file = home_dir;
!         if (! file_ops::is_dir_sep (file[file.length()-1]))
!           file.push_back (file_ops::dir_sep_char);
!         file.append (".octave_hist");
        }
        else
        file = ".octave_hist";


reply via email to

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