[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gEDA-dev: Gerbv and strtod
Gerbv chokes on many Excellon files which "seem to be" okay.
I never figured out whether Gerbv's interpretation of the syntax
of Excellon files was right or my understanding was right. I
first encountered these problems when trying to run some
panelised files which I'd panelised using gbtiler. In those
cases, I found the Gerber files okay, but some of the Excellon
drill files were totally messed up in the Gerbv display. We
narrowed down the problem to Gerbv's dislike of leading
zeros in the XY coordinate lines of the Excellon files. If there
were leading zeros, Gerbv choked. If you removed those
zeros, Gerbv displayed things fine.
So we modified gbtiler to generate output "compatible
with" Gerbv.
I wonder now whether it was the same bug that you are
seeing?
> if (decimal_point)
> {
> if (decimal_digit)
> result += (read -0x30) *pow(10.0, -decimal_digit);
> decimal_digit++;
> }
> else
> result = result * 10 + (read -0x30);
> read = gerb_fgetc(fd);
> }
One more thing: isn't this code strange? The indentation
of the two statements below the "else" seems to suggest
that they're part of one block, but the braces are missing.
I wonder what the author intended? Or is it just a case of
indentation getting screwed up by the email clients in the
chain?
Tarun
--
_______________________________________________
geda-dev mailing list
geda-dev@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev