David Laight wrote:
>Or:
>                               tmp = strspn(f, "-+ #0");
>                               direc_length += tmp - f;
>                               f = tmp;

Yes, that seems to work too, and it saves 28 bytes.  Though since
strspn() returns the length of the initial segment it needs to be:

   size_t tmp;
   ...
   tmp = strspn(f, "-+ #0");                                         
   direc_length += tmp;                                             
   f += tmp;

>Except that I'd have thought it would need to remember which flags are set.

They're retained in the format string which is pointed to by direc_start.

Ron
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to