Mercurial > hg > octave-nkf
comparison src/dirfns.cc @ 1355:94697d007075
[project @ 1995-09-05 20:04:15 by jwe]
author | jwe |
---|---|
date | Tue, 05 Sep 1995 20:07:21 +0000 |
parents | e4e4131b1648 |
children | dc9c01f66a19 |
comparison
equal
deleted
inserted
replaced
1354:5b54091471dd | 1355:94697d007075 |
---|---|
42 #include <cstdio> | 42 #include <cstdio> |
43 #include <cstddef> | 43 #include <cstddef> |
44 #include <cstdlib> | 44 #include <cstdlib> |
45 #include <cstring> | 45 #include <cstring> |
46 | 46 |
47 #include <sys/types.h> | |
48 #ifdef HAVE_UNISTD_H | |
49 #include <unistd.h> | |
50 #endif | |
51 #include <strstream.h> | 47 #include <strstream.h> |
52 #include <sys/param.h> | 48 |
53 | 49 #include "defun.h" |
54 // This mess suggested by the autoconf manual. | 50 #include "dirfns.h" |
55 // unistd.h defines _POSIX_VERSION on POSIX.1 systems. | 51 #include "error.h" |
56 #if defined (HAVE_DIRENT_H) || defined (_POSIX_VERSION) | 52 #include "oct-obj.h" |
57 #include <dirent.h> | 53 #include "octave.h" |
58 #define NLENGTH(dirent) (strlen((dirent)->d_name)) | 54 #include "pager.h" |
59 #else | 55 #include "pathlen.h" |
60 #define dirent direct | 56 #include "procstream.h" |
61 #define NLENGTH(dirent) ((dirent)->d_namlen) | |
62 #if defined (HAVE_SYS_NDIR_H) | |
63 #include <sys/ndir.h> | |
64 #endif | |
65 #if defined (HAVE_SYS_DIR_H) | |
66 #include <sys/dir.h> | |
67 #endif | |
68 #if defined (HAVE_NDIR_H) | |
69 #include <ndir.h> | |
70 #endif | |
71 #endif | |
72 | |
73 #include "statdefs.h" | 57 #include "statdefs.h" |
74 #include "procstream.h" | 58 #include "sysdep.h" |
59 #include "sysdir.h" | |
75 #include "tree-const.h" | 60 #include "tree-const.h" |
76 #include "tree-plot.h" | 61 #include "tree-plot.h" |
77 #include "oct-obj.h" | |
78 #include "sysdep.h" | |
79 #include "octave.h" | |
80 #include "dirfns.h" | |
81 #include "pager.h" | |
82 #include "error.h" | |
83 #include "utils.h" | 62 #include "utils.h" |
84 #include "defun.h" | |
85 | 63 |
86 extern "C" | 64 extern "C" |
87 { | 65 { |
88 #include <readline/tilde.h> | 66 #include <readline/tilde.h> |
89 extern char *strerror (int); | 67 extern char *strerror (int); |
90 } | 68 } |
91 | |
92 #ifndef MAXPATHLEN | |
93 #define MAXPATHLEN 1024 | |
94 #endif | |
95 | 69 |
96 // Temp storage for a path. | 70 // Temp storage for a path. |
97 static char tdir[MAXPATHLEN]; | 71 static char tdir[MAXPATHLEN]; |
98 | 72 |
99 // Non-zero means follow symbolic links that point to directories just | 73 // Non-zero means follow symbolic links that point to directories just |