return(0);
}
-static void findsizelimit(struct sexpr *sexpr, int *min, int *max)
+static void findsizelimit(struct sexpr *sexpr, off_t *min, off_t *max)
{
- int minl, maxl, minr, maxr, retmin, retmax;
+ off_t minl, maxl, minr, maxr, retmin, retmax;
switch(sexpr->op)
{
}
case SOP_SIZELT:
retmin = 0;
- retmax = sexpr->d.n - 1;
+ retmax = sexpr->d.sz - 1;
break;
case SOP_SIZEEQ:
- retmin = sexpr->d.n;
- retmax = sexpr->d.n;
+ retmin = sexpr->d.sz;
+ retmax = sexpr->d.sz;
break;
case SOP_SIZEGT:
- retmin = sexpr->d.n + 1;
+ retmin = sexpr->d.sz + 1;
retmax = -1;
break;
default:
size_t sstrsize, sstrdata;
struct sockaddr *name;
socklen_t namelen;
- int minsize, maxsize;
+ off_t minsize, maxsize;
struct hash *hash;
hub = fn->data;
if(minsize != 0)
{
sizebuf2(sstr, sstrdata + 32, 1);
- sstrdata += snprintf(sstr + sstrdata, sstrsize - sstrdata, "T?F?%i?1?", minsize);
+ sstrdata += snprintf(sstr + sstrdata, sstrsize - sstrdata, "T?F?%ji?1?", (intmax_t)minsize);
} else if(maxsize != -1) {
sizebuf2(sstr, sstrdata + 32, 1);
- sstrdata += snprintf(sstr + sstrdata, sstrsize - sstrdata, "T?T?%i?1?", maxsize);
+ sstrdata += snprintf(sstr + sstrdata, sstrsize - sstrdata, "T?T?%ji?1?", (intmax_t)maxsize);
} else {
bufcat(sstr, "F?F?0?1?", 8);
}
sexpr->op = SOP_SIZEEQ;
else
sexpr->op = SOP_SIZEGT;
- sexpr->d.n = wcstol(tok2->d.str + 2, NULL, 0);
+ sexpr->d.sz = wcstoll(tok2->d.str + 2, NULL, 0);
sexpr->cost = 0;
getsexpr(tok->d.se = sexpr);
freetok(tok2);
p = fnfilebasename(sr->filename);
return(wcsexists(p, sexpr->d.s));
case SOP_SIZELT:
- return(sr->size < sexpr->d.n);
+ return(sr->size < sexpr->d.sz);
case SOP_SIZEEQ:
- return(sr->size == sexpr->d.n);
+ return(sr->size == sexpr->d.sz);
case SOP_SIZEGT:
- return(sr->size > sexpr->d.n);
+ return(sr->size > sexpr->d.sz);
case SOP_HASHIS:
if(sr->hash == NULL)
return(0);