Commit 7ce55e48 authored by diemer's avatar diemer

EESchema displays a warning now on a file format mismatch.

parent a015ff2a
...@@ -5,6 +5,11 @@ Started 2007-June-11 ...@@ -5,6 +5,11 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2008-Mar-30 UPDATE Jonas Diemer <diemer-at-gmx.de>
================================================================================
+eeschema
EESchema displays a warning now on a file format mismatch.
2008-Mar-31 UPDATE Dick Hollenbeck <dick@softplc.com> 2008-Mar-31 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================ ================================================================================
+all +all
......
...@@ -120,8 +120,20 @@ bool WinEDA_SchematicFrame::LoadOneEEFile( SCH_SCREEN* screen, const wxString& F ...@@ -120,8 +120,20 @@ bool WinEDA_SchematicFrame::LoadOneEEFile( SCH_SCREEN* screen, const wxString& F
fclose( f ); fclose( f );
return FALSE; return FALSE;
} }
//get the file version here. //get the file version here. TODO: Support version numbers > 9
char version = Line[9 + sizeof(SCHEMATIC_HEAD_STRING)]; char version = Line[9 + sizeof(SCHEMATIC_HEAD_STRING)];
int ver = version - '0';
if ( ver > EESCHEMA_VERSION )
{
MsgDiag = FullFileName + _( " was created by a more recent version of EESchema and may not load correctly. Please consider updating!");
DisplayInfo( this, MsgDiag);
}
else if ( ver < EESCHEMA_VERSION )
{
MsgDiag = FullFileName + _( " was created by an older version of EESchema. It will be stored in the new file format when you save this file again.");
DisplayInfo( this, MsgDiag);
}
LineCount++; LineCount++;
if( fgets( Line, 1024 - 1, f ) == NULL || strncmp( Line, "LIBS:", 5 ) != 0 ) if( fgets( Line, 1024 - 1, f ) == NULL || strncmp( Line, "LIBS:", 5 ) != 0 )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment