commit 3ddd0e4133be191a882414fb5d54d9942aefb454
parent 0bd28b69691c5c1c1995e8b84d2250a0141a2e8b
Author: Claudio Alessi <smoppy@gmail.com>
Date: Thu, 15 Aug 2024 23:24:33 +0200
Remove limit when use -f or -t (-l still works if used after those flags).
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sw.c b/sw.c
@@ -392,14 +392,14 @@ main(int argc, char *argv[]) {
ARGBEGIN {
case 'd': delid = atoi(EARGF(usage())); break;
case 'e': addfilter(F_TEXT, EARGF(usage())); break;
- case 'f': addfilter(F_DATEFROM, EARGF(usage())); break;
+ case 'f': addfilter(F_DATEFROM, EARGF(usage())); limit = 0; break;
case 'i': snprintf(movsfilename, sizeof movsfilename, "%s", EARGF(usage())); break;
case 'l':
limit = strtoint(EARGF(usage()));
if(limit < 0)
die("%s: -l: invalid argument\n", argv0);
break;
- case 't': addfilter(F_DATETO, EARGF(usage())); break;
+ case 't': addfilter(F_DATETO, EARGF(usage())); limit = 0; break;
case 'v': die("sw-"VERSION"\n");
case 'x': addfilter(F_NOTEXT, EARGF(usage())); break;
default: usage();