[THINKO] Re: [BusyBox] separating multiple sed commands
Rob Landley
rob at landley.net
Sun Jan 4 06:01:23 UTC 2004
On Saturday 03 January 2004 19:52, Rob Landley wrote:
> > > I rewrote the sed code fairly extensively, and if the GNU or BSD
> > > version can
> >
> > It works with GNU sed and with Busybox's 0.60.5 sed.
>
> Depends on your definition of "works", of course. If the key you're
> searching for isn't in the list, you get the first key=value pair out as a
> result...
>
> But I see what it's doing now.
>
> I got your testcase, and am looking into it...
>
> Rob
It's a thinko.
--- busybox/editors/sed.old 2003-12-23 02:53:51.000000000 -0600
+++ busybox/editors/sed.c 2004-01-03 23:56:44.436920744 -0600
@@ -344,10 +344,11 @@
sed_cmd->which_match=(unsigned short)strtol(substr+idx,&pos,10);
idx=pos-substr;
}
- /* Skip spaces */
- if(isspace(substr[idx])) continue;
continue;
}
+ /* Skip spaces */
+ if(isspace(substr[idx])) continue;
+
switch (substr[idx]) {
/* Replace all occurrences */
case 'g':
Rob
More information about the busybox
mailing list