2203
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
2203
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
20 |
|
21 */ |
|
22 |
|
23 #ifdef HAVE_CONFIG_H |
|
24 #include <config.h> |
|
25 #endif |
|
26 |
|
27 #include <cstdlib> |
|
28 |
3503
|
29 #include <iostream> |
2203
|
30 #include <string> |
|
31 |
|
32 #ifdef HAVE_UNISTD_H |
2442
|
33 #ifdef HAVE_SYS_TYPES_H |
2203
|
34 #include <sys/types.h> |
2442
|
35 #endif |
2203
|
36 #include <unistd.h> |
|
37 #endif |
|
38 |
2926
|
39 #include "oct-env.h" |
4217
|
40 #include "file-stat.h" |
3174
|
41 #include "pathsearch.h" |
4217
|
42 #include "str-vec.h" |
2926
|
43 |
2492
|
44 #include <defaults.h> |
2203
|
45 #include "defun.h" |
|
46 #include "error.h" |
3040
|
47 #include "file-ops.h" |
2203
|
48 #include "gripes.h" |
|
49 #include "help.h" |
3185
|
50 #include "oct-obj.h" |
2390
|
51 #include "ov.h" |
4217
|
52 #include "parse.h" |
2203
|
53 #include "toplev.h" |
4217
|
54 #include "unwind-prot.h" |
2203
|
55 #include "variables.h" |
2492
|
56 #include <version.h> |
2203
|
57 |
3523
|
58 std::string Voctave_home; |
2203
|
59 |
3523
|
60 std::string Vbin_dir; |
|
61 std::string Vinfo_dir; |
|
62 std::string Vdata_dir; |
|
63 std::string Vlibexec_dir; |
|
64 std::string Varch_lib_dir; |
|
65 std::string Vlocal_arch_lib_dir; |
3597
|
66 std::string Vlocal_ver_arch_lib_dir; |
3523
|
67 std::string Vfcn_file_dir; |
2203
|
68 |
|
69 // The path that will be searched for programs that we execute. |
|
70 // (--exec-path path) |
3523
|
71 std::string Vexec_path; |
2203
|
72 |
|
73 // Load path specified on command line. |
|
74 // (--path path; -p path) |
3523
|
75 static std::string Vload_path; |
2203
|
76 |
3192
|
77 // The default load path with OCTAVE_HOME appropriately substituted. |
3523
|
78 static std::string Vdefault_load_path; |
3192
|
79 |
3174
|
80 // And the cached directory path corresponding to Vload_path. |
|
81 dir_path Vload_path_dir_path; |
|
82 |
2203
|
83 // Name of the editor to be invoked by the edit_history command. |
3523
|
84 std::string Veditor; |
2203
|
85 |
3523
|
86 std::string Vimagepath; |
2203
|
87 |
3523
|
88 std::string Vlocal_site_defaults_file; |
|
89 std::string Vsite_defaults_file; |
2203
|
90 |
4217
|
91 // Each element of A and B should be directory names. For each |
|
92 // element of A not in the list B, execute SCRIPT_FILE in that |
|
93 // directory if it exists. |
|
94 |
|
95 static void |
|
96 maybe_add_or_del_packages (const string_vector& a, |
|
97 const string_vector& b, |
|
98 const std::string script_file) |
|
99 { |
|
100 if (! octave_interpreter_ready) |
|
101 return; |
|
102 |
|
103 unwind_protect::begin_frame ("maybe_add_or_del_packages"); |
|
104 |
|
105 unwind_protect_bool (input_from_startup_file); |
|
106 |
|
107 input_from_startup_file = true; |
|
108 |
|
109 int a_len = a.length (); |
|
110 int b_len = b.length (); |
|
111 |
|
112 for (int i = 0; i < a_len; i++) |
|
113 { |
|
114 std::string a_dir = a[i]; |
|
115 |
|
116 bool found = false; |
|
117 |
|
118 for (int j = 0; j < b_len; j++) |
|
119 { |
|
120 if (b[j] == a_dir) |
|
121 { |
|
122 found = true; |
|
123 break; |
|
124 } |
|
125 } |
|
126 |
|
127 if (! found) |
|
128 { |
|
129 std::string file = a_dir + file_ops::dir_sep_str + script_file; |
|
130 |
|
131 file_stat fs = file_stat (file); |
|
132 |
|
133 if (fs.exists ()) |
|
134 parse_and_execute (file); |
|
135 |
|
136 if (error_state) |
|
137 return; |
|
138 } |
|
139 } |
|
140 |
|
141 unwind_protect::run_frame ("maybe_add_or_del_packages"); |
|
142 } |
|
143 |
|
144 static void |
|
145 update_load_path_dir_path (void) |
|
146 { |
|
147 string_vector old_dirs = Vload_path_dir_path.all_directories (); |
|
148 |
|
149 Vload_path_dir_path = dir_path (Vload_path, Vdefault_load_path); |
|
150 |
|
151 string_vector new_dirs = Vload_path_dir_path.all_directories (); |
|
152 |
|
153 maybe_add_or_del_packages (old_dirs, new_dirs, "PKG_DEL"); |
|
154 |
|
155 if (! error_state) |
|
156 maybe_add_or_del_packages (new_dirs, old_dirs, "PKG_ADD"); |
|
157 } |
|
158 |
|
159 void |
|
160 execute_default_pkg_add_files (void) |
|
161 { |
|
162 string_vector old_dirs; |
|
163 string_vector new_dirs = Vload_path_dir_path.all_directories (); |
|
164 |
|
165 maybe_add_or_del_packages (new_dirs, old_dirs, "PKG_ADD"); |
|
166 } |
|
167 |
3535
|
168 static std::string |
3523
|
169 subst_octave_home (const std::string& s) |
2203
|
170 { |
3523
|
171 std::string retval; |
2203
|
172 |
3523
|
173 std::string prefix = OCTAVE_PREFIX; |
2203
|
174 |
|
175 retval = s; |
|
176 |
|
177 if (Voctave_home != prefix) |
|
178 { |
|
179 int len = prefix.length (); |
|
180 size_t start = 0; |
2522
|
181 while ((start = retval.find (prefix, start)) != NPOS) |
2203
|
182 { |
|
183 retval.replace (start, len, Voctave_home); |
2522
|
184 start += len; |
2203
|
185 } |
|
186 } |
|
187 |
|
188 return retval; |
|
189 } |
|
190 |
|
191 static void |
|
192 set_octave_home (void) |
|
193 { |
3523
|
194 std::string oh = octave_env::getenv ("OCTAVE_HOME"); |
2203
|
195 |
3523
|
196 Voctave_home = oh.empty () ? std::string (OCTAVE_PREFIX) : oh; |
2203
|
197 } |
|
198 |
|
199 static void |
|
200 set_default_info_dir (void) |
|
201 { |
|
202 Vinfo_dir = subst_octave_home (OCTAVE_INFODIR); |
|
203 } |
|
204 |
|
205 static void |
3141
|
206 set_default_data_dir (void) |
|
207 { |
|
208 Vdata_dir = subst_octave_home (OCTAVE_DATADIR); |
|
209 } |
|
210 |
|
211 static void |
|
212 set_default_libexec_dir (void) |
|
213 { |
|
214 Vlibexec_dir = subst_octave_home (OCTAVE_LIBEXECDIR); |
|
215 } |
|
216 |
|
217 static void |
2203
|
218 set_default_arch_lib_dir (void) |
|
219 { |
|
220 Varch_lib_dir = subst_octave_home (OCTAVE_ARCHLIBDIR); |
|
221 } |
|
222 |
|
223 static void |
2439
|
224 set_default_local_arch_lib_dir (void) |
|
225 { |
|
226 Vlocal_arch_lib_dir = subst_octave_home (OCTAVE_LOCALARCHLIBDIR); |
|
227 } |
|
228 |
|
229 static void |
3597
|
230 set_default_local_ver_arch_lib_dir (void) |
|
231 { |
|
232 Vlocal_ver_arch_lib_dir = subst_octave_home (OCTAVE_LOCALVERARCHLIBDIR); |
|
233 } |
|
234 |
|
235 static void |
2203
|
236 set_default_fcn_file_dir (void) |
|
237 { |
|
238 Vfcn_file_dir = subst_octave_home (OCTAVE_FCNFILEDIR); |
|
239 } |
|
240 |
|
241 static void |
|
242 set_default_bin_dir (void) |
|
243 { |
|
244 Vbin_dir = subst_octave_home (OCTAVE_BINDIR); |
|
245 } |
|
246 |
|
247 static void |
|
248 set_default_exec_path (void) |
|
249 { |
3523
|
250 std::string octave_exec_path = octave_env::getenv ("OCTAVE_EXEC_PATH"); |
2203
|
251 |
2926
|
252 if (octave_exec_path.empty ()) |
2203
|
253 { |
3523
|
254 std::string shell_path = octave_env::getenv ("PATH"); |
2203
|
255 |
2926
|
256 if (! shell_path.empty ()) |
2203
|
257 { |
3523
|
258 Vexec_path = std::string (":"); |
2203
|
259 Vexec_path.append (shell_path); |
|
260 } |
|
261 } |
2926
|
262 else |
3523
|
263 Vexec_path = std::string (octave_exec_path); |
2203
|
264 } |
|
265 |
|
266 static void |
|
267 set_default_path (void) |
|
268 { |
3192
|
269 Vdefault_load_path = subst_octave_home (OCTAVE_FCNFILEPATH); |
2203
|
270 |
3523
|
271 std::string oct_path = octave_env::getenv ("OCTAVE_PATH"); |
2203
|
272 |
3523
|
273 Vload_path = oct_path.empty () ? std::string (":") : oct_path; |
3174
|
274 |
4217
|
275 update_load_path_dir_path (); |
2203
|
276 } |
|
277 |
|
278 static void |
|
279 set_default_info_file (void) |
|
280 { |
3523
|
281 std::string std_info_file = subst_octave_home (OCTAVE_INFOFILE); |
2512
|
282 |
3523
|
283 std::string oct_info_file = octave_env::getenv ("OCTAVE_INFO_FILE"); |
2203
|
284 |
2926
|
285 Vinfo_file = oct_info_file.empty () ? std_info_file : oct_info_file; |
2203
|
286 } |
|
287 |
|
288 static void |
|
289 set_default_info_prog (void) |
|
290 { |
3523
|
291 std::string oct_info_prog = octave_env::getenv ("OCTAVE_INFO_PROGRAM"); |
2203
|
292 |
2926
|
293 if (oct_info_prog.empty ()) |
3141
|
294 Vinfo_prog = "info"; |
2926
|
295 else |
3523
|
296 Vinfo_prog = std::string (oct_info_prog); |
2203
|
297 } |
|
298 |
|
299 static void |
|
300 set_default_editor (void) |
|
301 { |
2993
|
302 Veditor = "emacs"; |
2203
|
303 |
3523
|
304 std::string env_editor = octave_env::getenv ("EDITOR"); |
2203
|
305 |
2926
|
306 if (! env_editor.empty ()) |
|
307 Veditor = env_editor; |
2203
|
308 } |
|
309 |
|
310 static void |
|
311 set_local_site_defaults_file (void) |
|
312 { |
|
313 Vlocal_site_defaults_file = subst_octave_home (OCTAVE_LOCALSTARTUPFILEDIR); |
|
314 Vlocal_site_defaults_file.append ("/octaverc"); |
|
315 } |
|
316 |
|
317 static void |
|
318 set_site_defaults_file (void) |
|
319 { |
|
320 Vsite_defaults_file = subst_octave_home (OCTAVE_STARTUPFILEDIR); |
|
321 Vsite_defaults_file.append ("/octaverc"); |
|
322 } |
|
323 |
3534
|
324 std::string |
3523
|
325 maybe_add_default_load_path (const std::string& pathstring) |
2203
|
326 { |
3523
|
327 std::string retval; |
2203
|
328 |
|
329 if (! pathstring.empty ()) |
|
330 { |
|
331 if (pathstring[0] == SEPCHAR) |
|
332 { |
3192
|
333 retval = Vdefault_load_path; |
2203
|
334 retval.append (pathstring); |
|
335 } |
|
336 else |
|
337 retval = pathstring; |
|
338 |
|
339 if (pathstring[pathstring.length () - 1] == SEPCHAR) |
3192
|
340 retval.append (Vdefault_load_path); |
|
341 |
|
342 size_t pos = 0; |
|
343 do |
|
344 { |
|
345 pos = retval.find ("::"); |
|
346 |
|
347 if (pos != NPOS) |
|
348 retval.insert (pos+1, Vdefault_load_path); |
|
349 } |
|
350 while (pos != NPOS); |
2203
|
351 } |
|
352 |
|
353 return retval; |
|
354 } |
|
355 |
|
356 void |
|
357 install_defaults (void) |
|
358 { |
|
359 // OCTAVE_HOME must be set first! |
|
360 |
|
361 set_octave_home (); |
|
362 |
|
363 set_default_info_dir (); |
|
364 |
3141
|
365 set_default_data_dir (); |
|
366 |
|
367 set_default_libexec_dir (); |
|
368 |
2203
|
369 set_default_arch_lib_dir (); |
|
370 |
2439
|
371 set_default_local_arch_lib_dir (); |
|
372 |
3597
|
373 set_default_local_ver_arch_lib_dir (); |
|
374 |
2203
|
375 set_default_fcn_file_dir (); |
|
376 |
|
377 set_default_bin_dir (); |
|
378 |
|
379 set_default_exec_path (); |
|
380 |
|
381 set_default_path (); |
|
382 |
|
383 set_default_info_file (); |
|
384 |
|
385 set_default_info_prog (); |
|
386 |
|
387 set_default_editor (); |
|
388 |
|
389 set_local_site_defaults_file (); |
|
390 |
|
391 set_site_defaults_file (); |
|
392 } |
|
393 |
|
394 static int |
|
395 editor (void) |
|
396 { |
|
397 int status = 0; |
|
398 |
3523
|
399 std::string s = builtin_string_variable ("EDITOR"); |
2203
|
400 |
|
401 if (s.empty ()) |
|
402 { |
|
403 gripe_invalid_value_specified ("EDITOR"); |
|
404 status = -1; |
|
405 } |
|
406 else |
|
407 Veditor = s; |
|
408 |
|
409 return status; |
|
410 } |
|
411 |
|
412 static int |
|
413 exec_path (void) |
|
414 { |
|
415 int status = 0; |
|
416 |
3523
|
417 std::string s = builtin_string_variable ("EXEC_PATH"); |
2439
|
418 |
|
419 if (s.empty ()) |
2203
|
420 { |
|
421 gripe_invalid_value_specified ("EXEC_PATH"); |
|
422 status = -1; |
|
423 } |
|
424 else |
|
425 { |
2439
|
426 Vexec_path = s; |
|
427 |
3597
|
428 std::string std_path |
|
429 = Vlocal_ver_arch_lib_dir + std::string (SEPCHAR_STR) |
|
430 + Vlocal_arch_lib_dir + std::string (SEPCHAR_STR) |
|
431 + Varch_lib_dir + std::string (SEPCHAR_STR) |
|
432 + Vbin_dir; |
2439
|
433 |
3523
|
434 std::string path; |
2203
|
435 |
|
436 int eplen = Vexec_path.length (); |
|
437 |
|
438 if (eplen > 0) |
|
439 { |
2926
|
440 bool prepend = (Vexec_path[0] == ':'); |
|
441 bool append = (eplen > 1 && Vexec_path[eplen-1] == ':'); |
2203
|
442 |
|
443 if (prepend) |
|
444 { |
2926
|
445 path = std_path + Vexec_path; |
|
446 |
2203
|
447 if (append) |
2926
|
448 path.append (std_path); |
2203
|
449 } |
|
450 else |
|
451 { |
2926
|
452 path = Vexec_path; |
|
453 |
2203
|
454 if (append) |
2926
|
455 path.append (std_path); |
2203
|
456 } |
|
457 } |
|
458 else |
2926
|
459 path = std_path; |
2203
|
460 |
2926
|
461 octave_env::putenv ("PATH", path); |
2203
|
462 } |
|
463 |
|
464 return status; |
|
465 } |
|
466 |
|
467 static int |
|
468 imagepath (void) |
|
469 { |
|
470 int status = 0; |
|
471 |
3523
|
472 std::string s = builtin_string_variable ("IMAGEPATH"); |
2203
|
473 |
|
474 if (s.empty ()) |
|
475 { |
|
476 gripe_invalid_value_specified ("IMAGEPATH"); |
|
477 status = -1; |
|
478 } |
|
479 else |
|
480 Vimagepath = s; |
|
481 |
|
482 return status; |
|
483 } |
|
484 |
|
485 static int |
|
486 loadpath (void) |
|
487 { |
|
488 int status = 0; |
|
489 |
3523
|
490 std::string s = builtin_string_variable ("LOADPATH"); |
2203
|
491 |
|
492 if (s.empty ()) |
|
493 { |
|
494 gripe_invalid_value_specified ("LOADPATH"); |
|
495 status = -1; |
|
496 } |
|
497 else |
3174
|
498 { |
3971
|
499 // I'm not sure whether this causes more problems that it |
|
500 // solves... |
|
501 // if (! (s[0] == ':' || s[s.length () - 1] == ':' |
|
502 // || s.find ("::") != NPOS)) |
|
503 // warning ("LOADPATH will ignore default load path"); |
3967
|
504 |
3195
|
505 Vload_path = s; |
3174
|
506 |
4217
|
507 update_load_path_dir_path (); |
|
508 } |
|
509 |
|
510 return status; |
|
511 } |
|
512 |
|
513 static int |
|
514 default_load_path (void) |
|
515 { |
|
516 int status = 0; |
|
517 |
|
518 std::string s = builtin_string_variable ("DEFAULT_LOADPATH"); |
|
519 |
|
520 if (s.empty ()) |
|
521 { |
|
522 gripe_invalid_value_specified ("DEFAULT_LOADPATH"); |
|
523 status = -1; |
|
524 } |
|
525 else |
|
526 { |
|
527 Vdefault_load_path = s; |
|
528 |
|
529 update_load_path_dir_path (); |
3174
|
530 } |
2203
|
531 |
|
532 return status; |
|
533 } |
|
534 |
|
535 void |
|
536 symbols_of_defaults (void) |
|
537 { |
3258
|
538 DEFVAR (EDITOR, Veditor, editor, |
3368
|
539 "-*- texinfo -*-\n\ |
|
540 @defvr {Built-in Variable} EDITOR\n\ |
|
541 A string naming the editor to use with the @code{edit_history} command.\n\ |
|
542 If the environment variable @code{EDITOR} is set when Octave starts, its\n\ |
|
543 value is used as the default. Otherwise, @code{EDITOR} is set to\n\ |
|
544 @code{\"emacs\"}.\n\ |
|
545 @end defvr"); |
2203
|
546 |
3258
|
547 DEFVAR (EXEC_PATH, Vexec_path, exec_path, |
3301
|
548 "-*- texinfo -*-\n\ |
|
549 @defvr {Built-in Variable} EXEC_PATH\n\ |
|
550 The variable @code{EXEC_PATH} is a colon separated list of directories\n\ |
|
551 to search when executing subprograms. Its initial value is taken from\n\ |
|
552 the environment variable @code{OCTAVE_EXEC_PATH} (if it exists) or\n\ |
|
553 @code{PATH}, but that value can be overridden by the command line\n\ |
|
554 argument @code{--exec-path PATH}, or by setting the value of\n\ |
|
555 @code{EXEC_PATH} in a startup script. If the value of @code{EXEC_PATH}\n\ |
|
556 begins (ends) with a colon, the directories\n\ |
|
557 \n\ |
|
558 @example\n\ |
|
559 @group\n\ |
|
560 @var{octave-home}/libexec/octave/site/exec/@var{arch}\n\ |
|
561 @var{octave-home}/libexec/octave/@var{version}/exec/@var{arch}\n\ |
|
562 @end group\n\ |
|
563 @end example\n\ |
|
564 \n\ |
|
565 @noindent\n\ |
|
566 are prepended (appended) to @code{EXEC_PATH}, where @var{octave-home}\n\ |
|
567 is the top-level directory where all of Octave is installed\n\ |
|
568 (the default value is @file{@value{OCTAVEHOME}}). If you don't specify\n\ |
|
569 a value for @code{EXEC_PATH} explicitly, these special directories are\n\ |
|
570 prepended to your shell path.\n\ |
|
571 @end defvr"); |
2203
|
572 |
3258
|
573 DEFVAR (LOADPATH, Vload_path, loadpath, |
3371
|
574 "-*- texinfo -*-\n\ |
|
575 @defvr {Built-in Variable} LOADPATH\n\ |
|
576 A colon separated list of directories in which to search for function\n\ |
|
577 files. @xref{Functions and Scripts}. The value of @code{LOADPATH}\n\ |
|
578 overrides the environment variable @code{OCTAVE_PATH}. @xref{Installation}.\n\ |
|
579 \n\ |
|
580 @code{LOADPATH} is now handled in the same way as @TeX{} handles\n\ |
|
581 @code{TEXINPUTS}. Leading, trailing, or doubled colons that appear in\n\ |
|
582 @code{LOADPATH} are replaced by the value of @code{DEFAULT_LOADPATH}.\n\ |
|
583 The default value of @code{LOADPATH} is @code{\":\"}, which tells Octave\n\ |
|
584 to search in the directories specified by @code{DEFAULT_LOADPATH}.\n\ |
|
585 \n\ |
|
586 In addition, if any path element ends in @samp{//}, that directory and\n\ |
|
587 all subdirectories it contains are searched recursively for function\n\ |
|
588 files. This can result in a slight delay as Octave caches the lists of\n\ |
|
589 files found in the @code{LOADPATH} the first time Octave searches for a\n\ |
|
590 function. After that, searching is usually much faster because Octave\n\ |
|
591 normally only needs to search its internal cache for files.\n\ |
|
592 \n\ |
|
593 To improve performance of recursive directory searching, it is best for\n\ |
|
594 each directory that is to be searched recursively to contain\n\ |
|
595 @emph{either} additional subdirectories @emph{or} function files, but\n\ |
|
596 not a mixture of both.\n\ |
|
597 \n\ |
3402
|
598 @xref{Organization of Functions}, for a description of the function file\n\ |
3371
|
599 directories that are distributed with Octave.\n\ |
|
600 @end defvr"); |
2203
|
601 |
4217
|
602 DEFVAR (DEFAULT_LOADPATH, Vdefault_load_path, default_load_path, |
3371
|
603 "-*- texinfo -*-\n\ |
|
604 @defvr {Built-in Variable} DEFAULT_LOADPATH\n\ |
|
605 A colon separated list of directories in which to search for function\n\ |
|
606 files by default. The value of this variable is also automatically\n\ |
|
607 substituted for leading, trailing, or doubled colons that appear in the\n\ |
|
608 built-in variable @code{LOADPATH}.\n\ |
|
609 @end defvr"); |
3192
|
610 |
3258
|
611 DEFVAR (IMAGEPATH, OCTAVE_IMAGEPATH, imagepath, |
3373
|
612 "-*- texinfo -*-\n\ |
3532
|
613 @defvr {Built-in Variable} IMAGEPATH\n\ |
3373
|
614 A colon separated list of directories in which to search for image\n\ |
|
615 files.\n\ |
|
616 @end defvr"); |
2203
|
617 |
3141
|
618 DEFCONST (OCTAVE_HOME, Voctave_home, |
3446
|
619 "-*- texinfo -*-\n\ |
|
620 @defvr {Built-in Variable} OCTAVE_HOME\n\ |
|
621 The name of the top-level Octave installation directory.\n\ |
|
622 @end defvr"); |
2831
|
623 |
3141
|
624 DEFCONSTX ("OCTAVE_VERSION", SBV_OCTAVE_VERSION, OCTAVE_VERSION, |
3301
|
625 "-*- texinfo -*-\n\ |
3373
|
626 @defvr {Built-in Variable} OCTAVE_VERSION\n\ |
3301
|
627 The version number of Octave, as a string.\n\ |
|
628 @end defvr"); |
3446
|
629 |
2203
|
630 } |
|
631 |
3185
|
632 DEFUN (rehash, , , |
3446
|
633 "-*- texinfo -*-\n\ |
|
634 @deftypefn {Built-in Function} {} rehash ()\n\ |
|
635 Reinitialize Octave's @code{LOADPATH} directory cache.\n\ |
|
636 @end deftypefn") |
3185
|
637 { |
|
638 octave_value_list retval; |
|
639 |
|
640 Vload_path_dir_path.rehash (); |
|
641 |
|
642 return retval; |
|
643 } |
|
644 |
2203
|
645 /* |
|
646 ;;; Local Variables: *** |
|
647 ;;; mode: C++ *** |
|
648 ;;; End: *** |
|
649 */ |