Mercurial > hg > octave-lyh
comparison src/dirfns.cc @ 5832:5e41e06f6a78
[project @ 2006-05-26 21:41:32 by jwe]
author | jwe |
---|---|
date | Fri, 26 May 2006 21:42:22 +0000 |
parents | 080c08b192d8 |
children | 44f24cf66b95 |
comparison
equal
deleted
inserted
replaced
5831:b0d4ff99a0c5 | 5832:5e41e06f6a78 |
---|---|
53 #include "dir-ops.h" | 53 #include "dir-ops.h" |
54 #include "dirfns.h" | 54 #include "dirfns.h" |
55 #include "error.h" | 55 #include "error.h" |
56 #include "gripes.h" | 56 #include "gripes.h" |
57 #include "input.h" | 57 #include "input.h" |
58 #include "load-path.h" | |
58 #include "oct-obj.h" | 59 #include "oct-obj.h" |
59 #include "pager.h" | 60 #include "pager.h" |
60 #include "procstream.h" | 61 #include "procstream.h" |
61 #include "sysdep.h" | 62 #include "sysdep.h" |
62 #include "toplev.h" | 63 #include "toplev.h" |
66 | 67 |
67 // TRUE means we ask for confirmation before recursively removing a | 68 // TRUE means we ask for confirmation before recursively removing a |
68 // directory tree. | 69 // directory tree. |
69 static bool Vconfirm_recursive_rmdir = true; | 70 static bool Vconfirm_recursive_rmdir = true; |
70 | 71 |
71 // FIXME -- changing the plotter directory should be handled | |
72 // by registering a function for octave_env::chdir to call so that | |
73 // this function can be eliminated. | |
74 | |
75 static int | 72 static int |
76 octave_change_to_directory (const std::string& newdir) | 73 octave_change_to_directory (const std::string& newdir) |
77 { | 74 { |
78 int cd_ok = octave_env::chdir (newdir); | 75 int cd_ok = octave_env::chdir (newdir); |
79 | 76 |
80 if (cd_ok) | 77 if (cd_ok) |
81 // FIXME -- this should be handled as a list of functions | 78 { |
82 // to call so users can add their own chdir handlers. | 79 // FIXME -- should this be handled as a list of functions |
83 /* do_external_plotter_cd (newdir) */; | 80 // to call so users can add their own chdir handlers? |
81 | |
82 load_path::update (); | |
83 } | |
84 else | 84 else |
85 { | 85 { |
86 using namespace std; | 86 using namespace std; |
87 | 87 |
88 error ("%s: %s", newdir.c_str (), strerror (errno)); | 88 error ("%s: %s", newdir.c_str (), strerror (errno)); |
679 | 679 |
680 return retval; | 680 return retval; |
681 } | 681 } |
682 | 682 |
683 DEFUN (filesep, args, , | 683 DEFUN (filesep, args, , |
684 "-*- texinfo -*-\n\ | 684 "-*- texinfo -*-\n\ |
685 @detypefn {Built-in Function} {} filesep ()\n\ | 685 @deftypefn {Built-in Function} {} filesep ()\n\ |
686 Return the system-dependent character used to separate directory names.\n\ | 686 Return the system-dependent character used to separate directory names.\n\ |
687 @seealso{pathsep, dir, ls}\n\ | 687 @seealso{pathsep, dir, ls}\n\ |
688 @end deftypefn") | 688 @end deftypefn") |
689 { | 689 { |
690 octave_value retval; | 690 octave_value retval; |