r5435 - trunk/gta02-core/kicad-patches

werner at docs.openmoko.org werner at docs.openmoko.org
Thu Aug 13 21:49:36 CEST 2009


Author: werner
Date: 2009-08-13 21:49:35 +0200 (Thu, 13 Aug 2009)
New Revision: 5435

Added:
   trunk/gta02-core/kicad-patches/README
Modified:
   trunk/gta02-core/kicad-patches/eeschema-plot-only-mode.patch
   trunk/gta02-core/kicad-patches/erc-exceptions.patch
   trunk/gta02-core/kicad-patches/fix-pinedit-collision.patch
   trunk/gta02-core/kicad-patches/series
   trunk/gta02-core/kicad-patches/streamline-erc.patch
Log:
Update for KiCad revision 1923, by Nathael Pajani.



Added: trunk/gta02-core/kicad-patches/README
===================================================================
--- trunk/gta02-core/kicad-patches/README	                        (rev 0)
+++ trunk/gta02-core/kicad-patches/README	2009-08-13 19:49:35 UTC (rev 5435)
@@ -0,0 +1,30 @@
+Patches found in this directory are relevant as of revision 1923 of Kicad SVN
+
+See series file to apply them in the right order.
+Use Quilt.
+
+
+Here is a list of patches that have made it to the Kicad svn sources
+(removed from this svn).
+
+# tentative fix for making command-line invocation with relative paths work
+# functionality has been added into 1857
+## eeschema-fix-relative-path.patch
+
+# accepted as of r1854
+## make-junctions-larger-in-plots.patch
+## make-junctions-larger-on-plotps.patch
+
+# fix-eeschema-libs.patch has made it upstream. We're now at r1837
+## fix-eeschema-libs.patch
+
+# accepted as of r1783
+## gerbview-export-arcs.patch
+
+# accepted as of r1774
+## fix-pinbypin-button-type.patch
+
+# pending work, will perhaps be implemented in an entirely different fashion
+## auto-overline-config.patch
+## auto-overline-screen.patch
+

Modified: trunk/gta02-core/kicad-patches/eeschema-plot-only-mode.patch
===================================================================
--- trunk/gta02-core/kicad-patches/eeschema-plot-only-mode.patch	2009-08-13 10:57:39 UTC (rev 5434)
+++ trunk/gta02-core/kicad-patches/eeschema-plot-only-mode.patch	2009-08-13 19:49:35 UTC (rev 5435)
@@ -17,8 +17,8 @@
 
 Index: kicad/eeschema/eeschema.cpp
 ===================================================================
---- kicad.orig/eeschema/eeschema.cpp	2009-07-01 23:14:44.000000000 -0300
-+++ kicad/eeschema/eeschema.cpp	2009-07-01 23:15:15.000000000 -0300
+--- kicad.orig/eeschema/eeschema.cpp        2009-07-01 23:14:44.000000000 -0300
++++ kicad/eeschema/eeschema.cpp        2009-07-01 23:15:15.000000000 -0300
 @@ -12,6 +12,7 @@
  #include "general.h"
  #include "bitmaps.h"
@@ -51,15 +51,15 @@
 +
 +    if( app->argc < 3 )
 +    {
-+	fprintf( stderr, "usage: %ls [[--plot] filename]\n", *app->argv );
-+	exit( 1 );
++        fprintf( stderr, "usage: %ls [[--plot] filename]\n", *app->argv );
++        exit( 1 );
 +    }
 +
 +    fn = app->argv[2];
 +    if( !fn.IsOk() )
 +    {
-+	fprintf( stderr, "%ls: bad name\n", app->argv[2] );
-+	exit(1);
++        fprintf( stderr, "%ls: bad name\n", app->argv[2] );
++        exit(1);
 +    }
 +
 +    /* init EESCHEMA */
@@ -77,12 +77,12 @@
 +
 +    /* Load file specified in the command line. */
 +    if( fn.GetExt() != SchematicFileExtension )
-+	fn.SetExt( SchematicFileExtension );
++        fn.SetExt( SchematicFileExtension );
 +    wxSetWorkingDirectory( fn.GetPath() );
 +    if( !frame->LoadOneEEProject( fn.GetFullPath(), false ) )
 +    {
-+	fprintf( stderr, "%ls: can't load\n", app->argv[2] );
-+	exit( 1 );
++        fprintf( stderr, "%ls: can't load\n", app->argv[2] );
++        exit( 1 );
 +    }
 +
 +    WinEDA_PlotPSFrame* Ps_frame = new WinEDA_PlotPSFrame( frame );
@@ -102,7 +102,7 @@
      InitEDA_Appl( wxT( "EESchema" ), APP_TYPE_EESCHEMA );
  
 +    if( argc > 1 && !wxStrcmp( argv[1], wxT( "--plot" ) ) )
-+	PlotOnly( this );
++        PlotOnly( this );
 +
      if( m_Checker && m_Checker->IsAnotherRunning() )
      {

Modified: trunk/gta02-core/kicad-patches/erc-exceptions.patch
===================================================================
--- trunk/gta02-core/kicad-patches/erc-exceptions.patch	2009-08-13 10:57:39 UTC (rev 5434)
+++ trunk/gta02-core/kicad-patches/erc-exceptions.patch	2009-08-13 19:49:35 UTC (rev 5435)
@@ -24,16 +24,28 @@
 
 - Werner
 
+Updated to rev 1923
+
+- Nathael
+
 ---
 
 Index: kicad/eeschema/erc.cpp
 ===================================================================
---- kicad.orig/eeschema/erc.cpp	2009-07-03 10:05:43.000000000 -0300
-+++ kicad/eeschema/erc.cpp	2009-07-03 12:50:34.000000000 -0300
-@@ -267,6 +267,188 @@
+--- kicad.orig/eeschema/erc.cpp	2009-08-13 16:48:27.000000000 +0200
++++ kicad/eeschema/erc.cpp	2009-08-13 16:49:08.000000000 +0200
+@@ -4,6 +4,7 @@
+ 
+ #include "fctsys.h"
+ #include "common.h"
++#include "confirm.h"
+ #include "class_drawpanel.h"
+ #include "kicad_string.h"
+ #include "gestfich.h"
+@@ -212,6 +213,187 @@
+     return err_count;
  }
  
- 
 +static struct exception
 +{
 +    char* a_ref;
@@ -54,10 +66,10 @@
 +
 +    while( exceptions )
 +    {
-+	next = exceptions->next;
-+	MyFree( exceptions->line );
-+	MyFree( exceptions );
-+	exceptions = next;
++        next = exceptions->next;
++        MyFree( exceptions->line );
++        MyFree( exceptions );
++        exceptions = next;
 +    }
 +}
 +
@@ -68,14 +80,14 @@
 +{
 +    *field = *s;
 +    if( ! **s )
-+	return FALSE;
++        return FALSE;
 +    while( **s && ! isspace( **s ) )
-+	(*s)++;
++        (*s)++;
 +    if( ! **s )
-+	return TRUE;
++        return TRUE;
 +    *(*s)++ = 0;
 +    while( **s && isspace( **s ) )
-+	(*s)++;
++        (*s)++;
 +    return TRUE;
 +}
 +
@@ -90,13 +102,13 @@
 +    tmp.line = s;
 +
 +    if( ! ParseField( &s, &tmp.a_ref))
-+	return FALSE;
++        return FALSE;
 +    if( ! ParseField( &s, &tmp.a_pin ))
-+	return FALSE;
++        return FALSE;
 +    if( ! ParseField( &s, &tmp.b_ref))
-+	return FALSE;
++        return FALSE;
 +    if( ! ParseField( &s, &tmp.b_pin ))
-+	return FALSE;
++        return FALSE;
 +
 +    e = (struct exception*) MyMalloc( sizeof( *e ));
 +    *e = tmp;
@@ -121,40 +133,39 @@
 +    FreeExceptions();
 +    file = wxFopen( file_name, wxT( "r" ) );
 +    if( ! file )
-+	return FALSE;
++        return FALSE;
 +
 +    while( 1 )
 +    {
-+	s = fgets( buf, sizeof( buf ), file );
-+	if( ! s )
-+	    break;
++        s = fgets( buf, sizeof( buf ), file );
++        if( ! s )
++            break;
 +
-+	n++;
++        n++;
 +
-+	// remove comments
-+	hash = strchr( s, '#' );
-+	if( hash )
-+	    *hash = 0;
-+
-+	// skip leading whitespace
-+	while( *s && isspace( *s ) )
-+	    s++;
-+	if( ! *s )
-+	    continue;
-+
-+	tmp = (char*) MyMalloc( strlen( s ) + 1 );
-+	strcpy( tmp, s );
-+
-+	if( ! ParseException( tmp ) )
-+	{
-+	    wxString msg;
-+
-+	    msg.Printf( wxT( "Parse error at %s:%d" ),
-+	      CONV_TO_UTF8( file_name ), n );
-+	    DisplayError( NULL, msg );
-+	    MyFree( tmp );
-+	    break;
-+	}
++        // remove comments
++        hash = strchr( s, '#' );
++        if( hash )
++            *hash = 0;
++        
++        // skip leading whitespace
++        while( *s && isspace( *s ) )
++            s++;
++        if( ! *s )
++            continue;
++        
++        tmp = (char*) MyMalloc( strlen( s ) + 1 );
++        strcpy( tmp, s );
++        
++        if( ! ParseException( tmp ) )
++        {
++            wxString msg;
++        
++            msg.Printf( wxT( "Parse error at %s:%d" ), CONV_TO_UTF8(file_name), n );
++            DisplayError( NULL, msg );
++            MyFree( tmp );
++            break;
++        }
 +    }
 +
 +    fclose( file );
@@ -172,12 +183,12 @@
 +    fn = g_RootSheet->m_AssociatedScreen->m_FileName;
 +    fn.SetExt( wxT( "erx" ) );
 +    if ( LoadExceptionsByName( fn.GetFullPath() ) )
-+	g_EESchemaVar.NbExceptionErc = 0;
++        g_EESchemaVar.NbExceptionErc = 0;
 +}
 +
 +
 +/********************************************************************/
-+static bool FindException( ObjetNetListStruct* a, ObjetNetListStruct* b )
++static bool FindException( NETLIST_OBJECT* a, NETLIST_OBJECT* b )
 +/********************************************************************/
 +{
 +    SCH_COMPONENT* a_comp = (SCH_COMPONENT*) a->m_Link;
@@ -194,22 +205,22 @@
 +fprintf(stderr, "a) %s %4.4s =? %s %4.4s\n", e->a_ref, e->a_pin, a_ref, a_pin);
 +fprintf(stderr, "b) %s %4.4s =? %s %4.4s\n", e->b_ref, e->b_pin, b_ref, b_pin);
 +#endif
-+	if( strcmp( e->a_ref, a_ref ) )
-+	    continue;
-+	if( strncmp( e->a_pin, a_pin, 4 ) )
-+	    continue;
-+	if( strcmp( e->b_ref, b_ref ) )
-+	    continue;
-+	if( strncmp( e->b_pin, b_pin, 4 ) )
-+	    continue;
-+	return TRUE;
++        if( strcmp( e->a_ref, a_ref ) )
++            continue;
++        if( strncmp( e->a_pin, a_pin, 4 ) )
++            continue;
++        if( strcmp( e->b_ref, b_ref ) )
++            continue;
++        if( strncmp( e->b_pin, b_pin, 4 ) )
++            continue;
++        return TRUE;
 +    }
 +    return FALSE;
 +}
 +
 +
 +/********************************************************************/
-+static bool IsException( ObjetNetListStruct* a, ObjetNetListStruct* b )
++static bool IsException( NETLIST_OBJECT* a, NETLIST_OBJECT* b )
 +/********************************************************************/
 +{
 +    return FindException( a, b ) || FindException( b, a);
@@ -217,9 +228,9 @@
 +
 +
  /**************************************************/
- void WinEDA_ErcFrame::TestErc( wxCommandEvent& event )
+ void DIALOG_ERC::TestErc( wxArrayString* aMessagesList )
  /**************************************************/
-@@ -303,6 +485,7 @@
+@@ -248,6 +430,7 @@
  
      g_EESchemaVar.NbErrorErc   = 0;
      g_EESchemaVar.NbWarningErc = 0;
@@ -227,47 +238,47 @@
  
      /* Cleanup the entire hierarchy */
      EDA_ScreenList ScreenList;
-@@ -320,6 +503,8 @@
+@@ -272,6 +455,8 @@
  
      m_Parent->BuildNetListBase();
  
 +    LoadExceptions();
 +
-     /* Analyse de la table des connexions : */
-     Lim = g_TabObjNet + g_NbrObjNet;
+     /* Reset the flag m_FlagOfConnection, that will be used next, in calculations */
+     for( unsigned ii = 0;  ii < g_NetObjectslist.size(); ii++ )
+        g_NetObjectslist[ii]->m_FlagOfConnection = UNCONNECTED;
+@@ -339,7 +524,13 @@
  
-@@ -379,7 +564,13 @@
-     FreeTabNetList( g_TabObjNet, g_NbrObjNet );
- 
+     // Displays global results:
      wxString num;
 -    num.Printf( wxT( "%d" ), g_EESchemaVar.NbErrorErc );
 +
 +    if( g_EESchemaVar.NbExceptionErc >= 0)
-+	num.Printf( wxT( "%d (%d exception%s)" ), g_EESchemaVar.NbErrorErc,
-+	  g_EESchemaVar.NbExceptionErc,
-+	  g_EESchemaVar.NbExceptionErc == 1 ? wxT( "" ) : wxT( "s" ) );
++        num.Printf( wxT( "%d (%d exception%s)" ), g_EESchemaVar.NbErrorErc,
++          g_EESchemaVar.NbExceptionErc,
++          g_EESchemaVar.NbExceptionErc == 1 ? wxT( "" ) : wxT( "s" ) );
 +    else
-+	num.Printf( wxT( "%d" ), g_EESchemaVar.NbErrorErc );
++        num.Printf( wxT( "%d" ), g_EESchemaVar.NbErrorErc );
      m_TotalErrCount->SetLabel( num );
  
      num.Printf( wxT( "%d" ), g_EESchemaVar.NbErrorErc - g_EESchemaVar.NbWarningErc );
-@@ -693,6 +884,12 @@
-             if( NetItemTst->m_FlagOfConnection > 0 )
- 		break;
+@@ -619,6 +810,12 @@
+             if( g_NetObjectslist[NetItemTst]->m_FlagOfConnection > 0 )
+                 break;
  
-+	    if( IsException( NetItemRef, NetItemTst ) )
-+	    {
-+		g_EESchemaVar.NbExceptionErc++;
-+		break;
-+	    }
++            if( IsException( g_NetObjectslist[NetItemRef], g_NetObjectslist[NetItemTst] ) )
++            {
++                g_EESchemaVar.NbExceptionErc++;
++                break;
++            }
 +
-             Diagnose( panel, DC, NetItemRef, NetItemTst, 0, erc );
-             NetItemTst->m_FlagOfConnection = NOCONNECT;
+             Diagnose( panel, g_NetObjectslist[NetItemRef], g_NetObjectslist[NetItemTst], 0, erc );
+             g_NetObjectslist[NetItemTst]->m_FlagOfConnection = NOCONNECT_SYMBOL_PRESENT;
              break;
 Index: kicad/eeschema/general.h
 ===================================================================
---- kicad.orig/eeschema/general.h	2009-07-03 10:04:40.000000000 -0300
-+++ kicad/eeschema/general.h	2009-07-03 10:05:43.000000000 -0300
+--- kicad.orig/eeschema/general.h	2009-08-13 16:48:08.000000000 +0200
++++ kicad/eeschema/general.h	2009-08-13 16:49:08.000000000 +0200
 @@ -123,6 +123,7 @@
  {
      int NbErrorErc;

Modified: trunk/gta02-core/kicad-patches/fix-pinedit-collision.patch
===================================================================
--- trunk/gta02-core/kicad-patches/fix-pinedit-collision.patch	2009-08-13 10:57:39 UTC (rev 5434)
+++ trunk/gta02-core/kicad-patches/fix-pinedit-collision.patch	2009-08-13 19:49:35 UTC (rev 5435)
@@ -12,15 +12,15 @@
 
 Index: kicad/eeschema/pinedit.cpp
 ===================================================================
---- kicad.orig/eeschema/pinedit.cpp	2009-05-21 23:00:00.000000000 -0300
-+++ kicad/eeschema/pinedit.cpp	2009-05-21 23:00:12.000000000 -0300
+--- kicad.orig/eeschema/pinedit.cpp        2009-05-21 23:00:00.000000000 -0300
++++ kicad/eeschema/pinedit.cpp        2009-05-21 23:00:12.000000000 -0300
 @@ -193,6 +193,10 @@
              continue;
          if( newpos != Pin->m_Pos )
              continue;
 +        if( g_EditPinByPinIsOn &&
-+	    Pin->m_Unit != CurrentPin->m_Unit &&
-+	    Pin->m_Unit && CurrentPin->m_Unit )
++            Pin->m_Unit != CurrentPin->m_Unit &&
++            Pin->m_Unit && CurrentPin->m_Unit )
 +            continue;
          if( Pin->m_Flags )
              continue;

Modified: trunk/gta02-core/kicad-patches/series
===================================================================
--- trunk/gta02-core/kicad-patches/series	2009-08-13 10:57:39 UTC (rev 5434)
+++ trunk/gta02-core/kicad-patches/series	2009-08-13 19:49:35 UTC (rev 5435)
@@ -1,4 +1,4 @@
-# Based on SVN revision 1857
+# Based on SVN revision 1923
 
 # eeschema --plot extension, pending
 eeschema-plot-only-mode.patch

Modified: trunk/gta02-core/kicad-patches/streamline-erc.patch
===================================================================
--- trunk/gta02-core/kicad-patches/streamline-erc.patch	2009-08-13 10:57:39 UTC (rev 5434)
+++ trunk/gta02-core/kicad-patches/streamline-erc.patch	2009-08-13 19:49:35 UTC (rev 5435)
@@ -11,7 +11,7 @@
 ===================================================================
 --- kicad.orig/eeschema/erc.cpp	2009-07-03 05:00:34.000000000 -0300
 +++ kicad/eeschema/erc.cpp	2009-07-03 05:06:29.000000000 -0300
-@@ -683,18 +683,18 @@
+@@ -609,18 +609,18 @@
                  break;
  
              *NetNbItems += 1;
@@ -20,25 +20,25 @@
 -                erc = DiagErc[ref_elect_type][jj];
 -                if( erc != OK )
 -                {
--                    if( NetItemTst->m_FlagOfConnection == 0 )
+-                    if( g_NetObjectslist[NetItemTst]->m_FlagOfConnection == 0 )
 -                    {
--                        Diagnose( panel, DC, NetItemRef, NetItemTst, 0, erc );
--                        NetItemTst->m_FlagOfConnection = NOCONNECT;
+-                        Diagnose( panel, g_NetObjectslist[NetItemRef], g_NetObjectslist[NetItemTst], 0, erc );
+-                        g_NetObjectslist[NetItemTst]->m_FlagOfConnection = NOCONNECT_SYMBOL_PRESENT;
 -                    }
 -                }
 -            }
 +            if( erc != OK )         // 1 marqueur par pin maxi
-+		break;
++                break;
 +
 +            erc = DiagErc[ref_elect_type][jj];
 +            if( erc == OK )
-+		break;
++                break;
 +
-+            if( NetItemTst->m_FlagOfConnection > 0 )
-+		break;
++            if( g_NetObjectslist[NetItemTst]->m_FlagOfConnection > 0 )
++                break;
 +
-+            Diagnose( panel, DC, NetItemRef, NetItemTst, 0, erc );
-+            NetItemTst->m_FlagOfConnection = NOCONNECT;
++            Diagnose( panel, g_NetObjectslist[NetItemRef], g_NetObjectslist[NetItemTst], 0, erc );
++            g_NetObjectslist[NetItemTst]->m_FlagOfConnection = NOCONNECT_SYMBOL_PRESENT;
              break;
          }
      }




More information about the commitlog mailing list