home *** CD-ROM | disk | FTP | other *** search
-
- #include "LStResources.h"
-
- #ifdef FILE
- #undef FILE
- #endif
-
- #define FILE _file
-
- #define macFileTypeToSt(mft, sft) \
- if (mft == kTextType) \
- sft = 1; \
- else if (mft == kSysImageType) \
- sft = 2; \
- else \
- sft = 0; \
-
- #define stFileTypeToMac(sft, mft) \
- if (sft == 1) \
- mft = kTextType; \
- else if (sft == 2) \
- mft = kSysImageType; \
- else \
- mft = 0L; \
-
- typedef struct {
- short openMode;
- short fileRef;
- } _file;
-
- void getPathName (short volRef, long dirID, char *fullPath);
- void getPathNameFromWD (long dirID, char *fullPath);
- char *mac_fgets (char *buf, short n, FILE *fd);
- int mac_fputs (char *str, FILE *fd);
- static long fr (short fnum, char *p, long s);
- void imageRead (short fnum);
- static void fw (short fnum, char *p, long s);
- void imageWrite (short fnum);
- FILE *getFilePointer (short fileNum);
- OSErr createFile (Str255 *fname, short ft);
- OSErr openFile (FILE *fd, char *fname, char *openParms, short ftype);
- void closeFile (FILE *fd, char *fname);
- object ioPrimitive (int number, object *arguments);
-