Recovered from cvs revision 2007-09-06 08:44:00

This commit is contained in:
2007-09-06 23:38:00 +00:00
parent 3b147b3ebd
commit 495d085cba
4 changed files with 33 additions and 6 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: StdAwk.cpp,v 1.9 2007/09/01 15:43:16 bacon Exp $
* $Id: StdAwk.cpp,v 1.10 2007/09/05 14:42:06 bacon Exp $
*/
#include "stdafx.h"
@ -214,15 +214,22 @@ namespace ASE
int StdAwk::CloseFile (File^ file)
{
if (file->Mode == File::MODE::READ)
if (file->Mode->Equals(File::MODE::READ))
{
System::IO::StreamReader^ sr = (System::IO::StreamReader^)file->Handle;
sr->Close ();
}
else
{
try{
System::IO::StreamWriter^ sw = (System::IO::StreamWriter^)file->Handle;
sw->Close ();
}
catch (...)
{
System::Diagnostics::Debug::Print ("XXXXXX");
}
}
return 0;
}