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

gEDA-cvs: pcb.git: branch: master updated (e3774e28567f5ce142e204ab7e525ba954f49581)



The branch, master has been updated
       via  e3774e28567f5ce142e204ab7e525ba954f49581 (commit)
       via  5f8274a12638d913e12f2d5b3e043a39e6970716 (commit)
      from  8bcf1ed4d6a9dfcb196682b551f0ebb00cf93fc8 (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
=========

 src/action.c |    1 +
 src/buffer.c |   12 ++++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)


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

commit e3774e28567f5ce142e204ab7e525ba954f49581
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Check both FOO and FOO.fp for footprints.

:100644 100644 cdb34dd... 7daecf5... M	src/buffer.c

commit 5f8274a12638d913e12f2d5b3e043a39e6970716
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Check for NULL names.

:100644 100644 fff740c... 36125d2... M	src/action.c

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

commit e3774e28567f5ce142e204ab7e525ba954f49581
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Check both FOO and FOO.fp for footprints.

diff --git a/src/buffer.c b/src/buffer.c
index cdb34dd..7daecf5 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -767,6 +767,7 @@ LoadFootprintByName (BufferTypePtr Buffer, char *Footprint)
   FootprintHashEntry *fpe;
   LibraryMenuType *menu;
   LibraryEntryType *entry;
+  char *with_fp = NULL;
 
   if (!footprint_hash)
     make_footprint_hash ();
@@ -774,6 +775,13 @@ LoadFootprintByName (BufferTypePtr Buffer, char *Footprint)
   fpe = search_footprint_hash (Footprint);
   if (!fpe)
     {
+      with_fp = Concat (Footprint, ".fp", NULL);
+      fpe = search_footprint_hash (with_fp);
+      if (fpe)
+	Footprint = with_fp;
+    }
+  if (!fpe)
+    {
       Message("Unable to load footprint %s\n", Footprint);
       return 1;
     }
@@ -784,6 +792,8 @@ LoadFootprintByName (BufferTypePtr Buffer, char *Footprint)
   if (entry->Template == (char *) -1)
     {
       i = LoadElementToBuffer (Buffer, entry->AllocatedMemory, True);
+      if (with_fp)
+	free (with_fp);
       return i ? 0 : 1;
     }
   else
@@ -795,6 +805,8 @@ LoadFootprintByName (BufferTypePtr Buffer, char *Footprint)
       i = LoadElementToBuffer (Buffer, args, False);
 
       free (args);
+      if (with_fp)
+	free (with_fp);
       return i ? 0 : 1;
     }
 

commit 5f8274a12638d913e12f2d5b3e043a39e6970716
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>

    Check for NULL names.

diff --git a/src/action.c b/src/action.c
index fff740c..36125d2 100644
--- a/src/action.c
+++ b/src/action.c
@@ -6826,6 +6826,7 @@ static ElementType *
 find_element_by_refdes (char *refdes)
 {
   if (element_cache
+      && NAMEONPCB_NAME(element_cache)
       && strcmp (NAMEONPCB_NAME(element_cache), refdes) == 0)
     return element_cache;
 




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