changeset 3546:6dfdded73a7e

[project @ 2000-02-02 22:45:39 by jwe]
author jwe
date Wed, 02 Feb 2000 22:45:43 +0000
parents 673745c96480
children 975398bed659
files src/ChangeLog src/Makefile.in src/oct-fstrm.cc src/oct-fstrm.h src/oct-iostrm.cc src/oct-iostrm.h src/oct-stdstrm.cc src/oct-stdstrm.h src/oct-stream.cc src/oct-stream.h src/oct-strstrm.cc src/oct-strstrm.h src/ov.cc src/pt-idx.cc src/sighandlers.cc src/sighandlers.h
diffstat 16 files changed, 32 insertions(+), 136 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Feb 02 21:15:36 2000 +0000
+++ b/src/ChangeLog	Wed Feb 02 22:45:43 2000 +0000
@@ -1,5 +1,13 @@
 2000-02-02  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
+	* pt-idx.cc (tree_index_expression::tree_index_expression):
+	Delete default arg values.
+
+	* siglist.h, siglist.c: New files.
+	* Makefile.in: Add them to the appropriate lists.
+	* siglist.c (sys_siglist): Move definition here from sighandlers.cc.
+	* siglist.h (sys_siglist): Move declaration here from sighandlers.h.
+
 	* ov.h, ov-bool.h, ov-bool-mat.h (bool_matrix_value):
 	Delete unnecessary arg.
 
--- a/src/Makefile.in	Wed Feb 02 21:15:36 2000 +0000
+++ b/src/Makefile.in	Wed Feb 02 22:45:43 2000 +0000
@@ -84,8 +84,8 @@
 	oct-fstrm.h oct-hist.h oct-iostrm.h oct-map.h oct-obj.h \
 	oct-prcstrm.h oct-procbuf.h oct-stdstrm.h oct-stream.h \
 	oct-strstrm.h oct-lvalue.h oct.h ops.h pager.h parse.h \
-	pr-output.h procstream.h sighandlers.h symtab.h sysdep.h \
-	token.h toplev.h unwind-prot.h utils.h \
+	pr-output.h procstream.h sighandlers.h siglist.h symtab.h \
+	sysdep.h token.h toplev.h unwind-prot.h utils.h \
 	variables.h version.h xdiv.h xpow.h $(OV_INCLUDES) $(PT_INCLUDES)
 
 TI_XSRC := Array-oc.cc Array-os.cc Array-sym.cc Array-tc.cc Map-fnc.cc \
@@ -126,10 +126,12 @@
 	matherr.c oct-fstrm.cc oct-hist.cc oct-iostrm.cc oct-map.cc \
 	oct-obj.cc oct-prcstrm.cc oct-procbuf.cc oct-stdstrm.cc \
 	oct-stream.cc oct-strstrm.cc oct-lvalue.cc pager.cc parse.y \
-	pr-output.cc procstream.cc sighandlers.cc strcasecmp.c \
-	strncase.c strfns.cc symtab.cc syscalls.cc sysdep.cc \
-	system.c token.cc toplev.cc unwind-prot.cc utils.cc \
-	variables.cc xdiv.cc xpow.cc $(OV_SRC) $(PT_SRC)
+	pr-output.cc procstream.cc sighandlers.cc siglist.c \
+	strcasecmp.c strncase.c strfns.cc symtab.cc syscalls.cc \
+	sysdep.cc system.c token.cc toplev.cc unwind-prot.cc \
+	utils.cc variables.cc xdiv.cc xpow.cc \
+	$(OV_SRC) \
+	$(PT_SRC)
 
 SOURCES := $(DIST_SRC) $(OP_SRC) $(TI_SRC)
 
--- a/src/oct-fstrm.cc	Wed Feb 02 21:15:36 2000 +0000
+++ b/src/oct-fstrm.cc	Wed Feb 02 22:45:43 2000 +0000
@@ -59,7 +59,7 @@
 // Position a stream at OFFSET relative to ORIGIN.
 
 int
-octave_fstream::seek (streamoff offset, std::ios::seek_dir origin)
+octave_fstream::seek (std::streamoff offset, std::ios::seek_dir origin)
 {
   int retval = -1;
 
--- a/src/oct-fstrm.h	Wed Feb 02 21:15:36 2000 +0000
+++ b/src/oct-fstrm.h	Wed Feb 02 22:45:43 2000 +0000
@@ -44,7 +44,7 @@
 
   // Position a stream at OFFSET relative to ORIGIN.
 
-  int seek (streamoff offset, std::ios::seek_dir origin);
+  int seek (std::streamoff offset, std::ios::seek_dir origin);
 
   // Return current stream position.
 
--- a/src/oct-iostrm.cc	Wed Feb 02 21:15:36 2000 +0000
+++ b/src/oct-iostrm.cc	Wed Feb 02 22:45:43 2000 +0000
@@ -30,7 +30,7 @@
 // Position a stream at OFFSET relative to ORIGIN.
 
 int
-octave_base_iostream::seek (streamoff, std::ios::seek_dir)
+octave_base_iostream::seek (std::streamoff, std::ios::seek_dir)
 {
   invalid_operation ();
   return -1;
--- a/src/oct-iostrm.h	Wed Feb 02 21:15:36 2000 +0000
+++ b/src/oct-iostrm.h	Wed Feb 02 22:45:43 2000 +0000
@@ -40,7 +40,7 @@
 
   // Position a stream at OFFSET relative to ORIGIN.
 
-  int seek (streamoff offset, std::ios::seek_dir origin);
+  int seek (std::streamoff offset, std::ios::seek_dir origin);
 
   // Return current stream position.
 
--- a/src/oct-stdstrm.cc	Wed Feb 02 21:15:36 2000 +0000
+++ b/src/oct-stdstrm.cc	Wed Feb 02 22:45:43 2000 +0000
@@ -40,7 +40,7 @@
 // Position a stream at OFFSET relative to ORIGIN.
 
 int
-octave_base_stdiostream::seek (streamoff offset, std::ios::seek_dir origin)
+octave_base_stdiostream::seek (std::streamoff offset, std::ios::seek_dir origin)
 {
   int retval = -1;
 
--- a/src/oct-stdstrm.h	Wed Feb 02 21:15:36 2000 +0000
+++ b/src/oct-stdstrm.h	Wed Feb 02 22:45:43 2000 +0000
@@ -40,7 +40,7 @@
 
   // Position a stream at OFFSET relative to ORIGIN.
 
-  int seek (streamoff offset, std::ios::seek_dir origin);
+  int seek (std::streamoff offset, std::ios::seek_dir origin);
 
   // Return current stream position.
 
--- a/src/oct-stream.cc	Wed Feb 02 21:15:36 2000 +0000
+++ b/src/oct-stream.cc	Wed Feb 02 22:45:43 2000 +0000
@@ -2509,7 +2509,7 @@
 }
 
 int
-octave_stream::seek (streamoff offset, std::ios::seek_dir origin)
+octave_stream::seek (std::streamoff offset, std::ios::seek_dir origin)
 {
   int retval = -1;
 
--- a/src/oct-stream.h	Wed Feb 02 21:15:36 2000 +0000
+++ b/src/oct-stream.h	Wed Feb 02 22:45:43 2000 +0000
@@ -239,7 +239,7 @@
 
   // Position a stream at OFFSET relative to ORIGIN.
 
-  virtual int seek (streamoff offset, std::ios::seek_dir origin) = 0;
+  virtual int seek (std::streamoff offset, std::ios::seek_dir origin) = 0;
 
   // Return current stream position.
 
@@ -398,7 +398,7 @@
   std::string gets (int max_len, bool& err);
   std::string gets (const octave_value& max_len, bool& err);
 
-  int seek (streamoff offset, std::ios::seek_dir origin);
+  int seek (std::streamoff offset, std::ios::seek_dir origin);
   int seek (const octave_value& offset, const octave_value& origin);
 
   long tell (void) const;
--- a/src/oct-strstrm.cc	Wed Feb 02 21:15:36 2000 +0000
+++ b/src/oct-strstrm.cc	Wed Feb 02 22:45:43 2000 +0000
@@ -29,7 +29,7 @@
 // Position a stream at OFFSET relative to ORIGIN.
 
 int
-octave_base_strstream::seek (streamoff offset, std::ios::seek_dir origin)
+octave_base_strstream::seek (std::streamoff offset, std::ios::seek_dir origin)
 {
   int retval = -1;
 
--- a/src/oct-strstrm.h	Wed Feb 02 21:15:36 2000 +0000
+++ b/src/oct-strstrm.h	Wed Feb 02 22:45:43 2000 +0000
@@ -40,7 +40,7 @@
 
   // Position a stream at OFFSET relative to ORIGIN.
 
-  int seek (streamoff offset, std::ios::seek_dir origin);
+  int seek (std::streamoff offset, std::ios::seek_dir origin);
 
   // Return current stream position.
 
--- a/src/ov.cc	Wed Feb 02 21:15:36 2000 +0000
+++ b/src/ov.cc	Wed Feb 02 22:45:43 2000 +0000
@@ -532,6 +532,7 @@
 octave_value::clone (void)
 {
   panic_impossible ();
+  return 0;
 }
 
 void
--- a/src/pt-idx.cc	Wed Feb 02 21:15:36 2000 +0000
+++ b/src/pt-idx.cc	Wed Feb 02 22:45:43 2000 +0000
@@ -38,9 +38,9 @@
 
 // Index expressions.
 
-tree_index_expression::tree_index_expression (tree_expression *e = 0,
-					      tree_argument_list *lst = 0,
-					      int l = -1, int c = -1)
+tree_index_expression::tree_index_expression (tree_expression *e,
+					      tree_argument_list *lst,
+					      int l, int c)
   : tree_expression (l, c), expr (e), list (lst),
     arg_nm (lst ? lst->get_arg_names () : string_vector ()) { }
 
--- a/src/sighandlers.cc	Wed Feb 02 21:15:36 2000 +0000
+++ b/src/sighandlers.cc	Wed Feb 02 22:45:43 2000 +0000
@@ -507,116 +507,6 @@
 #endif
 }
 
-#ifndef HAVE_SYS_SIGLIST
-char *sys_siglist[NSIG + 1] =
-{
-#ifdef AIX
-/* AIX has changed the signals a bit */
-  "bogus signal",			/* 0 */
-  "hangup",				/* 1  SIGHUP */
-  "interrupt",				/* 2  SIGINT */
-  "quit",				/* 3  SIGQUIT */
-  "illegal instruction",		/* 4  SIGILL */
-  "trace trap",				/* 5  SIGTRAP */
-  "IOT instruction",			/* 6  SIGIOT */
-  "crash likely",			/* 7  SIGDANGER */
-  "floating point exception",		/* 8  SIGFPE */
-  "kill",				/* 9  SIGKILL */
-  "bus error",				/* 10 SIGBUS */
-  "segmentation violation",		/* 11 SIGSEGV */
-  "bad argument to system call",	/* 12 SIGSYS */
-  "write on a pipe with no one to read it", /* 13 SIGPIPE */
-  "alarm clock",			/* 14 SIGALRM */
-  "software termination signum",	/* 15 SIGTERM */
-  "user defined signal 1",		/* 16 SIGUSR1 */
-  "user defined signal 2",		/* 17 SIGUSR2 */
-  "death of a child",			/* 18 SIGCLD */
-  "power-fail restart",			/* 19 SIGPWR */
-  "bogus signal",			/* 20 */
-  "bogus signal",			/* 21 */
-  "bogus signal",			/* 22 */
-  "bogus signal",			/* 23 */
-  "bogus signal",			/* 24 */
-  "LAN I/O interrupt",			/* 25 SIGAIO */
-  "PTY I/O interrupt",			/* 26 SIGPTY */
-  "I/O intervention required",		/* 27 SIGIOINT */
-  "HFT grant",				/* 28 SIGGRANT */
-  "HFT retract",			/* 29 SIGRETRACT */
-  "HFT sound done",			/* 30 SIGSOUND */
-  "HFT input ready",			/* 31 SIGMSG */
-#else /* not AIX */
-#ifdef __EMX__
-  "bogus signal #0",                    /* 0 */
-  "hangup",                             /* 1  SIGHUP */
-  "interrupt (Ctrl-C)",                 /* 2  SIGINT (Ctrl-C) */
-  "quit",                               /* 3  SIGQUIT */
-  "illegal instruction",                /* 4  SIGILL */
-  "single step",                        /* 5  SIGTRAP */
-  "abort",                              /* 6  SIGABRT */
-  "EMT instruction",                    /* 7  SIGEMT */
-  "floating point exception",           /* 8  SIGFPE */
-  "kill",                               /* 9  SIGKILL */
-  "bus error",                          /* 10 SIGBUS */
-  "segmentation violation",             /* 11 SIGSEGV */
-  "bad argument to system call",        /* 12 SIGSYS */
-  "broken pipe",                        /* 13 SIGPIPE */
-  "alarm clock",                        /* 14 SIGALRM */
-  "software termination signum",        /* 15 SIGTERM */
-  "user defined signal 1",              /* 16 SIGUSR1 */
-  "user defined signal 2",              /* 17 SIGUSR2 */
-  "death of a child",                   /* 18 SIGCHLD */
-  "bogus signal #20",                   /* 19 */
-  "bogus signal #21",                   /* 20 */
-  "break (Ctrl-Break)",                 /* 21 SIGBREAK */
-#else /* not __EMX__ */
-  "bogus signal",			/* 0 */
-  "hangup",				/* 1  SIGHUP */
-  "interrupt",				/* 2  SIGINT */
-  "quit",				/* 3  SIGQUIT */
-  "illegal instruction",		/* 4  SIGILL */
-  "trace trap",				/* 5  SIGTRAP */
-  "IOT instruction",			/* 6  SIGIOT */
-  "EMT instruction",			/* 7  SIGEMT */
-  "floating point exception",		/* 8  SIGFPE */
-  "kill",				/* 9  SIGKILL */
-  "bus error",				/* 10 SIGBUS */
-  "segmentation violation",		/* 11 SIGSEGV */
-  "bad argument to system call",	/* 12 SIGSYS */
-  "write on a pipe with no one to read it", /* 13 SIGPIPE */
-  "alarm clock",			/* 14 SIGALRM */
-  "software termination signum",	/* 15 SIGTERM */
-  "user defined signal 1",		/* 16 SIGUSR1 */
-  "user defined signal 2",		/* 17 SIGUSR2 */
-  "death of a child",			/* 18 SIGCLD */
-  "power-fail restart",			/* 19 SIGPWR */
-#ifdef sun
-  "window size change",			    /* 20 SIGWINCH */
-  "urgent socket condition",		    /* 21 SIGURG */
-  "pollable event occured",		    /* 22 SIGPOLL */
-  "stop (cannot be caught or ignored)", /*  23 SIGSTOP */
-  "user stop requested from tty",	    /* 24 SIGTSTP */
-  "stopped process has been continued",	/* 25 SIGCONT */
-  "background tty read attempted",	    /* 26 SIGTTIN */
-  "background tty write attempted",    /* 27 SIGTTOU */
-  "virtual timer expired",		    /* 28 SIGVTALRM */
-  "profiling timer expired",		    /* 29 SIGPROF */
-  "exceeded cpu limit",			    /* 30 SIGXCPU */
-  "exceeded file size limit",		    /* 31 SIGXFSZ */
-  "process's lwps are blocked",	    /*  32 SIGWAITING */
-  "special signal used by thread library", /* 33 SIGLWP */
-#ifdef SIGFREEZE
-  "Special Signal Used By CPR",	    /* 34 SIGFREEZE */
-#endif
-#ifdef SIGTHAW
-  "Special Signal Used By CPR",	    /* 35 SIGTHAW */
-#endif
-#endif /* sun */
-#endif /* __EMX__ */
-#endif /* AIX */
-  0
-  };
-#endif
-
 octave_child_list *octave_child_list::instance = 0;
 
 bool
--- a/src/sighandlers.h	Wed Feb 02 21:15:36 2000 +0000
+++ b/src/sighandlers.h	Wed Feb 02 22:45:43 2000 +0000
@@ -36,6 +36,7 @@
 #include <Array.h>
 
 #include "syswait.h"
+#include "siglist.h"
 
 // Signal handler return type.
 #ifndef RETSIGTYPE
@@ -103,12 +104,6 @@
 
 // extern void ignore_sigchld (void);
 
-// This is taken directly from Emacs 19:
-
-#ifndef SYS_SIGLIST_DECLARED
-extern char *sys_siglist[];
-#endif
-
 // Maybe this should be in a separate file?
 
 class