Mercurial > hg > octave-avbm
changeset 367:04d377033730
[project @ 1994-02-16 08:04:52 by jwe]
author | jwe |
---|---|
date | Wed, 16 Feb 1994 08:07:33 +0000 |
parents | 4fbd4bc7f888 |
children | 5c987c27f3d7 |
files | src/file-io.cc src/tree.h.old src/utils.cc |
diffstat | 3 files changed, 29 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/file-io.cc +++ b/src/file-io.cc @@ -91,10 +91,10 @@ file_info::file_info (const file_info& f) { - file_number = f._number; - file_name = strsave (f._name); - file_fptr = f._fptr; - file_mode = strsave (f._mode); + file_number = f.file_number; + file_name = strsave (f.file_name); + file_fptr = f.file_fptr; + file_mode = strsave (f.file_mode); } file_info& @@ -102,7 +102,7 @@ { if (this != & f) { - file_number = f._number; + file_number = f.file_number; delete [] file_name; file_name = strsave (f.file_name); file_fptr = f.file_fptr;
--- a/src/tree.h.old +++ b/src/tree.h.old @@ -245,8 +245,8 @@ int is_system_fcn_file (void) const; int takes_varargs (void) const; - void va_start (void); - tree_constant va_arg (void); + void octave_va_start (void); + tree_constant octave_va_arg (void); void stash_function_name (char *s); char *function_name (void);
--- a/src/utils.cc +++ b/src/utils.cc @@ -55,7 +55,25 @@ #include <iostream.h> #include <strstream.h> #include <fstream.h> + +// This mess suggested by the autoconf manual. +// unistd.h defines _POSIX_VERSION on POSIX.1 systems. +#if defined(DIRENT) || defined(_POSIX_VERSION) #include <dirent.h> +#define NLENGTH(dirent) (strlen((dirent)->d_name)) +#else /* not (DIRENT or _POSIX_VERSION) */ +#define dirent direct +#define NLENGTH(dirent) ((dirent)->d_namlen) +#ifdef SYSNDIR +#include <sys/ndir.h> +#endif /* SYSNDIR */ +#ifdef SYSDIR +#include <sys/dir.h> +#endif /* SYSDIR */ +#ifdef NDIR +#include <ndir.h> +#endif /* NDIR */ +#endif /* not (DIRENT or _POSIX_VERSION) */ #ifndef HAVE_STRCASECMP extern "C" @@ -71,8 +89,6 @@ } #endif -#define NLENGTH(dirent) (strlen((dirent)->d_name)) - extern "C" { #if defined (HAVE_TERMIOS_H) @@ -261,7 +277,9 @@ s.c_lflag &= ~(ICANON|ECHO|ECHOE|ECHOK|ECHONL); s.c_oflag |= (OPOST|ONLCR); +#if ! defined (NeXT) s.c_oflag &= ~(OCRNL|ONOCR|ONLRET); +#endif s.c_cc[VMIN] = 1; s.c_cc[VTIME] = 0; } @@ -294,7 +312,9 @@ s.c_lflag &= ~(ICANON|ECHO|ECHOE|ECHOK|ECHONL); s.c_oflag |= (OPOST|ONLCR); +#if ! defined (NeXT) s.c_oflag &= ~(OCRNL|ONOCR|ONLRET); +#endif s.c_cc[VMIN] = 1; s.c_cc[VTIME] = 0; }