diff src/utils.cc @ 636:fae2bd91c027

[project @ 1994-08-23 18:39:50 by jwe]
author jwe
date Tue, 23 Aug 1994 18:39:50 +0000
parents aecbe369233b
children cf16ec9a2428
line wrap: on
line diff
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -45,7 +45,6 @@
 #include <unistd.h>
 #endif
 #include <sys/param.h>
-#include <setjmp.h>
 #include <string.h>
 #include <limits.h>
 #include <iostream.h>
@@ -54,12 +53,14 @@
 
 #include <Complex.h>
 
-#ifndef HAVE_STRNCASECMP
 extern "C"
 {
+#include <setjmp.h>
+
+#ifndef HAVE_STRNCASECMP
 extern int strncasecmp (const char*, const char*, size_t);
+#endif
 }
-#endif
 
 extern "C"
 {
@@ -514,14 +515,18 @@
 
   if (nr == 0 || nc == 0)
     {
-      is_empty = 0;
-
       int flag = user_pref.propagate_empty_matrices;
 
       if (flag < 0)
-	gripe_empty_arg (name, 0);
-      else if (flag > 0)
-	gripe_empty_arg (name, 1);
+	{
+	  gripe_empty_arg (name, 0);
+	  is_empty = 1;
+	}
+      else if (is_empty > 0)
+	{
+	  gripe_empty_arg (name, 1);
+	  is_empty = -1;
+	}
     }
 
   return is_empty;