- char *t = (char *)s;
- while (isspace(*t)) t++;
- FILE f = {
- .buf = (void *)t, .rpos = (void *)t,
- .rend = (void *)-1, .lock = -1
- };
- off_t cnt;
- long double y = __floatscan(&f, -1, prec, 1, &cnt);
- if (p) *p = cnt ? t + cnt : (char *)s;
+ FILE f;
+ sh_fromstring(&f, s);
+ shlim(&f, 0);
+ long double y = __floatscan(&f, prec, 1);
+ off_t cnt = shcnt(&f);
+ if (p) *p = cnt ? (char *)s + cnt : (char *)s;