[patch] add ip addr del alias for delete [was: Re: ipaddr applet query]
Robert P. J. Day
rpjday at mindspring.com
Fri Mar 31 19:50:25 UTC 2006
On Fri, 31 Mar 2006, Rob Landley wrote:
> We need a library function that does some variant of:
>
> int submatch(char *test, char *str)
> {
> if (!*test) return 0;
> for(;;) {
> if (!*test) return 1;
> if (!*str) return 0;
> if (*(test++) != *(str++)) return 0;
> }
> }
>
> And then submatch(input,"walrus") should match "walrus", "walru",
> "walr", "wal", "wa", and "w".
it's not that simple. what you *really* want is a feature that allows
one to use the shortest unique prefix across all possible keywords.
and, no, i'm not about to submit a patch. :-)
rday
More information about the busybox
mailing list