home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / unixtex-6.1b-src.tgz / tar.out / contrib / unixtex / kpathsea / c-fopen.h < prev    next >
C/C++ Source or Header  |  1996-09-28  |  2KB  |  58 lines

  1. /* c-fopen.h: how to open files with fopen.
  2.  
  3. Copyright (C) 1992, 94 Free Software Foundation, Inc.
  4.  
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2, or (at your option)
  8. any later version.
  9.  
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. GNU General Public License for more details.
  14.  
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. #ifndef C_FOPEN_H
  20. #define C_FOPEN_H
  21.  
  22. /* How to open a text file:  */
  23. #ifndef FOPEN_A_MODE
  24. #define FOPEN_A_MODE "a"
  25. #endif
  26.  
  27. #ifndef FOPEN_R_MODE
  28. #define FOPEN_R_MODE "r"
  29. #endif
  30.  
  31. #ifndef FOPEN_W_MODE
  32. #define FOPEN_W_MODE "w"
  33. #endif
  34.  
  35. /* How to open a binary file for reading:  */
  36. #ifndef FOPEN_RBIN_MODE
  37. #if defined (VMS) || defined (DOS) || defined (VMCMS)
  38. #define    FOPEN_RBIN_MODE    "rb"
  39. #else
  40. #define    FOPEN_RBIN_MODE    "r"
  41. #endif /* not (VM/CMS or DOS or VMS) */
  42. #endif /* not FOPEN_RBIN_MODE */
  43.  
  44. /* How to open a binary file for writing:  */
  45. #ifndef FOPEN_WBIN_MODE
  46. #ifdef DOS
  47. #define FOPEN_WBIN_MODE "wb"
  48. #else
  49. #ifdef VMCMS
  50. #define FOPEN_WBIN_MODE "wb, lrecl=1024, recfm=f"
  51. #else
  52. #define    FOPEN_WBIN_MODE    "w"
  53. #endif /* not VM/CMS */
  54. #endif /* not DOS */
  55. #endif /* not FOPEN_WBIN_MODE */
  56.  
  57. #endif /* not C_FOPEN_H */
  58.