pandaFileStream

This commit is contained in:
David Rose 2008-09-09 00:13:09 +00:00
parent 964c76f2e0
commit 0e5cc07f83
3 changed files with 6 additions and 3 deletions

View File

@ -153,7 +153,7 @@ read(Filename filename) {
#else // WITHIN_PANDA #else // WITHIN_PANDA
ifstream in; pifstream in;
in.open(filename.c_str()); in.open(filename.c_str());
if (!in) { if (!in) {
@ -204,7 +204,7 @@ read(istream &in, const string &filename) {
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
bool DCFile:: bool DCFile::
write(Filename filename, bool brief) const { write(Filename filename, bool brief) const {
ofstream out; pofstream out;
#ifdef WITHIN_PANDA #ifdef WITHIN_PANDA
filename.set_text(); filename.set_text();

View File

@ -115,6 +115,9 @@ typedef unsigned char PN_uint8;
typedef unsigned short PN_uint16; typedef unsigned short PN_uint16;
typedef unsigned int PN_uint32; typedef unsigned int PN_uint32;
typedef ifstream pifstream;
typedef ofstream pofstream;
typedef fstream pfstream;
#endif // WITHIN_PANDA #endif // WITHIN_PANDA

View File

@ -61,7 +61,7 @@ DirectDServer::handle_command(const string& cmd) {
void void
DirectDServer::read_command(string& cmd) { DirectDServer::read_command(string& cmd) {
try { try {
ifstream f; pifstream f;
f.open("directdCommand", ios::in | ios::binary); f.open("directdCommand", ios::in | ios::binary);
stringstream ss; stringstream ss;
const int buf_size=512; const int buf_size=512;