about summary refs log tree commit diff
path: root/xe.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-10-09 16:35:31 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-10-09 16:35:31 +0200
commitd7b32528b8a3d5a7ff3b33d7c2271f42ba5d1a07 (patch)
tree433e8c83ba0f113051af63ba1d9a3cfd714c6093 /xe.c
parent960971d43f509557a6bb2a0008a19f353c7caabf (diff)
downloadxe-d7b32528b8a3d5a7ff3b33d7c2271f42ba5d1a07.tar.gz
xe-d7b32528b8a3d5a7ff3b33d7c2271f42ba5d1a07.tar.xz
xe-d7b32528b8a3d5a7ff3b33d7c2271f42ba5d1a07.zip
use replace-arg for percent rules too (instead of @)
Diffstat (limited to 'xe.c')
-rw-r--r--xe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xe.c b/xe.c
index 664d3e2..846a28e 100644
--- a/xe.c
+++ b/xe.c
@@ -504,7 +504,7 @@ perc_subst(char *pat, char *base, char *arg)
 	size_t l;
 	char *dir = base;
 
-	if (arg[0] == '@' && !arg[1])
+	if (strcmp(arg, replace) == 0)
 		return base;
 
 	if (!strchr(pat, '/')) {
@@ -654,9 +654,9 @@ main(int argc, char *argv[], char *envp[])
 	}
 
 	if (pflag) {
-		if (maxatonce != 1 || replace != default_replace) {
+		if (maxatonce != 1) {
 			fprintf(stderr,
-			    "xe: -p cannot be used together with -N or -I.\n");
+			    "xe: -p cannot be used together with -N.\n");
 			exit(1);
 		}