diff src/sighandlers.cc @ 5780:cbf717bf8150

[project @ 2006-04-27 20:02:30 by jwe]
author jwe
date Thu, 27 Apr 2006 20:03:48 +0000
parents ace8d8d26933
children 1138ced03f14
line wrap: on
line diff
--- a/src/sighandlers.cc	Thu Apr 27 19:30:14 2006 +0000
+++ b/src/sighandlers.cc	Thu Apr 27 20:03:48 2006 +0000
@@ -971,6 +971,26 @@
   return retval;
 }
 
+DEFUN (SIG, args, ,
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} SIG ()\n\
+Return a structure containing Unix signal names and their defined values.\n\
+@end deftypefn")
+{
+  octave_value retval;
+
+  if (args.length () == 0)
+    {
+      static Octave_map m = make_sig_struct ();
+
+      retval = m;
+    }
+  else
+    print_usage ("SIG");
+
+  return retval;
+}
+
 static int
 debug_on_interrupt (void)
 {
@@ -1025,12 +1045,6 @@
 current variables the the file \"octave-core\" if it receives a\n\
 terminate signal.  The default value is 1.\n\
 @end defvr");
-
-  DEFCONST (SIG, make_sig_struct (),
-    "-*- texinfo -*-\n\
-@defvr {Built-in Constant} SIG\n\
-Structure of Unix signal names and their defined values.\n\
-@end defvr");
 }
 
 /*