> In 30 seconds of looking at the code, it does not look like it supports
> newlines in a command, which would be terminated by a semicolon. i.e. it
> is perfectly legal for an SVF file to have new lines embedded within a
> command, which is terminated finally at the semicolon possibly several
> lines later.
I tested it to be OK with mutiple line for one command.
look at here:
while (!cmd_ok && (read(fd, &ch, 1) > 0) )
{
    switch(ch) 
    {
    ......
    case ';':
        slash = 0;
        if (!comment)
        {
            cmd_ok = 1;
        }
        break;
    case '\n':
        svf_line_number++;
    case '\r':
        slash = 0;
        comment = 0;
    break;
    ......
    }
}
It will loop until a complete command is parsed.

> It is this kind of thing that make the maintenance considerations
> important. Again, C in my opinion, it not the easiest language in which
> to maintain something like this. It is especially curious why this
> should exist at all when as of two weeks ago there was an SVF conversion
> tool in this project.
I use C, because it can be library-independent. Otherwise, I can use UrJTAG.

2009-01-18 



Best Regards, Simon Qian

SimonQian([email protected]) ---- www.SimonQian.com
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to