diff src/utils.cc @ 628:aecbe369233b

[project @ 1994-08-19 13:27:51 by jwe]
author jwe
date Fri, 19 Aug 1994 13:37:34 +0000
parents 14b2a186a5c0
children fae2bd91c027
line wrap: on
line diff
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -102,6 +102,7 @@
 #include "variables.h"
 #include "dirfns.h"
 #include "error.h"
+#include "gripes.h"
 #include "pager.h"
 #include "utils.h"
 #include "input.h"
@@ -506,6 +507,26 @@
   return argv;
 }
 
+int
+empty_arg (const char *name, int nr, int nc)
+{
+  int is_empty = 0;
+
+  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);
+    }
+
+  return is_empty;
+}
+
 // Format a list in neat columns.  Mostly stolen from GNU ls.  This
 // should maybe be in utils.cc.