fopen-bin.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* Macros for the 'type' part of an fopen, freopen or fdopen.
  2. <Read|Write>[Update]<Binary file|text file>
  3. This version is for "binary" systems, where text and binary files are
  4. different. An example is Mess-Dose. Many Unix systems could also
  5. cope with a "b" in the string, indicating binary files, but some reject this
  6. (and thereby don't conform to ANSI C, but what else is new?).
  7. Copyright (C) 1996-2015 Free Software Foundation, Inc.
  8. This program is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 2, or (at your option)
  11. any later version.
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. GNU General Public License for more details.
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 51 Franklin Street - Fifth Floor,
  19. Boston, MA 02110-1301, USA. */
  20. /* This file is designed for inclusion by host-dependent .h files. No
  21. user application should include it directly, since that would make
  22. the application unable to be configured for both "same" and "binary"
  23. variant systems. */
  24. #define FOPEN_RB "rb"
  25. #define FOPEN_WB "wb"
  26. #define FOPEN_AB "ab"
  27. #define FOPEN_RUB "r+b"
  28. #define FOPEN_WUB "w+b"
  29. #define FOPEN_AUB "a+b"
  30. #define FOPEN_RT "r"
  31. #define FOPEN_WT "w"
  32. #define FOPEN_AT "a"
  33. #define FOPEN_RUT "r+"
  34. #define FOPEN_WUT "w+"
  35. #define FOPEN_AUT "a+"