io.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Copyright (C) 2003 Mooffie <mooffie@typo.co.il>
  2. //
  3. // This program is free software; you can redistribute it and/or modify
  4. // it under the terms of the GNU General Public License as published by
  5. // the Free Software Foundation; either version 2 of the License, or
  6. // (at your option) any later version.
  7. //
  8. // This program is distributed in the hope that it will be useful,
  9. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. // GNU General Public License for more details.
  12. //
  13. // You should have received a copy of the GNU General Public License
  14. // along with this program; if not, write to the Free Software
  15. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
  16. #ifndef BDE_IO_H
  17. #define BDE_IO_H
  18. #include "types.h"
  19. class EditBox;
  20. bool xload_file(EditBox *editbox,
  21. const char *filename,
  22. const char *specified_encoding,
  23. const char *default_encoding,
  24. u8string &effective_encoding,
  25. bool &is_new,
  26. bool new_document);
  27. bool xsave_file(EditBox *editbox,
  28. const char *filename,
  29. const char *specified_encoding,
  30. const char *backup_suffix,
  31. unichar &offending_char,
  32. bool selection_only = false);
  33. void set_last_error(const char *fmt, ...);
  34. void set_last_error(int err);
  35. const char *get_last_error();
  36. bool has_prog(const char *progname);
  37. void expand_tilde(u8string &filename);
  38. const char *get_cfg_filename(const char *tmplt);
  39. #endif