Diff of /src/org/esb/io/FileInputStream.cpp [1312d5] .. [7375ab]  Maximize  Restore

Switch to unified view

a/src/org/esb/io/FileInputStream.cpp b/src/org/esb/io/FileInputStream.cpp
...
...
68
  str = string(buffer, size);
68
  str = string(buffer, size);
69
  delete []buffer;
69
  delete []buffer;
70
  return read;
70
  return read;
71
}
71
}
72
int FileInputStream::readLine(string & str) {
72
int FileInputStream::readLine(string & str) {
73
  char * line=NULL;
73
/*  char * line=NULL;
74
  size_t size=0;
74
  size_t size=0;
75
  int read=getline(&line, &size, _file_handle);
75
  int read=std::getline(&line, &size, _file_handle);
76
  _filePointer -= read;
76
  _filePointer -= read;
77
  if(read>0)
77
  if(read>0)
78
    str.assign(line, read-1);
78
    str.assign(line, read-1);
79
  free(line);
79
  free(line);
80
 return read;
80
 return read;*/
81
  return 0;
81
}
82
}
82
83
83
int FileInputStream::read(unsigned char * buffer, int length) {
84
int FileInputStream::read(unsigned char * buffer, int length) {
84
  int read = fread((char*) buffer, 1, length, _file_handle);
85
  int read = fread((char*) buffer, 1, length, _file_handle);
85
  _filePointer -= read;
86
  _filePointer -= read;

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks