On 12/18/09, timecop <time...@gmail.com> wrote: > Gerbv and libgerbv (lastest git version as well) fails to parse the > attached files.
Try the attachment. gerbv does not recognises D2 as D02, despite the format documents this option. The patch does not fixes all issues with these files, though. > These are opened fine by other viewers ex. ViewMate etc. > Gerbv seems to think its not a gerber file, though it is 247x Actually, the files are not quite orthodoxal; e.g. gnd.gbr begins with *. Thanks, Ineiev
diff --git a/src/gerber.c b/src/gerber.c index bba2211..d91b6e1 100644 --- a/src/gerber.c +++ b/src/gerber.c @@ -805,11 +805,11 @@ gerber_is_rs274x_p(gerb_file_t *fd, gboolean *returnFoundBinary) found_ADD = TRUE; dprintf ("found_ADD\n"); } - if (g_strstr_len(buf, len, "D00")) { + if (g_strstr_len(buf, len, "D00") || g_strstr_len(buf, len, "D0")) { found_D0 = TRUE; dprintf ("found_D0\n"); } - if (g_strstr_len(buf, len, "D02")) { + if (g_strstr_len(buf, len, "D02") || g_strstr_len(buf, len, "D2")) { found_D2 = TRUE; dprintf ("found_D2\n"); } @@ -904,10 +904,10 @@ gerber_is_rs274d_p(gerb_file_t *fd) if (g_strstr_len(buf, len, "%ADD")) { found_ADD = TRUE; } - if (g_strstr_len(buf, len, "D00")) { + if (g_strstr_len(buf, len, "D00") || g_strstr_len(buf, len, "D2")) { found_D0 = TRUE; } - if (g_strstr_len(buf, len, "D02")) { + if (g_strstr_len(buf, len, "D02") || g_strstr_len(buf, len, "D2")) { found_D2 = TRUE; } if (g_strstr_len(buf, len, "M0")) {
_______________________________________________ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user