Re: [Openocd-development] svf patch[2/2]: omit space between '(' and ')'

2010-01-25 Thread David Brownell
On Monday 25 January 2010, simon qian wrote: > > What about the attached patch? Looked OK to me. I merged it with some minor cleanup (no "break" after goto or return, etc) and adding some comments (like pointing out that the SVF spec is far from complete with respect to whitespace). - Dave

Re: [Openocd-development] svf patch[2/2]: omit space between '(' and ')'

2010-01-25 Thread simon qian
What about the attached patch? Pass all characters in a command, and call isspace to make the judgement. 2010/1/25 David Brownell > > 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

Re: [Openocd-development] svf patch[2/2]: omit space between '(' and ')'

2010-01-24 Thread David Brownell
> 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 t

Re: [Openocd-development] svf patch[2/2]: omit space between '(' and ')'

2010-01-24 Thread simon qian
> That is, you want to see that "svf_all_content..." patch > applied to current git, and nothing else? patch[2/2] doesn't solve the problem, and as you said. You are right about this. The right solution should be this patch svf_all_content_between()_is_one_parameter.patch. > What errors in *SVF* do

Re: [Openocd-development] svf patch[2/2]: omit space between '(' and ')'

2010-01-24 Thread David Brownell
On Sunday 24 January 2010, simon qian wrote: > > Is that straightforward? It sounds like the right approach. > The patch is tested OK with Altera CPLD. Test output: I'm not quite clear. This message included a different patch, "svf_all_content_between()_is_one_parameter.patch". Is this intended

Re: [Openocd-development] svf patch[2/2]: omit space between '(' and ')'

2010-01-24 Thread simon qian
> Is that straightforward? It sounds like the right approach. The patch is tested OK with Altera CPLD. Test output: > svf simple.svf svf processing file: "simple.svf" "FREQUENCY 900.00 HZ" 9000 kHz "TRST ABSENT" "ENDDR IDLE" "ENDIR IRPAUSE" "STATE IDLE" "SIR 10 TDI ( 2C C ) " "( 2C C )"

Re: [Openocd-development] svf patch[2/2]: omit space between '(' and ')'

2010-01-23 Thread David Brownell
On Saturday 23 January 2010, simon qian wrote: > > "TDI( 1234 )" should be OK. > "TDI( 1 2 3 4 )" could even be parsed. But (eventually) PIOMAP (IN STROBE IN ALE OUT DISABLE OUT ENABLE OUT CLEAR IN SET); is going to require the spaces, right? (Example cu

[Openocd-development] svf patch[2/2]: omit space between '(' and ')'

2010-01-23 Thread simon qian
"TDI( 1234 )" should be OK. "TDI( 1 2 3 4 )" could even be parsed. -- Best Regards, SimonQian http://www.SimonQian.com 2-svf_remove_space_between().patch Description: Binary data ___ Openocd-development mailing list Openocd-development@lists.berlios.d