comparison src/octave.cc @ 1766:e8e76be43e79

[project @ 1996-01-23 03:33:34 by jwe]
author jwe
date Tue, 23 Jan 1996 03:34:14 +0000
parents 3a9462b655f1
children e6d79e281f7d
comparison
equal deleted inserted replaced
1765:a51354c34bea 1766:e8e76be43e79
53 #include "defaults.h" 53 #include "defaults.h"
54 #include "defun.h" 54 #include "defun.h"
55 #include "dynamic-ld.h" 55 #include "dynamic-ld.h"
56 #include "error.h" 56 #include "error.h"
57 #include "file-io.h" 57 #include "file-io.h"
58 #include "file-ops.h"
58 #include "help.h" 59 #include "help.h"
59 #include "input.h" 60 #include "input.h"
60 #include "lex.h" 61 #include "lex.h"
61 #include "oct-hist.h" 62 #include "oct-hist.h"
62 #include "toplev.h" 63 #include "toplev.h"
63 #include "pager.h" 64 #include "pager.h"
64 #include "parse.h" 65 #include "parse.h"
65 #include "pathsearch.h" 66 #include "pathsearch.h"
66 #include "procstream.h" 67 #include "procstream.h"
67 #include "sighandlers.h" 68 #include "sighandlers.h"
68 #include "statdefs.h"
69 #include "sysdep.h" 69 #include "sysdep.h"
70 #include "pt-const.h" 70 #include "pt-const.h"
71 #include "pt-misc.h" 71 #include "pt-misc.h"
72 #include "pt-plot.h" 72 #include "pt-plot.h"
73 #include "unwind-prot.h" 73 #include "unwind-prot.h"
239 home_rc.append ("/.octaverc"); 239 home_rc.append ("/.octaverc");
240 parse_and_execute (home_rc, 0, verbose); 240 parse_and_execute (home_rc, 0, verbose);
241 241
242 // Names alone are not enough. 242 // Names alone are not enough.
243 243
244 struct stat home_rc_statbuf; 244 file_stat fs_home_rc (home_rc);
245 stat (home_rc.c_str (), &home_rc_statbuf); 245
246 246 if (fs_home_rc)
247 struct stat dot_rc_statbuf; 247 {
248 stat ("./.octaverc", &dot_rc_statbuf); 248 file_stat fs_dot_rc ("./.octaverc");
249 249
250 if (home_rc_statbuf.st_ino == dot_rc_statbuf.st_ino) 250 if (fs_dot_rc && fs_home_rc.ino () == fs_dot_rc.ino ())
251 home_rc_already_executed = 1; 251 home_rc_already_executed = 1;
252 }
252 } 253 }
253 254
254 if (! home_rc_already_executed) 255 if (! home_rc_already_executed)
255 parse_and_execute ("./.octaverc", 0, verbose); 256 parse_and_execute ("./.octaverc", 0, verbose);
256 257