home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / unix / unxfiles.sit / source / Mac / my_stdio.c next >
Text File  |  1989-11-21  |  374b  |  15 lines

  1. /* for multi-volume file systems; set up for Mac */
  2.  
  3. #include <string.h>
  4. #include "my_stdio.h"
  5.  
  6. int invol, outvol;
  7.  
  8. /* sets Macintosh volume, possibly a WDRefNum, before fopen()ing */
  9.  
  10. FILE *my_fopen ( char *filename, char *mode ) {
  11.     int theVol = ( ( 'r' == *mode ) ? invol : outvol );
  12.     if ( SetVol ( nil, theVol ) )
  13.         return ( nil );
  14.     return ( fopen ( filename, mode ) );
  15. }