gEDA-dev: PCB: misc source cleanup

ldoolitt at recycle.lbl.gov ldoolitt at recycle.lbl.gov
Fri Jul 14 14:49:54 EDT 2006


Minor stuff I haven't posted before.  No changes to behavior.
Well, it fixes a broken printf, but it's disabled, so nobody
except DJ will ever actually see it.  ;-)

     - Larry

diff -ur --exclude=aclocal.m4 --exclude=CVS --exclude=configure --exclude=Makefile.in pcb-cvs/src/autoplace.c pcb-lrd/src/autoplace.c
--- pcb-cvs/src/autoplace.c	2006-06-09 20:07:38.000000000 -0700
+++ pcb-lrd/src/autoplace.c	2006-07-07 10:17:45.000000000 -0700
@@ -619,7 +619,7 @@
 PerturbationType
 createPerturbation (PointerListTypePtr selected, double T)
 {
-  PerturbationType pt;
+  PerturbationType pt={0};
   /* pick element to perturb */
   pt.element = (ElementTypePtr) selected->Ptr[random () % selected->PtrN];
   /* exchange, flip/rotate or shift? */
diff -ur --exclude=aclocal.m4 --exclude=CVS --exclude=configure --exclude=Makefile.in pcb-cvs/src/djopt.c pcb-lrd/src/djopt.c
--- pcb-cvs/src/djopt.c	2006-06-26 09:18:34.000000000 -0700
+++ pcb-lrd/src/djopt.c	2006-07-07 10:20:43.000000000 -0700
@@ -43,6 +43,7 @@
 #include "draw.h"
 #include "undo.h"
 #include "strflags.h"
+#include "find.h"
 
 #ifdef HAVE_LIBDMALLOC
 #include <dmalloc.h>
@@ -2485,13 +2486,13 @@
   for (ci = 0; ci < 2; ci++)
     for (li = 0; li < c[ci]->n_lines; li++)
       {
-	dprintf ("  try[%d,%d] \033[36m<%d,%d-%d,%d t%d c%d f%ld>\033[0m\n",
+	dprintf ("  try[%d,%d] \033[36m<%d,%d-%d,%d t%d c%d f%s>\033[0m\n",
 		 ci, li,
 		 c[ci]->lines[li]->s->x, c[ci]->lines[li]->s->y,
 		 c[ci]->lines[li]->e->x, c[ci]->lines[li]->e->y,
 		 c[ci]->lines[li]->line->Thickness,
 		 c[ci]->lines[li]->line->Clearance,
-		 c[ci]->lines[li]->line->Flags);
+		 flags_to_string(c[ci]->lines[li]->line->Flags, LINE_TYPE));
 	/* Pads are disqualified, as we want to mimic a trace line. */
 	if (c[ci]->lines[li]->line == (LineTypePtr) c[ci]->pad)
 	  {
diff -ur --exclude=aclocal.m4 --exclude=CVS --exclude=configure --exclude=Makefile.in pcb-cvs/src/main.c pcb-lrd/src/main.c
--- pcb-cvs/src/main.c	2006-06-09 20:07:41.000000000 -0700
+++ pcb-lrd/src/main.c	2006-07-07 10:18:42.000000000 -0700
@@ -393,7 +393,7 @@
   COLOR (PinNameColor, "#ff0000", "pin-name-color",
 	 "color for pin names and numbers"),
   COLOR (ElementColor, "#000000", "element-color", "color for elements"),
-  COLOR (RatColor, "#b8860b", "rat-color", "color for "),
+  COLOR (RatColor, "#b8860b", "rat-color", "color for ratlines"),
   COLOR (InvisibleObjectsColor, "#cccccc", "invisible-objects-color",
 	 "color for invisible objects"),
   COLOR (InvisibleMarkColor, "#cccccc", "invisible-mark-color",
@@ -523,7 +523,6 @@
 static void
 settings_post_process ()
 {
-  int i;
   if (Settings.LibraryCommand[0] != '/' && Settings.LibraryCommand[0] != '.')
     {
       Settings.LibraryCommand
diff -ur --exclude=aclocal.m4 --exclude=CVS --exclude=configure --exclude=Makefile.in pcb-cvs/src/move.c pcb-lrd/src/move.c
--- pcb-cvs/src/move.c	2006-06-09 20:07:41.000000000 -0700
+++ pcb-lrd/src/move.c	2006-07-07 10:12:17.000000000 -0700
@@ -967,7 +967,6 @@
 {
   int old_index, new_index;
   int new_top = -1;
-  int rv;
 
   if (argc != 2)
     {
@@ -1018,6 +1017,8 @@
 
   if (new_top != -1)
     ChangeGroupVisibility (new_index, 1, 1);
+
+  return 0;
 }
 
 HID_Action move_action_list[] = {
diff -ur --exclude=aclocal.m4 --exclude=CVS --exclude=configure --exclude=Makefile.in pcb-cvs/src/mymem.c pcb-lrd/src/mymem.c
--- pcb-cvs/src/mymem.c	2006-07-07 08:52:19.000000000 -0700
+++ pcb-lrd/src/mymem.c	2006-07-07 09:08:38.000000000 -0700
@@ -18,7 +18,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
-B *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  *  Contact addresses for paper mail and Email:
  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany


More information about the geda-dev mailing list