grep: better regerror message
This commit is contained in:
parent
cd73d1b330
commit
1360f568bb
2
grep.c
2
grep.c
|
@ -51,7 +51,7 @@ main(int argc, char *argv[])
|
||||||
char buf[BUFSIZ];
|
char buf[BUFSIZ];
|
||||||
|
|
||||||
regerror(n, &preg, buf, sizeof buf);
|
regerror(n, &preg, buf, sizeof buf);
|
||||||
enprintf(Error, "%s\n", buf);
|
enprintf(Error, "invalid pattern: %s\n", buf);
|
||||||
}
|
}
|
||||||
many = (argc > optind+1);
|
many = (argc > optind+1);
|
||||||
if(optind == argc)
|
if(optind == argc)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user