diff --git a/change_log.txt b/change_log.txt index 13e8e57012..6abaae9ba4 100644 --- a/change_log.txt +++ b/change_log.txt @@ -5,6 +5,11 @@ Started 2007-June-11 Please add newer entries at the top, list the date and your name with email address. +2008-Mar-30 UPDATE Jonas Diemer +================================================================================ ++eeschema + EESchema displays a warning now on a file format mismatch. + 2008-Mar-31 UPDATE Dick Hollenbeck ================================================================================ +all diff --git a/eeschema/load_one_schematic_file.cpp b/eeschema/load_one_schematic_file.cpp index 0d22abbe1f..1f325929a9 100644 --- a/eeschema/load_one_schematic_file.cpp +++ b/eeschema/load_one_schematic_file.cpp @@ -120,8 +120,20 @@ bool WinEDA_SchematicFrame::LoadOneEEFile( SCH_SCREEN* screen, const wxString& F fclose( f ); 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)]; + 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++; if( fgets( Line, 1024 - 1, f ) == NULL || strncmp( Line, "LIBS:", 5 ) != 0 ) {