fopen-same.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 "same" systems, where text and binary files are
  4. the same. An example is Unix. Many Unix systems could also add a
  5. "b" to 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-2022 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 "r"
  25. #define FOPEN_WB "w"
  26. #define FOPEN_AB "a"
  27. #define FOPEN_RUB "r+"
  28. #define FOPEN_WUB "w+"
  29. #define FOPEN_AUB "a+"
  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+"