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

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



The branch, master has been updated
       via  670ce234f07f33a6ea09be3de4ceebd6d7002b7a (commit)
      from  ead902434b80f733b10248e35e12a5906e0a392a (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/draw.c              |    6 +++---
 src/hid/common/flags.c  |    4 ++--
 src/hid/gerber/gerber.c |    4 ++--
 src/hid/png/png.c       |    2 +-
 src/hid/ps/ps.c         |    8 ++++----
 src/print.c             |    4 ++--
 6 files changed, 14 insertions(+), 14 deletions(-)


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

commit 670ce234f07f33a6ea09be3de4ceebd6d7002b7a
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Use strcmp() for special layer names, rather than strcasecmp()
    
    Before commit 086aa491fae18f1ec72da047b772fa3510f72d0b, we were using
    strcmp() and strcasecmp() in different places. That commit changed to
    strcasecmp(). Lets choose to keep the more restrictive option for now,
    which reduces the number of "magic" layer names PCB supports.

:100644 100644 f3bb2cb... a71b1b3... M	src/draw.c
:100644 100644 8aba3ab... 3915c7a... M	src/hid/common/flags.c
:100644 100644 e33e6ef... afa6a08... M	src/hid/gerber/gerber.c
:100644 100644 c407840... 83f8976... M	src/hid/png/png.c
:100644 100644 2d96e16... e648fa1... M	src/hid/ps/ps.c
:100644 100644 1f7bc53... 3831b4a... M	src/print.c

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

commit 670ce234f07f33a6ea09be3de4ceebd6d7002b7a
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Use strcmp() for special layer names, rather than strcasecmp()
    
    Before commit 086aa491fae18f1ec72da047b772fa3510f72d0b, we were using
    strcmp() and strcasecmp() in different places. That commit changed to
    strcasecmp(). Lets choose to keep the more restrictive option for now,
    which reduces the number of "magic" layer names PCB supports.

diff --git a/src/draw.c b/src/draw.c
index f3bb2cb..a71b1b3 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -801,7 +801,7 @@ DrawMask (BoxType * screen)
       for (i=PCB->Data->LayerN; i>=0; i--)
 	{
 	  LayerTypePtr Layer = PCB->Data->Layer + i;
-	  if (strcasecmp (Layer->Name, "outline") == 0)
+	  if (strcmp (Layer->Name, "outline") == 0)
 	    DrawLayer (Layer, screen);
 	}
     }
@@ -891,8 +891,8 @@ DrawLayerGroup (int group, const BoxType * screen)
     {
       layernum = layers[i];
       Layer = PCB->Data->Layer + layers[i];
-      if (strcasecmp (Layer->Name, "outline") == 0
-	  || strcasecmp (Layer->Name, "route") == 0)
+      if (strcmp (Layer->Name, "outline") == 0 ||
+	  strcmp (Layer->Name, "route") == 0)
 	rv = 0;
       if (layernum < max_layer && Layer->On)
 	{
diff --git a/src/hid/common/flags.c b/src/hid/common/flags.c
index 8aba3ab..3915c7a 100644
--- a/src/hid/common/flags.c
+++ b/src/hid/common/flags.c
@@ -185,8 +185,8 @@ layer_type_to_file_name (int idx)
       else if (group == GetLayerGroupNumberByNumber(max_layer+SOLDER_LAYER))
 	return "back";
       else if (PCB->LayerGroups.Number[group] == 1
-	       && (strcasecmp (PCB->Data->Layer[idx].Name, "route") == 0
-		   || strcasecmp (PCB->Data->Layer[idx].Name, "outline") == 0))
+	       && (strcmp (PCB->Data->Layer[idx].Name, "route") == 0 ||
+		   strcmp (PCB->Data->Layer[idx].Name, "outline") == 0))
 	return "outline";
       else
 	{
diff --git a/src/hid/gerber/gerber.c b/src/hid/gerber/gerber.c
index e33e6ef..afa6a08 100644
--- a/src/hid/gerber/gerber.c
+++ b/src/hid/gerber/gerber.c
@@ -467,8 +467,8 @@ gerber_set_layer (const char *name, int group, int empty)
     return 0;
 
   flash_drills = 0;
-  if (strcasecmp (name, "outline") == 0
-      || strcasecmp (name, "route") == 0)
+  if (strcmp (name, "outline") == 0 ||
+      strcmp (name, "route") == 0)
     flash_drills = 1;
 
   if (is_drill && n_pending_drills)
diff --git a/src/hid/png/png.c b/src/hid/png/png.c
index c407840..83f8976 100644
--- a/src/hid/png/png.c
+++ b/src/hid/png/png.c
@@ -923,7 +923,7 @@ png_set_layer (const char *name, int group, int empty)
 	  if (idx < 0)
 	    return 0;
 
-	  if (strcasecmp (name, "outline") == 0)
+	  if (strcmp (name, "outline") == 0)
 	    photo_im = &photo_outline;
 	  else
 	    photo_im = photo_copper + group;
diff --git a/src/hid/ps/ps.c b/src/hid/ps/ps.c
index 2d96e16..e648fa1 100644
--- a/src/hid/ps/ps.c
+++ b/src/hid/ps/ps.c
@@ -377,8 +377,8 @@ ps_hid_export_to_file (FILE * the_file, HID_Attr_Val * options)
       if (layer->LineN || layer->TextN || layer->ArcN || layer->PolygonN)
 	print_group[GetLayerGroupNumberByNumber (i)] = 1;
 
-      if (strcasecmp (layer->Name, "outline") == 0
-	  || strcasecmp (layer->Name, "route") == 0)
+      if (strcmp (layer->Name, "outline") == 0 ||
+	  strcmp (layer->Name, "route") == 0)
 	{
 	  printf("see outline layer\n");
 	  outline_layer = layer;
@@ -704,8 +704,8 @@ ps_set_layer (const char *name, int group, int empty)
       && outline_layer
       && outline_layer != PCB->Data->Layer+idx
       && SL_TYPE (idx) == 0 /* copper */
-      && strcasecmp (name, "outline")
-      && strcasecmp (name, "route"))
+      && strcmp (name, "outline")
+      && strcmp (name, "route"))
     {
       printf("attempting to draw outlines on %s\n", name);
       DrawLayer (outline_layer, &region);
diff --git a/src/print.c b/src/print.c
index 1f7bc53..3831b4a 100644
--- a/src/print.c
+++ b/src/print.c
@@ -298,9 +298,9 @@ PrintFab (void)
       LayerType *l = LAYER_PTR (i);
       if (l->Name && (l->LineN || l->ArcN))
 	{
-	  if (strcasecmp ("route", l->Name) == 0)
+	  if (strcmp ("route", l->Name) == 0)
 	    break;
-	  if (strcasecmp ("outline", l->Name) == 0)
+	  if (strcmp ("outline", l->Name) == 0)
 	    break;
 	}
     }




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