#include #include struct SFReply; typedef int Boolean; #define false 0 #define true 1 extern void CompileSequence(FILE *infile, short *CompileError); static int nextnotblank(void); static int MacroSearch(char *readstring, int macronumber); static void macrocopy(int *macronumber, int *macrofound); static void macroSave(int *macronumber, char *readstring, char *endstring); static void ErrorDuringCompilation(void); extern void SeqDoError(char errorstring[256], Boolean fatal, jmp_buf env); extern void newMacroSave(char *readstring, int *macronumber); extern void insertMacro(char *readstring, int *macronumber, unsigned short *address,unsigned short *nextaddress); extern void loop(char *readstring, int *macronumber, unsigned short *address, unsigned short *nextaddress); static void WriteCodeInTmpBuffer(unsigned short *address, unsigned short *nextaddress, unsigned short code); extern int GetBit(unsigned short a, unsigned short nthBit); extern void SetBit(unsigned short *a, unsigned short nthBit, unsigned short ON); static unsigned short ReadBinarySequence(void); /* extern void GetFileName(SFReply *replyPtr); static void WriteDataInFile(int macronumber); int GetBit(unsigned short a, unsigned short nthBit); static unsigned short ReadBinarySequence(void); static void HandleOutputFilesDialog(int macronumber,SFReply *reply); pascal OSErr SetDialogDefaultItem(DialogPtr theDialog, short newItem) = { 0x303C, 0x0304, 0xAA68 }; pascal OSErr SetDialogCancelItem(DialogPtr theDialog, short newItem) = { 0x303C, 0x0305, 0xAA68 }; extern void PrintImageFile(int macronumber,SFReply *reply); extern void PrintHexFile(int macronumber,SFReply *reply); extern void PrintMACROListing(int macronumber,SFReply *reply); extern void WriteSeqFile(SFReply *reply); extern void PrintAPCImageFile(int macronumber,SFReply *reply); */ typedef struct { unsigned long seqAddress; unsigned long seqPointer; unsigned short seqValue; } Seq, (*SeqPtr)[2]; typedef struct { char name[256]; unsigned short ROUTINE; unsigned short offset; unsigned short start; unsigned short end; } multipleSequence,(*multipleSequencePtr)[2]; typedef struct { FILE *fi; char prevFileName[256]; short LineInFile; } OpenFile;