home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garbo
/
Garbo.cdr
/
mac
/
source
/
macify13.shr
/
macify.hqx
/
Source
/
U
/
Utils_Macify.c
< prev
next >
Wrap
Text File
|
1991-03-15
|
2KB
|
96 lines
/* Utils_Macify; Utilities */
/* Unit name: Utils_Macify.c */
/* Function: Utilities for the Program specific code. */
/* History: 3/15/91 Original by Prototyper 3.0 */
#include "PCommonMacify.h" /* Common */
#include "Common_Macify.h" /* Common */
#include "PUtils_Macify.h" /* General Utilities */
#include "Utils_Macify.h" /* This file */
/* ======================================================= */
/* ======================================================= */
/* Close the input file */
void Close_The_Input_File()
{
ErrorCode = FSClose(inputRefNum ); /* Close the file */
inputRefNum = 0; /* Invalidate the refnum */
}
/* ======================================================= */
/* Close the output file */
void Close_The_Output_File()
{
ErrorCode = FSClose(outputRefNum ); /* Close the file */
outputRefNum = 0; /* Invalidata the refnum */
}
/* ======================================================= */
/* Open the input file */
void Open_The_File()
{
short NumberOfTypes;
typeList[0] = 'TEXT'; /* Open TEXT files */
typeList[1] = 'text'; /* Open other files */
NumberOfTypes = 1; /* Only use first filetype in the list */
if (Do_The_Open_File(NumberOfTypes)) /* Try to open the file */
{
/* ADD in your code here to read the file */
Close_The_Input_File(); /* Now close this file */
}
}
/* ======================================================= */
/* Save the file */
void Save_The_File()
{
if (Do_The_Save_File('????', 'TEXT')) /* Try to save the file */
{
/* ADD in your code here to save the file */
Close_The_Output_File(); /* Now close this file */
}
}
/* ======================================================= */
/* ======================================================= */