about summary refs log tree commit diff
path: root/Src/Modules/zutil.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-03-14 11:17:57 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-03-14 11:17:57 +0000
commitbbf8d8baf0389b4bb20dfbdd48c62bc789e1a5fc (patch)
treee71ba33a5ee047d755bce2e145d8fc656c0baeea /Src/Modules/zutil.c
parent05b1db3387e8c54368e43b5c5169fb7daab25c54 (diff)
downloadzsh-bbf8d8baf0389b4bb20dfbdd48c62bc789e1a5fc.tar.gz
zsh-bbf8d8baf0389b4bb20dfbdd48c62bc789e1a5fc.tar.xz
zsh-bbf8d8baf0389b4bb20dfbdd48c62bc789e1a5fc.zip
zsh-workers/10131
Diffstat (limited to 'Src/Modules/zutil.c')
-rw-r--r--Src/Modules/zutil.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/Src/Modules/zutil.c b/Src/Modules/zutil.c
index f2a3ed34c..525d570a0 100644
--- a/Src/Modules/zutil.c
+++ b/Src/Modules/zutil.c
@@ -213,7 +213,7 @@ bin_zstyle(char *nam, char **args, char *ops, int func)
 
 	if ((oc = args[0][1]) && oc != '-') {
 	    if (args[0][2]) {
-		zerrnam(nam, "invalid argument: %s", args[0], 0);
+		zwarnnam(nam, "invalid argument: %s", args[0], 0);
 		return 1;
 	    }
 	    if (oc == 'L')
@@ -231,14 +231,14 @@ bin_zstyle(char *nam, char **args, char *ops, int func)
 	char *pat;
 
 	if (arrlen(args) < 2) {
-	    zerrnam(nam, "not enough arguments", NULL, 0);
+	    zwarnnam(nam, "not enough arguments", NULL, 0);
 	    return 1;
 	}
 	pat = dupstring(args[0]);
 	tokenize(pat);
 
 	if (!(prog = patcompile(pat, PAT_ZDUP, NULL))) {
-	    zerrnam(nam, "invalid pattern: %s", args[0], 0);
+	    zwarnnam(nam, "invalid pattern: %s", args[0], 0);
 	    return 1;
 	}
 	if (!(s = getstyle(args[1])))
@@ -285,15 +285,15 @@ bin_zstyle(char *nam, char **args, char *ops, int func)
     case 'm': min = 3; max =  3; break;
     case 'g': min = 1; max =  3; break;
     default:
-	zerrnam(nam, "invalid option: %s", args[0], 0);
+	zwarnnam(nam, "invalid option: %s", args[0], 0);
 	return 1;
     }
     n = arrlen(args) - 1;
     if (n < min) {
-	zerrnam(nam, "not enough arguments", NULL, 0);
+	zwarnnam(nam, "not enough arguments", NULL, 0);
 	return 1;
     } else if (max >= 0 && n > max) {
-	zerrnam(nam, "too many arguments", NULL, 0);
+	zwarnnam(nam, "too many arguments", NULL, 0);
 	return 1;
     }
     switch (args[0][1]) {
@@ -511,7 +511,7 @@ bin_zformat(char *nam, char **args, char *ops, int func)
     char opt;
 
     if (args[0][0] != '-' || !(opt = args[0][1]) || args[0][2]) {
-	zerrnam(nam, "invalid argument: %s", args[0], 0);
+	zwarnnam(nam, "invalid argument: %s", args[0], 0);
 	return 1;
     }
     args++;
@@ -528,7 +528,7 @@ bin_zformat(char *nam, char **args, char *ops, int func)
 		if (!ap[0][0] || ap[0][0] == '-' || ap[0][0] == '.' ||
 		    (ap[0][0] >= '0' && ap[0][0] <= '9') ||
 		    ap[0][1] != ':') {
-		    zerrnam(nam, "invalid argument: %s", *ap, 0);
+		    zwarnnam(nam, "invalid argument: %s", *ap, 0);
 		    return 1;
 		}
 		specs[STOUC(ap[0][0])] = ap[0] + 2;
@@ -670,7 +670,7 @@ bin_zformat(char *nam, char **args, char *ops, int func)
 	}
 	break;
     }
-    zerrnam(nam, "invalid option: -%c", 0, opt);
+    zwarnnam(nam, "invalid option: -%c", 0, opt);
     return 1;
 }
 
@@ -1298,7 +1298,7 @@ bin_zparseopts(char *nam, char **args, char *ops, int func)
 		break;
 	    case 'a':
 		if (defarr) {
-		    zerrnam(nam, "default array given more than once", NULL, 0);
+		    zwarnnam(nam, "default array given more than once", NULL, 0);
 		    return 1;
 		}
 		if (o[2])
@@ -1306,7 +1306,7 @@ bin_zparseopts(char *nam, char **args, char *ops, int func)
 		else if (*args)
 		    n = *args++;
 		else {
-		    zerrnam(nam, "missing array name", NULL, 0);
+		    zwarnnam(nam, "missing array name", NULL, 0);
 		    return 1;
 		}
 		defarr = (Zoptarr) zhalloc(sizeof(*defarr));
@@ -1322,7 +1322,7 @@ bin_zparseopts(char *nam, char **args, char *ops, int func)
 		else if (*args)
 		    assoc = *args++;
 		else {
-		    zerrnam(nam, "missing array name", NULL, 0);
+		    zwarnnam(nam, "missing array name", NULL, 0);
 		    return 1;
 		}
 		break;
@@ -1336,7 +1336,7 @@ bin_zparseopts(char *nam, char **args, char *ops, int func)
     }
     while ((o = dupstring(*args++))) {
 	if (!*o) {
-	    zerrnam(nam, "invalid option description: %s", o, 0);
+	    zwarnnam(nam, "invalid option description: %s", o, 0);
 	    return 1;
 	}
 	f = 0;
@@ -1375,10 +1375,10 @@ bin_zparseopts(char *nam, char **args, char *ops, int func)
 		opt_arrs = a;
 	    }
 	} else if (*p) {
-	    zerrnam(nam, "invalid option description: %s", args[-1], 0);
+	    zwarnnam(nam, "invalid option description: %s", args[-1], 0);
 	    return 1;
 	} else if (!(a = defarr) && !assoc) {
-	    zerrnam(nam, "no default array defined: %s", args[-1], 0);
+	    zwarnnam(nam, "no default array defined: %s", args[-1], 0);
 	    return 1;
 	}
 	for (p = n = o; *p; p++) {
@@ -1387,7 +1387,7 @@ bin_zparseopts(char *nam, char **args, char *ops, int func)
 	    *n++ = *p;
 	}
 	if (get_opt_desc(o)) {
-	    zerrnam(nam, "option defined more than once: %s", o, 0);
+	    zwarnnam(nam, "option defined more than once: %s", o, 0);
 	    return 1;
 	}
 	d = (Zoptdesc) zhalloc(sizeof(*d));
@@ -1419,7 +1419,7 @@ bin_zparseopts(char *nam, char **args, char *ops, int func)
 			break;
 		    } else if (!(d->flags & ZOF_OPT)) {
 			if (!pp[1]) {
-			    zerrnam(nam, "missing argument for option: %s",
+			    zwarnnam(nam, "missing argument for option: %s",
 				    d->name, 0);
 			    return 1;
 			}
@@ -1439,7 +1439,7 @@ bin_zparseopts(char *nam, char **args, char *ops, int func)
 		    add_opt_val(d, e);
 		else if (!(d->flags & ZOF_OPT)) {
 		    if (!pp[1]) {
-			zerrnam(nam, "missing argument for option: %s",
+			zwarnnam(nam, "missing argument for option: %s",
 				d->name, 0);
 			return 1;
 		    }