2007-08-20 01:20:48 +00:00
|
|
|
/****************************************/
|
2009-11-04 20:46:53 +00:00
|
|
|
/* Module to load/save EESchema files. */
|
2007-08-20 01:20:48 +00:00
|
|
|
/****************************************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#include "fctsys.h"
|
2009-02-04 15:25:03 +00:00
|
|
|
#include "confirm.h"
|
|
|
|
#include "kicad_string.h"
|
2010-11-10 15:30:12 +00:00
|
|
|
#include "wxEeschemaStruct.h"
|
|
|
|
#include "class_sch_screen.h"
|
|
|
|
#include "richio.h"
|
2009-09-25 18:49:04 +00:00
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
#include "general.h"
|
|
|
|
#include "protos.h"
|
2010-12-21 15:13:09 +00:00
|
|
|
#include "sch_bus_entry.h"
|
2010-11-11 21:10:27 +00:00
|
|
|
#include "sch_marker.h"
|
2011-01-12 21:47:54 +00:00
|
|
|
#include "sch_junction.h"
|
2010-12-21 15:13:09 +00:00
|
|
|
#include "sch_line.h"
|
|
|
|
#include "sch_no_connect.h"
|
2010-11-11 21:10:27 +00:00
|
|
|
#include "sch_component.h"
|
2010-12-21 15:13:09 +00:00
|
|
|
#include "sch_polyline.h"
|
2010-11-11 21:10:27 +00:00
|
|
|
#include "sch_text.h"
|
|
|
|
#include "sch_sheet.h"
|
2009-04-05 20:49:15 +00:00
|
|
|
|
|
|
|
|
2010-11-03 14:13:15 +00:00
|
|
|
bool ReadSchemaDescr( LINE_READER* aLine, wxString& aMsgDiag, BASE_SCREEN* Window );
|
2009-04-05 20:49:15 +00:00
|
|
|
|
2010-10-21 00:18:42 +00:00
|
|
|
static void LoadLayers( LINE_READER* aLine );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
/**
|
|
|
|
* Routine to load an EESchema file.
|
2008-12-19 20:40:08 +00:00
|
|
|
* Returns true if file has been loaded (at least partially.)
|
2007-08-20 01:20:48 +00:00
|
|
|
*/
|
2010-12-08 20:12:46 +00:00
|
|
|
bool SCH_EDIT_FRAME::LoadOneEEFile( SCH_SCREEN* screen, const wxString& FullFileName )
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2010-11-10 15:30:12 +00:00
|
|
|
char Name1[256];
|
2010-11-11 21:46:55 +00:00
|
|
|
bool itemLoaded = false;
|
2010-11-10 15:30:12 +00:00
|
|
|
SCH_ITEM* Phead;
|
|
|
|
SCH_ITEM* Pnext;
|
|
|
|
SCH_ITEM* item;
|
2010-08-31 10:44:38 +00:00
|
|
|
wxString MsgDiag; // Error and log messages
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2010-10-21 00:18:42 +00:00
|
|
|
#define line ((char*)reader)
|
2007-08-20 01:20:48 +00:00
|
|
|
|
|
|
|
if( screen == NULL )
|
|
|
|
return FALSE;
|
2010-08-31 10:44:38 +00:00
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
if( FullFileName.IsEmpty() )
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
screen->SetCurItem( NULL );
|
2011-01-20 16:34:57 +00:00
|
|
|
screen->SetFileName( FullFileName );
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2010-08-31 10:44:38 +00:00
|
|
|
// D(printf("LoadOneEEFile:%s\n", CONV_TO_UTF8( FullFileName ) ); )
|
|
|
|
|
2010-10-21 00:18:42 +00:00
|
|
|
FILE* f;
|
2007-08-20 01:20:48 +00:00
|
|
|
if( ( f = wxFopen( FullFileName, wxT( "rt" ) ) ) == NULL )
|
|
|
|
{
|
|
|
|
MsgDiag = _( "Failed to open " ) + FullFileName;
|
|
|
|
DisplayError( this, MsgDiag );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2010-10-21 00:18:42 +00:00
|
|
|
// reader now owns the open FILE.
|
|
|
|
FILE_LINE_READER reader( f, FullFileName );
|
|
|
|
|
2011-01-20 16:34:57 +00:00
|
|
|
MsgDiag = _( "Loading " ) + screen->GetFileName();
|
2007-08-20 01:20:48 +00:00
|
|
|
PrintMsg( MsgDiag );
|
|
|
|
|
2010-10-21 00:18:42 +00:00
|
|
|
if( !reader.ReadLine()
|
2010-11-10 15:30:12 +00:00
|
|
|
|| strncmp( line + 9, SCHEMATIC_HEAD_STRING, sizeof(SCHEMATIC_HEAD_STRING) - 1 ) != 0 )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2008-04-06 16:05:23 +00:00
|
|
|
MsgDiag = FullFileName + _( " is NOT an EESchema file!" );
|
2007-08-20 01:20:48 +00:00
|
|
|
DisplayError( this, MsgDiag );
|
|
|
|
return FALSE;
|
|
|
|
}
|
2008-10-06 05:44:29 +00:00
|
|
|
|
2010-11-12 18:38:48 +00:00
|
|
|
// get the file version here.
|
|
|
|
char *strversion = line + 9 + sizeof(SCHEMATIC_HEAD_STRING);
|
|
|
|
// Skip blanks
|
|
|
|
while( *strversion && *strversion < '0' )
|
|
|
|
strversion++;
|
|
|
|
int version = atoi(strversion);
|
|
|
|
|
|
|
|
if( version > EESCHEMA_VERSION )
|
2008-04-06 15:12:24 +00:00
|
|
|
{
|
2009-05-21 17:42:42 +00:00
|
|
|
MsgDiag = FullFileName + _( " was created by a more recent \
|
|
|
|
version of EESchema and may not load correctly. Please consider updating!" );
|
2009-04-17 08:51:02 +00:00
|
|
|
DisplayInfoMessage( this, MsgDiag );
|
2008-04-06 15:12:24 +00:00
|
|
|
}
|
2008-12-19 20:40:08 +00:00
|
|
|
|
2008-04-15 19:38:19 +00:00
|
|
|
#if 0
|
2008-12-19 20:40:08 +00:00
|
|
|
// Compile it if the new version is unreadable by previous eeschema versions
|
2010-11-12 18:38:48 +00:00
|
|
|
else if( version < EESCHEMA_VERSION )
|
2008-04-06 15:12:24 +00:00
|
|
|
{
|
2009-05-21 17:42:42 +00:00
|
|
|
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." );
|
|
|
|
|
2009-04-17 08:51:02 +00:00
|
|
|
DisplayInfoMessage( this, MsgDiag );
|
2008-04-06 15:12:24 +00:00
|
|
|
}
|
2008-04-15 19:38:19 +00:00
|
|
|
#endif
|
2008-04-06 15:12:24 +00:00
|
|
|
|
2010-10-21 00:18:42 +00:00
|
|
|
if( !reader.ReadLine() || strncmp( line, "LIBS:", 5 ) != 0 )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2008-04-06 16:05:23 +00:00
|
|
|
MsgDiag = FullFileName + _( " is NOT an EESchema file!" );
|
2007-08-20 01:20:48 +00:00
|
|
|
DisplayError( this, MsgDiag );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2010-10-21 00:18:42 +00:00
|
|
|
LoadLayers( &reader );
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2010-10-21 00:18:42 +00:00
|
|
|
while( reader.ReadLine() )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2010-11-10 15:30:12 +00:00
|
|
|
item = NULL;
|
|
|
|
|
2010-10-21 00:18:42 +00:00
|
|
|
char* sline = line;
|
|
|
|
while( (*sline != ' ' ) && *sline )
|
|
|
|
sline++;
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2010-10-21 00:18:42 +00:00
|
|
|
switch( line[0] )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2010-08-31 10:44:38 +00:00
|
|
|
case '$': // identification block
|
2010-10-21 00:18:42 +00:00
|
|
|
if( line[1] == 'C' )
|
2010-11-10 15:30:12 +00:00
|
|
|
item = new SCH_COMPONENT();
|
2010-10-21 00:18:42 +00:00
|
|
|
else if( line[1] == 'S' )
|
2010-11-10 15:30:12 +00:00
|
|
|
item = new SCH_SHEET();
|
2010-10-21 00:18:42 +00:00
|
|
|
else if( line[1] == 'D' )
|
2010-11-10 15:30:12 +00:00
|
|
|
itemLoaded = ReadSchemaDescr( &reader, MsgDiag, screen );
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
2010-08-31 10:44:38 +00:00
|
|
|
case 'L': // Its a library item.
|
2010-11-10 15:30:12 +00:00
|
|
|
item = new SCH_COMPONENT();
|
2009-11-04 20:46:53 +00:00
|
|
|
break;
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2010-08-31 10:44:38 +00:00
|
|
|
case 'W': // Its a Segment (WIRE or BUS) item.
|
2010-11-10 15:30:12 +00:00
|
|
|
item = new SCH_LINE();
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
2010-08-31 10:44:38 +00:00
|
|
|
case 'E': // Its a WIRE or BUS item.
|
2010-11-10 15:30:12 +00:00
|
|
|
item = new SCH_BUS_ENTRY();
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
2010-08-31 10:44:38 +00:00
|
|
|
case 'P': // Its a polyline item.
|
2010-11-10 15:30:12 +00:00
|
|
|
item = new SCH_POLYLINE();
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
2010-11-10 15:30:12 +00:00
|
|
|
case 'C': // It is a connection item.
|
|
|
|
item = new SCH_JUNCTION();
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
2010-08-31 10:44:38 +00:00
|
|
|
case 'K': // It is a Marker item.
|
2009-11-04 20:46:53 +00:00
|
|
|
// Markers are no more read from file. they are only created on
|
|
|
|
// demand in schematic
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
2010-11-10 15:30:12 +00:00
|
|
|
case 'N': // It is a NoConnect item.
|
|
|
|
item = new SCH_NO_CONNECT();
|
|
|
|
break;
|
|
|
|
|
2010-08-31 10:44:38 +00:00
|
|
|
case 'T': // It is a text item.
|
2010-11-10 15:30:12 +00:00
|
|
|
if( sscanf( sline, "%s", Name1 ) != 1 )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2010-11-10 15:30:12 +00:00
|
|
|
MsgDiag.Printf( wxT( "EESchema file text load error at line %d" ),
|
|
|
|
reader.LineNumber() );
|
|
|
|
itemLoaded = false;
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
2010-11-10 15:30:12 +00:00
|
|
|
else if( Name1[0] == 'L' )
|
|
|
|
item = new SCH_LABEL();
|
2010-11-12 18:38:48 +00:00
|
|
|
else if( Name1[0] == 'G' && version > 1 )
|
2010-11-10 15:30:12 +00:00
|
|
|
item = new SCH_GLOBALLABEL();
|
2010-11-12 18:38:48 +00:00
|
|
|
else if( (Name1[0] == 'H') || (Name1[0] == 'G' && version == 1) )
|
2010-11-10 15:30:12 +00:00
|
|
|
item = new SCH_HIERLABEL();
|
|
|
|
else
|
|
|
|
item = new SCH_TEXT();
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2010-11-10 15:30:12 +00:00
|
|
|
itemLoaded = false;
|
2009-05-21 17:42:42 +00:00
|
|
|
MsgDiag.Printf( wxT( "EESchema file undefined object at line %d, aborted" ),
|
2010-10-21 00:18:42 +00:00
|
|
|
reader.LineNumber() );
|
|
|
|
MsgDiag << wxT( "\n" ) << CONV_FROM_UTF8( line );
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
|
|
|
|
2010-11-10 15:30:12 +00:00
|
|
|
if( item )
|
|
|
|
{
|
|
|
|
itemLoaded = item->Load( reader, MsgDiag );
|
|
|
|
|
|
|
|
if( !itemLoaded )
|
|
|
|
{
|
|
|
|
SAFE_DELETE( item );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-12-08 20:12:46 +00:00
|
|
|
item->SetNext( screen->GetDrawItems() );
|
|
|
|
screen->SetDrawItems( item );
|
2010-11-10 15:30:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if( !itemLoaded )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
|
|
|
DisplayError( this, MsgDiag );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-12-08 20:12:46 +00:00
|
|
|
/* GetDrawItems() was constructed in reverse order - reverse it back: */
|
2007-08-20 01:20:48 +00:00
|
|
|
Phead = NULL;
|
2010-12-08 20:12:46 +00:00
|
|
|
|
|
|
|
while( screen->GetDrawItems() )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2010-12-08 20:12:46 +00:00
|
|
|
Pnext = screen->GetDrawItems();
|
|
|
|
screen->SetDrawItems( screen->GetDrawItems()->Next() );
|
2008-11-24 06:53:43 +00:00
|
|
|
Pnext->SetNext( Phead );
|
2007-08-20 01:20:48 +00:00
|
|
|
Phead = Pnext;
|
|
|
|
}
|
|
|
|
|
2010-12-08 20:12:46 +00:00
|
|
|
screen->SetDrawItems( Phead );
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2008-10-06 05:44:29 +00:00
|
|
|
#if 0 && defined (DEBUG)
|
2007-09-20 21:06:49 +00:00
|
|
|
screen->Show( 0, std::cout );
|
|
|
|
#endif
|
2008-03-20 01:50:21 +00:00
|
|
|
|
2011-01-21 19:30:59 +00:00
|
|
|
screen->TestDanglingEnds();
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2011-01-20 16:34:57 +00:00
|
|
|
MsgDiag = _( "Done Loading " ) + screen->GetFileName();
|
2008-03-20 01:50:21 +00:00
|
|
|
PrintMsg( MsgDiag );
|
|
|
|
|
2010-08-31 10:44:38 +00:00
|
|
|
return true; // Although it may be that file is only partially loaded.
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2010-10-21 00:18:42 +00:00
|
|
|
static void LoadLayers( LINE_READER* aLine )
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2009-03-15 21:13:56 +00:00
|
|
|
int Number;
|
2007-08-20 01:20:48 +00:00
|
|
|
|
2009-03-15 21:13:56 +00:00
|
|
|
//int Mode,Color,Layer;
|
2007-08-20 01:20:48 +00:00
|
|
|
char Name[256];
|
|
|
|
|
2010-10-21 00:18:42 +00:00
|
|
|
aLine->ReadLine();
|
2009-03-15 21:13:56 +00:00
|
|
|
|
2010-10-21 00:18:42 +00:00
|
|
|
sscanf( *aLine, "%s %d %d", Name, &Number, &g_LayerDescr.CurrentLayer );
|
2007-08-20 01:20:48 +00:00
|
|
|
if( strcmp( Name, "EELAYER" ) !=0 )
|
|
|
|
{
|
2009-11-04 20:46:53 +00:00
|
|
|
/* error : init par default */
|
2007-08-20 01:20:48 +00:00
|
|
|
Number = MAX_LAYER;
|
|
|
|
}
|
2009-03-15 21:13:56 +00:00
|
|
|
|
2007-08-20 01:20:48 +00:00
|
|
|
if( Number <= 0 )
|
|
|
|
Number = MAX_LAYER;
|
|
|
|
if( Number > MAX_LAYER )
|
|
|
|
Number = MAX_LAYER;
|
|
|
|
|
|
|
|
g_LayerDescr.NumberOfLayers = Number;
|
|
|
|
|
2010-10-21 00:18:42 +00:00
|
|
|
while( aLine->ReadLine() )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2010-10-21 00:18:42 +00:00
|
|
|
if( strnicmp( *aLine, "EELAYER END", 11 ) == 0 )
|
2007-08-20 01:20:48 +00:00
|
|
|
break;
|
|
|
|
}
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
2010-11-10 15:30:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* Read the schematic header. */
|
2010-12-08 20:12:46 +00:00
|
|
|
bool ReadSchemaDescr( LINE_READER* aLine, wxString& aMsgDiag, BASE_SCREEN* aScreen )
|
2010-11-10 15:30:12 +00:00
|
|
|
{
|
|
|
|
char Text[256], buf[1024];
|
|
|
|
int ii;
|
|
|
|
Ki_PageDescr* wsheet = &g_Sheet_A4;
|
|
|
|
static Ki_PageDescr* SheetFormatList[] =
|
|
|
|
{
|
|
|
|
&g_Sheet_A4, &g_Sheet_A3, &g_Sheet_A2, &g_Sheet_A1, &g_Sheet_A0,
|
|
|
|
&g_Sheet_A, &g_Sheet_B, &g_Sheet_C, &g_Sheet_D, &g_Sheet_E,
|
|
|
|
&g_Sheet_user, NULL
|
|
|
|
};
|
|
|
|
wxSize PageSize;
|
|
|
|
|
|
|
|
sscanf( ((char*)(*aLine)), "%s %s %d %d", Text, Text, &PageSize.x, &PageSize.y );
|
|
|
|
|
|
|
|
wxString pagename = CONV_FROM_UTF8( Text );
|
2010-12-08 20:12:46 +00:00
|
|
|
|
2010-11-10 15:30:12 +00:00
|
|
|
for( ii = 0; SheetFormatList[ii] != NULL; ii++ )
|
|
|
|
{
|
|
|
|
wsheet = SheetFormatList[ii];
|
2010-12-08 20:12:46 +00:00
|
|
|
|
2010-11-10 15:30:12 +00:00
|
|
|
if( wsheet->m_Name.CmpNoCase( pagename ) == 0 ) /* Descr found ! */
|
|
|
|
{
|
|
|
|
// Get the user page size and make it the default
|
|
|
|
if( wsheet == &g_Sheet_user )
|
|
|
|
{
|
|
|
|
g_Sheet_user.m_Size = PageSize;
|
|
|
|
}
|
2010-12-08 20:12:46 +00:00
|
|
|
|
2010-11-10 15:30:12 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if( SheetFormatList[ii] == NULL )
|
|
|
|
{
|
|
|
|
aMsgDiag.Printf( wxT( "EESchema file dimension definition error \
|
|
|
|
line %d, \aAbort reading file.\n" ),
|
|
|
|
aLine->LineNumber() );
|
|
|
|
aMsgDiag << CONV_FROM_UTF8( ((char*)(*aLine)) );
|
|
|
|
}
|
|
|
|
|
2010-12-08 20:12:46 +00:00
|
|
|
aScreen->m_CurrentSheetDesc = wsheet;
|
2010-11-10 15:30:12 +00:00
|
|
|
|
|
|
|
for( ; ; )
|
|
|
|
{
|
|
|
|
if( !aLine->ReadLine() )
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
if( strnicmp( ((char*)(*aLine)), "$End", 4 ) == 0 )
|
|
|
|
break;
|
|
|
|
|
|
|
|
if( strnicmp( ((char*)(*aLine)), "Sheet", 2 ) == 0 )
|
|
|
|
sscanf( ((char*)(*aLine)) + 5, " %d %d",
|
2010-12-08 20:12:46 +00:00
|
|
|
&aScreen->m_ScreenNumber, &aScreen->m_NumberOfScreen );
|
2010-11-10 15:30:12 +00:00
|
|
|
|
|
|
|
if( strnicmp( ((char*)(*aLine)), "Title", 2 ) == 0 )
|
|
|
|
{
|
|
|
|
ReadDelimitedText( buf, ((char*)(*aLine)), 256 );
|
2010-12-08 20:12:46 +00:00
|
|
|
aScreen->m_Title = CONV_FROM_UTF8( buf );
|
2010-11-10 15:30:12 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( strnicmp( ((char*)(*aLine)), "Date", 2 ) == 0 )
|
|
|
|
{
|
|
|
|
ReadDelimitedText( buf, ((char*)(*aLine)), 256 );
|
2010-12-08 20:12:46 +00:00
|
|
|
aScreen->m_Date = CONV_FROM_UTF8( buf );
|
2010-11-10 15:30:12 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( strnicmp( ((char*)(*aLine)), "Rev", 2 ) == 0 )
|
|
|
|
{
|
|
|
|
ReadDelimitedText( buf, ((char*)(*aLine)), 256 );
|
2010-12-08 20:12:46 +00:00
|
|
|
aScreen->m_Revision = CONV_FROM_UTF8( buf );
|
2010-11-10 15:30:12 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( strnicmp( ((char*)(*aLine)), "Comp", 4 ) == 0 )
|
|
|
|
{
|
|
|
|
ReadDelimitedText( buf, ((char*)(*aLine)), 256 );
|
2010-12-08 20:12:46 +00:00
|
|
|
aScreen->m_Company = CONV_FROM_UTF8( buf );
|
2010-11-10 15:30:12 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( strnicmp( ((char*)(*aLine)), "Comment1", 8 ) == 0 )
|
|
|
|
{
|
|
|
|
ReadDelimitedText( buf, ((char*)(*aLine)), 256 );
|
2010-12-08 20:12:46 +00:00
|
|
|
aScreen->m_Commentaire1 = CONV_FROM_UTF8( buf );
|
2010-11-10 15:30:12 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( strnicmp( ((char*)(*aLine)), "Comment2", 8 ) == 0 )
|
|
|
|
{
|
|
|
|
ReadDelimitedText( buf, ((char*)(*aLine)), 256 );
|
2010-12-08 20:12:46 +00:00
|
|
|
aScreen->m_Commentaire2 = CONV_FROM_UTF8( buf );
|
2010-11-10 15:30:12 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( strnicmp( ((char*)(*aLine)), "Comment3", 8 ) == 0 )
|
|
|
|
{
|
|
|
|
ReadDelimitedText( buf, ((char*)(*aLine)), 256 );
|
2010-12-08 20:12:46 +00:00
|
|
|
aScreen->m_Commentaire3 = CONV_FROM_UTF8( buf );
|
2010-11-10 15:30:12 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( strnicmp( ((char*)(*aLine)), "Comment4", 8 ) == 0 )
|
|
|
|
{
|
|
|
|
ReadDelimitedText( buf, ((char*)(*aLine)), 256 );
|
2010-12-08 20:12:46 +00:00
|
|
|
aScreen->m_Commentaire4 = CONV_FROM_UTF8( buf );
|
2010-11-10 15:30:12 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|