What about the attached patch? Pass all characters in a command, and call isspace to make the judgement. 2010/1/25 David Brownell <davi...@pacbell.net>
> > while (str_len > 0 && ((str[str_len - 1] == '0') || (str[str_len > - 1] == ' '))) > > Shouldn't that be "isspace(str[str_len - 1])" to allow > leading tabs, newlines, etc? (If so, I'll just fix the > patch before merging.) > > The "isblank" test is what's used earlier in that routine; > it allows tabs. I suspect that should also be "isspace"... > > You don't seem to pass '\r' or '\n' through for now, but > the bitstring parsing would be more flexible if it didn't > needlessly limit the whitespace it allows. And it should > certainly be *consistent* about what it allows. > > - Dave > -- Best Regards, SimonQian http://www.SimonQian.com
svf.patch
Description: Binary data
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development