#include "WriteExternalFile.h" #include "Tools.h" #include "MB_protos.h" #include "MB_pragmas.h" #include "mb.h" #include #include #include #include #include #include extern void Quit(void); /****************************************************************************************************************/ /***** *****/ /** WriteExternalFile **/ /***** *****/ /****************************************************************************************************************/ /* Create a file where are the external variables and functions declarations */ BOOL WriteExternalFile(char *Externals,ULONG varnb) { int i; ULONG length, type; BPTR TMPfile; char *adr_file = NULL; __aligned struct FileInfoBlock Info; BOOL bool_aux = FALSE; char *varname; char *tmp; BOOL result = FALSE; FILE *file; BOOL ExternalExist=FALSE; /* If the file already exists, we load it in memory */ if (TMPfile = Open(Externals, MODE_OLDFILE)) { ExamineFH(TMPfile, &Info); length = Info.fib_Size; if (!(adr_file = AllocMemory(length+1))) { Close(TMPfile); Quit(); } Read( TMPfile, adr_file, length); adr_file[length] = '\0'; Close(TMPfile); } for(i=0;!ExternalExist && i\n\n"); for(i=0;i