2926
|
1 /* |
|
2 |
7017
|
3 Copyright (C) 1996, 1997, 2000, 2005, 2006, 2007 John W. Eaton |
2926
|
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 |
7016
|
9 Free Software Foundation; either version 3 of the License, or (at your |
|
10 option) any later version. |
2926
|
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 |
7016
|
18 along with Octave; see the file COPYING. If not, see |
|
19 <http://www.gnu.org/licenses/>. |
2926
|
20 |
|
21 */ |
|
22 |
|
23 #if !defined (octave_liboctave_sysdep_h) |
|
24 #define octave_liboctave_sysdep_h 1 |
|
25 |
|
26 #include <string> |
|
27 |
|
28 #include "lo-ieee.h" |
6321
|
29 class string_vector; |
2926
|
30 |
3504
|
31 extern std::string octave_getcwd (void); |
2926
|
32 |
3635
|
33 extern int octave_chdir (const std::string&); |
2926
|
34 |
|
35 #if ! defined (HAVE_GETHOSTNAME) && defined (HAVE_SYS_UTSNAME_H) |
|
36 extern int gethostname (char *, int); |
|
37 #endif |
|
38 |
6321
|
39 #if defined (__WIN32__) && ! defined (__CYGWIN__) |
|
40 extern pid_t octave_popen2 (const std::string&, const string_vector&, |
|
41 bool, int *, std::string&); |
|
42 #endif |
|
43 |
|
44 #if defined (_MSC_VER) && ! defined (HAVE_DIRENT_H) |
6123
|
45 |
|
46 // FIXME -- it would probably be better to adapt the versions of |
|
47 // opendir, readdir, and closedir from Emacs as they appear to be more |
|
48 // complete implementations. We can probably get along without |
|
49 // rewinddir. |
|
50 |
|
51 struct direct |
|
52 { |
|
53 char *d_name; |
|
54 }; |
|
55 |
|
56 typedef struct __DIR DIR; |
|
57 |
|
58 extern DIR* opendir (const char *name); |
|
59 extern void rewinddir (DIR *d); |
|
60 extern void closedir (DIR *d); |
|
61 extern struct direct *readdir (DIR *d); |
|
62 |
|
63 #endif |
|
64 |
2926
|
65 #endif |
|
66 |
|
67 /* |
|
68 ;;; Local Variables: *** |
|
69 ;;; mode: C++ *** |
|
70 ;;; End: *** |
|
71 */ |