[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: master updated (1.5.2-20090328-186-g8218450)



The branch, master has been updated
       via  821845073b187409488bbf78ed947fd084439546 (commit)
       via  7f4212f196d91459d7af2c7e4b5e1a21920524c4 (commit)
      from  d83339599e717c9eeb04fd3e8924e8e7654b7b1e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 configure.ac         |    1 +
 utils/src/gsch2pcb.c |   15 +++++++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)


=================
 Commit Messages
=================

commit 821845073b187409488bbf78ed947fd084439546
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    gsch2pcb: Check for and reject non-footprint PCB files.
    
    A common error is to save a footprint from PCB as a layout rather than
    as an element.  This patch modifies gsch2pcb to attempt to check for
    this error. If a layout file is detected, it is rejected and a warning
    printed.

:100644 100644 f859b43... 4d3a825... M	utils/src/gsch2pcb.c

commit 7f4212f196d91459d7af2c7e4b5e1a21920524c4
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    build-sys: Add check for m4.
    
    The gsch2pcb netlist backend needs to know how to run m4.  It should
    work this out at runtime, though, so this needs to be fixed at some
    point.

:100644 100644 35fa137... caee37d... M	configure.ac

=========
 Changes
=========

commit 821845073b187409488bbf78ed947fd084439546
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    gsch2pcb: Check for and reject non-footprint PCB files.
    
    A common error is to save a footprint from PCB as a layout rather than
    as an element.  This patch modifies gsch2pcb to attempt to check for
    this error. If a layout file is detected, it is rejected and a warning
    printed.

diff --git a/utils/src/gsch2pcb.c b/utils/src/gsch2pcb.c
index f859b43..4d3a825 100644
--- a/utils/src/gsch2pcb.c
+++ b/utils/src/gsch2pcb.c
@@ -550,6 +550,21 @@ insert_element(FILE *f_out, gchar *element_file,
 		g_free(s);
 		return FALSE;
 		}
+	/* Scan the file to detect whether it's actually a PCB
+	 * layout. Assumes that a PCB layout will have a "PCB" line. */
+	while ((fgets(buf, sizeof(buf), f_in)) != NULL) {
+		for (s = buf; *s == ' ' || *s == '\t'; ++s)
+		;
+		s[3] = 0; /* Truncate line */
+		if (strncmp ("PCB", s, sizeof(buf)) == 0) {
+			printf ("Warning: %s appears to be a PCB layout file. Skipping.\n",
+				element_file);
+			fclose (f_in);
+			return FALSE;
+		}
+	}
+	rewind (f_in);
+
 	/* Copy the file element lines.  Substitute new parameters into the
 	|  Element() or Element[] line and strip comments.
 	*/

commit 7f4212f196d91459d7af2c7e4b5e1a21920524c4
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    build-sys: Add check for m4.
    
    The gsch2pcb netlist backend needs to know how to run m4.  It should
    work this out at runtime, though, so this needs to be fixed at some
    point.

diff --git a/configure.ac b/configure.ac
index 35fa137..caee37d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,6 +53,7 @@ AX_GCC_FLAGS([-Wall])
 AM_PROG_LEX
 AX_PROG_AWK
 AX_PROG_GROFF
+AC_PATH_PROGS([M4], [gm4 m4], [m4])
 
 #####################################################################
 # Internationalisation




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs