Browse Source

pandaFileStream

David Rose 17 years ago
parent
commit
0e5cc07f83

+ 2 - 2
direct/src/dcparser/dcFile.cxx

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

+ 3 - 0
direct/src/dcparser/dcbase.h

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

+ 1 - 1
direct/src/directdServer/directdServer.cxx

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