version 1.13, 2002/08/23 13:28:36
|
version 1.14, 2002/08/29 00:27:52
|
|
|
parser::setInputBufferFromName(const String &filename) { | parser::setInputBufferFromName(const String &filename) { |
#ifdef PEGASUS_PLATFORM_OS400_ISERIES_IBM | #ifdef PEGASUS_PLATFORM_OS400_ISERIES_IBM |
// 't' not supported on OS/400 | // 't' not supported on OS/400 |
FILE *f = fopen(_CString(filename),"r"); |
FILE *f = fopen(filename.getCString(),"r"); |
#else | #else |
FILE *f = fopen(_CString(filename),"rt"); |
FILE *f = fopen(filename.getCString(),"rt"); |
#endif | #endif |
if (f) { | if (f) { |
set_current_filename(filename); | set_current_filename(filename); |
|
|
sprintf(buf, "%d", _lineno); | sprintf(buf, "%d", _lineno); |
String s = _current_filename + ":" + buf + ": " + errmsg + " before `" | String s = _current_filename + ":" + buf + ": " + errmsg + " before `" |
+ token + "'\n"; | + token + "'\n"; |
throw ParserLexException(_CString(s)); |
throw ParserLexException(s); |
} | } |