bin_file.cpp 434 B

1234567891011121314151617181920
  1. //
  2. // $Id$
  3. //
  4. #include<__vic/bin_file.h>
  5. #include<cstdio>
  6. namespace __vic {
  7. //----------------------------------------------------------------------------
  8. bool bin_file::open_(const char *fname, char mode_char)
  9. {
  10. char mode[3] = { mode_char, 'b', '\x0' };
  11. if(f.open(fname, mode)) std::setbuf(f, nullptr);
  12. return is_open();
  13. }
  14. //----------------------------------------------------------------------------
  15. } // namespace