Subversion Repositories gelsvn

Rev

Rev 375 | Rev 377 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 375 Rev 376
Line 63... Line 63...
63
    
63
    
64
    delete [] buf;
64
    delete [] buf;
65
    return in;
65
    return in;
66
  }
66
  }
67
 
67
 
68
  ifstream& read_until(ifstream& in, string& s_in, const string s, const size_t bufsize = 100)
68
  ifstream& read_until(ifstream& in, string& s_in, const string s, const size_t bufsize = 500)
69
  {
69
  {
70
    const int bsize = static_cast<int>(max(s.size(), bufsize));
70
    const int bsize = static_cast<int>(max(s.size(), bufsize));
71
    const int n = static_cast<int>(s.size());
71
    const int n = static_cast<int>(s.size());
72
    char* buf = new char[bsize + 1];
72
    char* buf = new char[bsize + 1];
73
    char s0 = s[0];
73
    char s0 = s[0];
Line 185... Line 185...
185
       cerr << "cannot open input file" << filename << endl;
185
       cerr << "cannot open input file" << filename << endl;
186
       return;
186
       return;
187
    }
187
    }
188
    
188
    
189
    if(infile >> head)
189
    if(infile >> head)
190
    {
-
 
191
      if(infile >> body)
190
      infile >> body;
192
      {
-
 
193
 
-
 
194
      }
-
 
195
    }
-
 
196
    else
191
    else
197
      cerr << filename << " is not a valid xml-file" << endl;
192
      cerr << filename << " is not a valid xml-file" << endl;
198
 
193
 
199
    infile.close();    
194
    infile.close();    
200
  }
195
  }