Пример #1
0
void TZipOut::Flush(){
  FlushBf();
  #ifdef GLib_WIN
  EAssertR(FlushFileBuffers(ZipStdinWr)!=0, "Can not flush file '"+GetSNm()+"'.");
  #else
  EAssertR(fflush(ZipStdinWr)==0, "Can not flush file '"+GetSNm()+"'.");
  #endif
}
Пример #2
0
TZipOut::~TZipOut() {
  if (BfL!=0) { FlushBf(); }
  #ifdef GLib_WIN
  if (ZipStdinWr != NULL) { EAssertR(CloseHandle(ZipStdinWr), "Closing write-end of pipe failed"); }
  if (ZipStdinRd != NULL) { EAssertR(CloseHandle(ZipStdinRd), "Closing read-end of pipe failed"); }
  #else
  if (ZipStdinWr != NULL) { EAssertR(pclose(ZipStdinWr) != -1, "Closing of the process failed"); }
  #endif
  if (Bf!=NULL) { delete[] Bf; }
}
Пример #3
0
void TFOut::Flush(){
  FlushBf();
  EAssertR(fflush(FileId)==0, "Can not flush file '"+GetSNm()+"'.");
}
Пример #4
0
int TFOut::PutCh(const char& Ch){
  if (BfL==TSize(MxBfL)){FlushBf();}
  return Bf[BfL++]=Ch;
}
Пример #5
0
TFOut::~TFOut(){
  if (FileId!=NULL){FlushBf();}
  if (Bf!=NULL){delete[] Bf;}
  if (FileId!=NULL){
    EAssertR(fclose(FileId)==0, "Can not close file '"+GetSNm()+"'.");}
}
Пример #6
0
int TZipOut::PutCh(const char& Ch){
  if (BfL==MxBfL) {FlushBf();}
  return Bf[BfL++]=Ch;
}