Extended the cFile interface with Printf()
git-svn-id: http://mc-server.googlecode.com/svn/trunk@901 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
fe61687b97
commit
cd5acb228c
@ -269,3 +269,17 @@ bool cFile::Exists(const AString & a_FileName)
|
||||
|
||||
|
||||
|
||||
|
||||
int cFile::Printf(const char * a_Fmt, ...)
|
||||
{
|
||||
AString buf;
|
||||
va_list args;
|
||||
va_start(args, a_Fmt);
|
||||
AppendVPrintf(buf, a_Fmt, args);
|
||||
va_end(args);
|
||||
return Write(buf.c_str(), buf.length());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -95,6 +95,8 @@ public:
|
||||
/// Returns true if the file specified exists
|
||||
static bool Exists(const AString & a_FileName);
|
||||
|
||||
int Printf(const char * a_Fmt, ...);
|
||||
|
||||
private:
|
||||
#ifdef USE_STDIO_FILE
|
||||
FILE * m_File;
|
||||
|
Loading…
Reference in New Issue
Block a user