int c, ret;
time_t t;
struct find_param param = { .maxdepth = -1 };
- char str[1024];
struct option long_opts[] = {
/* New find options. */
{"atime", required_argument, 0, 'A'},
case 'A':
xtime = ¶m.atime;
xsign = ¶m.asign;
+ param.exclude_atime = !!neg_opt;
case 'C':
if (c == 'C') {
xtime = ¶m.ctime;
xsign = ¶m.csign;
+ param.exclude_ctime = !!neg_opt;
}
case 'M':
if (c == 'M') {
xtime = ¶m.mtime;
xsign = ¶m.msign;
+ param.exclude_mtime = !!neg_opt;
}
new_fashion = 1;
- if (neg_opt) {
- if (optarg[0] == '-')
- optarg[0] = '+';
- else if (optarg[0] == '+')
- optarg[0] = '-';
- else {
- str[0] = '-';
- str[1] = '\0';
- strcat(str, optarg);
- optarg = str;
- }
- }
ret = set_time(&t, xtime, optarg);
if (ret == INT_MAX)
return -1;
};
break;
case 's':
- if (neg_opt) {
- if (optarg[0] == '-')
- optarg[0] = '+';
- else if (optarg[0] == '+')
- optarg[0] = '-';
- else {
- str[0] = '-';
- str[1] = '\0';
- strcat(str, optarg);
- optarg = str;
- }
- }
if (optarg[0] == '+')
param.size_sign = -1;
else if (optarg[0] == '-')
optarg);
return ret;
}
+ param.check_size = 1;
+ param.exclude_size = !!neg_opt;
break;
case 'v':
new_fashion = 0;