about summary refs log tree commit diff
path: root/Src/Zle/zle_thingy.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle/zle_thingy.c')
-rw-r--r--Src/Zle/zle_thingy.c44
1 files changed, 21 insertions, 23 deletions
diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c
index 140aeb06a..72d3314ff 100644
--- a/Src/Zle/zle_thingy.c
+++ b/Src/Zle/zle_thingy.c
@@ -363,18 +363,17 @@ bin_zle(char *name, char **args, Options ops, UNUSED(int func))
     if(op->o)
 	for(opp = op; (++opp)->o; )
 	    if(OPT_ISSET(ops,STOUC(opp->o))) {
-		zwarnnam(name, "incompatible operation selection options",
-		    NULL, 0);
+		zwarnnam(name, "incompatible operation selection options");
 		return 1;
 	    }
 
     /* check number of arguments */
     for(n = 0; args[n]; n++) ;
     if(n < op->min) {
-	zwarnnam(name, "not enough arguments for -%c", NULL, op->o);
+	zwarnnam(name, "not enough arguments for -%c", op->o);
 	return 1;
     } else if(op->max != -1 && n > op->max) {
-	zwarnnam(name, "too many arguments for -%c", NULL, op->o);
+	zwarnnam(name, "too many arguments for -%c", op->o);
 	return 1;
     }
 
@@ -454,7 +453,7 @@ static int
 bin_zle_mesg(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
 {
     if (!zleactive) {
-	zwarnnam(name, "can only be called from widget function", NULL, 0);
+	zwarnnam(name, "can only be called from widget function");
 	return 1;
     }
     showmsg(*args);
@@ -470,7 +469,7 @@ bin_zle_unget(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
     char *b = *args, *p = b + strlen(b);
 
     if (!zleactive) {
-	zwarnnam(name, "can only be called from widget function", NULL, 0);
+	zwarnnam(name, "can only be called from widget function");
 	return 1;
     }
     while (p > b)
@@ -483,7 +482,7 @@ static int
 bin_zle_keymap(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
 {
     if (!zleactive) {
-	zwarnnam(name, "can only be called from widget function", NULL, 0);
+	zwarnnam(name, "can only be called from widget function");
 	return 1;
     }
     return selectkeymap(*args, 0);
@@ -541,10 +540,10 @@ bin_zle_del(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
     do {
 	Thingy t = (Thingy) thingytab->getnode(thingytab, *args);
 	if(!t) {
-	    zwarnnam(name, "no such widget `%s'", *args, 0);
+	    zwarnnam(name, "no such widget `%s'", *args);
 	    ret = 1;
 	} else if(unbindwidget(t, 0)) {
-	    zwarnnam(name, "widget name `%s' is protected", *args, 0);
+	    zwarnnam(name, "widget name `%s' is protected", *args);
 	    ret = 1;
 	}
     } while(*++args);
@@ -558,10 +557,10 @@ bin_zle_link(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
     Thingy t = (Thingy) thingytab->getnode(thingytab, args[0]);
 
     if(!t) {
-	zwarnnam(name, "no such widget `%s'", args[0], 0);
+	zwarnnam(name, "no such widget `%s'", args[0]);
 	return 1;
     } else if(bindwidget(t->widget, rthingy(args[1]))) {
-	zwarnnam(name, "widget name `%s' is protected", args[1], 0);
+	zwarnnam(name, "widget name `%s' is protected", args[1]);
 	return 1;
     }
     return 0;
@@ -580,7 +579,7 @@ bin_zle_new(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
     if(!bindwidget(w, rthingy(args[0])))
 	return 0;
     freewidget(w);
-    zwarnnam(name, "widget name `%s' is protected", args[0], 0);
+    zwarnnam(name, "widget name `%s' is protected", args[0]);
     return 1;
 }
 
@@ -592,14 +591,14 @@ bin_zle_complete(char *name, char **args, UNUSED(Options ops), UNUSED(char func)
     Widget w, cw;
 
     if (!require_module(name, "zsh/complete", 0, 0)) {
-	zwarnnam(name, "can't load complete module", NULL, 0);
+	zwarnnam(name, "can't load complete module");
 	return 1;
     }
     t = rthingy((args[1][0] == '.') ? args[1] : dyncat(".", args[1]));
     cw = t->widget;
     unrefthingy(t);
     if (!cw || !(cw->flags & ZLE_ISCOMP)) {
-	zwarnnam(name, "invalid widget `%s'", args[1], 0);
+	zwarnnam(name, "invalid widget `%s'", args[1]);
 	return 1;
     }
     w = zalloc(sizeof(*w));
@@ -610,7 +609,7 @@ bin_zle_complete(char *name, char **args, UNUSED(Options ops), UNUSED(char func)
     w->u.comp.func = ztrdup(args[2]);
     if (bindwidget(w, rthingy(args[0]))) {
 	freewidget(w);
-	zwarnnam(name, "widget name `%s' is protected", args[0], 0);
+	zwarnnam(name, "widget name `%s' is protected", args[0]);
 	return 1;
     }
     hascompwidgets++;
@@ -648,8 +647,7 @@ bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
 	return !zle_usable();
 
     if(!zle_usable()) {
-	zwarnnam(name, "widgets can only be called when ZLE is active",
-	    NULL, 0);
+	zwarnnam(name, "widgets can only be called when ZLE is active");
 	return 1;
     }
 
@@ -666,7 +664,7 @@ bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
 	    case 'n':
 		num = args[0][1] ? args[0]+1 : args[1];
 		if (!num) {
-		    zwarnnam(name, "number expected after -%c", NULL, **args);
+		    zwarnnam(name, "number expected after -%c", **args);
 		    return 1;
 		}
 		if (!args[0][1])
@@ -683,7 +681,7 @@ bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
 	    case 'K':
 		keymap_tmp = args[0][1] ? args[0]+1 : args[1];
 		if (!keymap_tmp) {
-		    zwarnnam(name, "keymap expected after -%c", NULL, **args);
+		    zwarnnam(name, "keymap expected after -%c", **args);
 		    return 1;
 		}
 		if (!args[0][1])
@@ -696,7 +694,7 @@ bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
 		setbindk = 1;
 		break;
 	    default:
-		zwarnnam(name, "unknown option: %s", *args, 0);
+		zwarnnam(name, "unknown option: %s", *args);
 		return 1;
 	    }
 	}
@@ -741,7 +739,7 @@ bin_zle_fd(char *name, char **args, Options ops, UNUSED(char func))
 	fd = (int)zstrtol(*args, &endptr, 10);
 
 	if (*endptr || fd < 0) {
-	    zwarnnam(name, "Bad file descriptor number for -F: %s", *args, 0);
+	    zwarnnam(name, "Bad file descriptor number for -F: %s", *args);
 	    return 1;
 	}
     }
@@ -749,7 +747,7 @@ bin_zle_fd(char *name, char **args, Options ops, UNUSED(char func))
     if (OPT_ISSET(ops,'L') || !*args) {
 	/* Listing handlers. */
 	if (*args && args[1]) {
-	    zwarnnam(name, "too many arguments for -FL", NULL, 0);
+	    zwarnnam(name, "too many arguments for -FL");
 	    return 1;
 	}
 	for (i = 0; i < nwatch; i++) {
@@ -824,7 +822,7 @@ bin_zle_fd(char *name, char **args, Options ops, UNUSED(char func))
 	    }
 	}
 	if (!found) {
-	    zwarnnam(name, "No handler installed for fd %d", NULL, fd);
+	    zwarnnam(name, "No handler installed for fd %d", fd);
 	    return 1;
 	}
     }