On Tue, Sep 30, 2025 at 10:22 PM enh <[email protected]> wrote: > > On Sun, Sep 28, 2025 at 2:10 PM Jesse Rosenstock <[email protected]> wrote: > > + long long l = strtoll(str, end, base); > > + // POSIX says strtoll *may* set errno to EINVAL when no input is > > consumed. > > + // https://pubs.opengroup.org/onlinepubs/9799919799/functions/strtol.html > > + // Set it consistently. > > which libc doesn't set it? that would be a more useful comment...
glibc. The estrtol change is no longer needed due to your suggestion below. It could still be considered separately. > > + // Parse a[-b[:step]]. > > wouldn't this be simpler with sscanf() (and accepting that you might > have 1, 2, or 3 matches)? Yes, thanks. I'll send a v2 tomorrow. _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
