diff options
Diffstat (limited to '')
-rw-r--r-- | mwcc_decomp.h | 153 |
1 files changed, 80 insertions, 73 deletions
diff --git a/mwcc_decomp.h b/mwcc_decomp.h index f0bd518..e462bae 100644 --- a/mwcc_decomp.h +++ b/mwcc_decomp.h @@ -286,6 +286,7 @@ enum { }; enum { LISTFLAGS_NONE = 0, + LISTFLAGS_2 = 2, LISTFLAGS_4 = 4, LISTFLAGS_COMPILER = 0x100, LISTFLAGS_LINKER = 0x200, @@ -832,13 +833,16 @@ typedef struct Target { int count8; int countC; CWTargetInfo *targetInfo; - Segments segments; - Overlays overlays; + struct { + // not sure how much stuff exactly is part of this struct + Segments segments; + Overlays overlays; + } linkage; int x28; - Files accessPathFiles; - Files files2; + Files files; + Files pchs; Incls incls; - Paths systemPaths; + Paths sysPaths; Paths userPaths; CWDataType language; CWDataType cpu; @@ -851,14 +855,14 @@ typedef struct Target { unsigned long linkerFlags; unsigned long postLinkerFlags; OSPathSpec cwd; - VFile *vfiles; + VFile *virtualFiles; struct Target *next; } Target; // assumed name typedef struct Plugin { BasePluginCallbacks *cb; - CompilerLinkerPluginCallbacks *clcb; - ParserPluginCallbacks *pcb; + CompilerLinkerPluginCallbacks *cl_cb; + ParserPluginCallbacks *pr_cb; void *context; char *versionInfoASCII; struct Plugin *next; @@ -917,35 +921,35 @@ extern void Res_Cleanup(); /* CLPlugins.c */ //static void GetToolVersionInfo(); extern const ToolVersionInfo *Plugin_GetToolVersionInfo(); -//static const char *Plugin_GetDisplayName(Plugin *plugin); -extern const char *Plugin_GetDropInName(Plugin *plugin); -extern VersionInfo *Plugin_GetVersionInfo(Plugin *plugin); -extern const char *Plugin_GetVersionInfoASCII(Plugin *plugin); -extern DropInFlags *Plugin_GetDropInFlags(Plugin *plugin); -extern CWDataType Plugin_GetPluginType(Plugin *plugin); -extern const CWTargetList *Plugin_CL_GetTargetList(Plugin *plugin); -extern const CWPanelList *Plugin_GetPanelList(Plugin *plugin); -extern const CWExtMapList *Plugin_CL_GetExtMapList(Plugin *plugin); -extern const OSFileTypeMappingList *Plugin_GetFileTypeMappingList(Plugin *plugin); -extern const CWObjectFlags *Plugin_CL_GetObjectFlags(Plugin *plugin); -extern Boolean Plugin_MatchesName(Plugin *plugin, const char *name); -extern Boolean Plugin_CL_MatchesTarget(Plugin *plugin, CWDataType cpu, CWDataType os, Boolean flag); +//static const char *Plugin_GetDisplayName(Plugin *pl); +extern const char *Plugin_GetDropInName(Plugin *pl); +extern VersionInfo *Plugin_GetVersionInfo(Plugin *pl); +extern const char *Plugin_GetVersionInfoASCII(Plugin *pl); +extern DropInFlags *Plugin_GetDropInFlags(Plugin *pl); +extern CWDataType Plugin_GetPluginType(Plugin *pl); +extern const CWTargetList *Plugin_CL_GetTargetList(Plugin *pl); +extern const CWPanelList *Plugin_GetPanelList(Plugin *pl); +extern const CWExtMapList *Plugin_CL_GetExtMapList(Plugin *pl); +extern const OSFileTypeMappingList *Plugin_GetFileTypeMappingList(Plugin *pl); +extern const CWObjectFlags *Plugin_CL_GetObjectFlags(Plugin *pl); +extern Boolean Plugin_MatchesName(Plugin *pl, const char *name); +extern Boolean Plugin_CL_MatchesTarget(Plugin *pl, CWDataType cpu, CWDataType os, Boolean flag); extern Boolean Plugins_CL_HaveMatchingTargets(Plugin *a, Plugin *b, Boolean flag); //static CL_MatchesExtMapping(CWExtensionMapping *em, CWDataType type, const char *extension, Boolean flag); -extern Boolean Plugin_CL_MatchesFileType(Plugin *plugin, CWDataType type, const char *extension, Boolean flag); -extern Boolean Plugin_MatchesType(Plugin *plugin, CWDataType plugintype, CWDataType edit_language, Boolean flag); -extern Boolean Plugin_Pr_MatchesPlugin(Plugin *plugin, void *unk1, void *unk2, void *unk3); // fixme -extern Boolean Plugin_Pr_MatchesPanels(Plugin *plugin, void *unk1, void *unk2); // fixme -extern Boolean Plugin_CL_WriteObjectFile(Plugin *plugin, FSSpec *fss1, FSSpec *fss2, CWDataType creator, CWDataType filetype, Handle h); -extern Boolean Plugin_CL_GetCompilerMapping(Plugin *plugin, CWDataType type, const char *extension, CompilerMappingFlags *flags); -//static Boolean SupportedPlugin(Plugin *plugin, const char **errmsg); -//static Boolean VerifyPanels(Plugin *plugin); -extern Plugin *Plugin_New(const BasePluginCallbacks *cb, const CompilerLinkerPluginCallbacks *clcb, const ParserPluginCallbacks *pcb); -extern void Plugin_Free(Plugin *plugin); -extern int Plugin_VerifyPanels(Plugin *plugin); +extern Boolean Plugin_CL_MatchesFileType(Plugin *pl, CWDataType type, const char *extension, Boolean flag); +extern Boolean Plugin_MatchesType(Plugin *pl, CWDataType plugintype, CWDataType edit_language, Boolean flag); +extern Boolean Plugin_Pr_MatchesPlugin(Plugin *pl, void *unk1, void *unk2, void *unk3); // fixme +extern Boolean Plugin_Pr_MatchesPanels(Plugin *pl, void *unk1, void *unk2); // fixme +extern Boolean Plugin_CL_WriteObjectFile(Plugin *pl, FSSpec *srcfss, FSSpec *outfss, CWDataType creator, CWDataType filetype, Handle data); +extern Boolean Plugin_CL_GetCompilerMapping(Plugin *pl, CWDataType type, const char *extension, CompilerMappingFlags *flags); +//static Boolean SupportedPlugin(Plugin *pl, const char **errmsg); +//static Boolean VerifyPanels(Plugin *pl); +extern Plugin *Plugin_New(const BasePluginCallbacks *cb, const CompilerLinkerPluginCallbacks *cl_cb, const ParserPluginCallbacks *pr_cb); +extern void Plugin_Free(Plugin *pl); +extern int Plugin_VerifyPanels(Plugin *pl); extern void Plugins_Init(); extern void Plugins_Term(); -extern int Plugins_Add(Plugin *plugin); +extern int Plugins_Add(Plugin *pl); extern Plugin *Plugins_MatchName(Plugin *first, const char *name); extern Plugin *Plugins_CL_MatchTarget(Plugin *first, CWDataType cpu, CWDataType os, CWDataType plugintype, CWDataType edit_language); extern Plugin *Plugins_CL_MatchFileType(Plugin *first, CWDataType type, const char *extension, Boolean flag); @@ -957,9 +961,9 @@ extern Plugin *Plugins_GetParserForPlugin(...); // TODO fixme args extern Plugin *Plugins_GetCompilerForLinker(Plugin *first, Plugin *linker, CWDataType type, const char *extension, CWDataType edit_language); extern Boolean Plugins_GetPluginList(Plugin *first, int *count, void **list); // TODO fixme define list struct extern Boolean Plugins_GetPrefPanelUnion(Plugin *first, int *count, void **list); // TODO fixme define struct -extern Boolean Plugin_AddFileTypeMappings(Plugin *plugin, void *unk); +extern Boolean Plugin_AddFileTypeMappings(Plugin *pl, void *unk); extern Boolean Plugins_AddFileTypeMappingsForTarget(Plugin *first, void *unk, CWDataType cpu, CWDataType os); -extern short Plugin_Call(Plugin *plugin, void *context); +extern short Plugin_Call(Plugin *pl, void *context); /********************************/ /* ?? parser_cb */ @@ -1076,7 +1080,7 @@ typedef struct Proj { OSNameSpec projName; } Proj; extern int Proj_Initialize(Proj *proj); -extern int Proj_Terminate(Proj *proj); +extern int Proj_Terminate(Proj *this); /********************************/ /* ?? License */ @@ -1114,7 +1118,7 @@ extern Boolean SendParserRequest( ToolVersionInfo *toolVersionInfo ); extern Boolean SendCompilerRequest(Plugin *plugin, File *file, short request); -extern Boolean SendTargetInfoRequest(Target *target, Plugin *plugin, int flags); +extern Boolean SendTargetInfoRequest(Target *target, Plugin *linker, int flags); extern Boolean SendLinkerRequest(Plugin *plugin, int flags, CWTargetInfo *targetInfo); extern Boolean SendDisassemblerRequest(Plugin *plugin, File *file); extern Boolean SendInitOrTermRequest(Plugin *plugin, Boolean action); @@ -1307,6 +1311,9 @@ extern void GetIndString(Str255 theString, short strListID, short index); extern char *getindstring(char *theString, short strListID, short index); extern void NumToString(long theNum, Str255 theString); extern void StringToNum(ConstStr255Param theString, long *theNum); + +/********************************/ +/* MacFileTypes.c */ extern int AddFileTypeMappingList(void *a, void *b); // TODO sig extern void UseFileTypeMappings(void *a); // TODO sig extern OSErr SetMacFileType(const FSSpec *fss, void *a); // TODO sig @@ -1316,13 +1323,13 @@ extern OSErr GetMacFileType(const FSSpec *fss, void *a); // TODO sig /* CLFiles.c */ extern File *File_New(); extern void File_Free(File *file); -extern int Files_Initialize(Files *files); -extern int Files_Terminate(Files *files); -extern int Files_AddFile(Files *files, File *file); -extern int Files_InsertFile(Files *files, File *file, int index); -extern File *Files_GetFile(Files *files, int index); -extern File *Files_FindFile(Files *files, OSSpec *spec); -extern int Files_Count(Files *files); +extern int Files_Initialize(Files *this); +extern int Files_Terminate(Files *this); +extern int Files_AddFile(Files *this, File *file); +extern int Files_InsertFile(Files *this, File *file, int index); +extern File *Files_GetFile(Files *this, int filenum); +extern File *Files_FindFile(Files *this, OSSpec *spec); +extern int Files_Count(Files *this); extern int VFiles_Initialize(VFile **vfiles); extern int VFiles_Terminate(VFile **vfiles); extern VFile *VFile_New(const char *name, Handle data); @@ -1331,37 +1338,37 @@ extern VFile *VFiles_Find(VFile *vfiles, const char *name); /********************************/ /* CLOverlays.c */ -extern int Overlays_Initialize(Overlays *overlays); -extern int Overlays_Terminate(Overlays *overlays); -extern int Overlays_AddOvlGroup(Overlays *overlays, OvlGroup *group, int *pIndex); -extern OvlGroup *Overlays_GetOvlGroup(Overlays *overlays, int index); -extern int Overlays_CountGroups(Overlays *overlays); -extern int Overlays_AddFileToOverlay(Overlays *overlays, int groupIndex, int overlayIndex, int fileID); -extern Overlay *Overlays_GetOverlayInGroup(Overlays *overlays, int groupIndex, int overlayIndex); -extern int Overlays_GetFileInOverlay(Overlays *overlays, int groupIndex, int overlayIndex, int fileIndex); +extern int Overlays_Initialize(Overlays *this); +extern int Overlays_Terminate(Overlays *this); +extern int Overlays_AddOvlGroup(Overlays *this, OvlGroup *grp, int *pIndex); +extern OvlGroup *Overlays_GetOvlGroup(Overlays *this, int index); +extern int Overlays_CountGroups(Overlays *this); +extern int Overlays_AddFileToOverlay(Overlays *this, int groupIndex, int overlayIndex, int fileID); +extern Overlay *Overlays_GetOverlayInGroup(Overlays *this, int groupIndex, int overlayIndex); +extern int Overlays_GetFileInOverlay(Overlays *this, int groupIndex, int overlayIndex, int fileIndex); extern OvlGroup *OvlGroup_New(const char *name, CWAddr64 addr); -extern void OvlGroup_Delete(OvlGroup *group); -extern int OvlGroup_AddOverlay(OvlGroup *group, Overlay *overlay, int *pIndex); -extern Overlay *OvlGroup_GetOverlay(OvlGroup *group, int index); -extern int OvlGroup_CountOverlays(OvlGroup *group); +extern void OvlGroup_Delete(OvlGroup *grp); +extern int OvlGroup_AddOverlay(OvlGroup *this, Overlay *oly, int *pIndex); +extern Overlay *OvlGroup_GetOverlay(OvlGroup *this, int index); +extern int OvlGroup_CountOverlays(OvlGroup *this); extern Overlay *Overlay_New(const char *name); -extern void Overlay_Delete(Overlay *overlay); -extern int Overlay_AddFile(Overlay *overlay, int fileID, int *pIndex); -extern int Overlay_GetFile(Overlay *overlay, int index); -extern int Overlay_CountFiles(Overlay *overlay); +extern void Overlay_Delete(Overlay *oly); +extern int Overlay_AddFile(Overlay *oly, int fileID, int *pIndex); +extern int Overlay_GetFile(Overlay *oly, int index); +extern int Overlay_CountFiles(Overlay *oly); /********************************/ /* CLSegs.c */ extern Segment *Segment_New(const char *name, unsigned short a); extern void Segment_Free(Segment *segment); -extern int Segments_Initialize(Segments *segments); -extern int Segments_Terminate(Segments *segments); +extern int Segments_Initialize(Segments *segs); +extern int Segments_Terminate(Segments *segs); //static Boolean Segments_GrowSegments(Segments *segments, unsigned short *pIndex); -extern int Segments_AddSegment(Segments *segments, Segment *segment, unsigned short *pIndex); -extern Boolean Segments_InsertSegment(Segments *segments, unsigned short index, Segment *segment); -extern Boolean Segments_DeleteSegment(Segments *segments, unsigned short index); -extern Segment *Segments_GetSegment(Segments *segments, unsigned short index); -extern unsigned short Segments_Count(const Segments *segments); +extern int Segments_AddSegment(Segments *segs, Segment *segment, unsigned short *pIndex); +extern Boolean Segments_InsertSegment(Segments *segs, unsigned short index, Segment *segment); +extern Boolean Segments_DeleteSegment(Segments *segs, unsigned short index); +extern Segment *Segments_GetSegment(Segments *segs, unsigned short index); +extern unsigned short Segments_Count(const Segments *segs); /********************************/ /* CLDropinCallbacks_V10.cpp */ @@ -1397,7 +1404,7 @@ extern void OS_GetFileHandleSpec(const OSFileHandle *fh, OSSpec *spec); /********************************/ /* CLDependencies.c */ -extern int Incls_Initialize(Incls *incls); +extern int Incls_Initialize(Incls *incls, Target *targ); extern void Incls_Terminate(Incls *incls); // IsSysIncl // MakeInclFileSpec @@ -1427,14 +1434,14 @@ extern Boolean WriteBrowseData(File *file); /********************************/ /* CLBrowser.c */ // GetBrowseTableInfoAndLock -extern int Browser_Initialize(OSHandle *hand); +extern int Browser_Initialize(OSHandle *browsetable); //static int Destroy(OSHandle *hand); -extern int Browser_Terminate(OSHandle *hand); -extern int Browser_SearchFile(OSHandle *hand, const char *path, short *pIndex); -extern int Browser_SearchAndAddFile(OSHandle *hand, const char *path, short *pIndex); +extern int Browser_Terminate(OSHandle *browsetable); +extern int Browser_SearchFile(OSHandle *browsetable, const char *fullpath, short *pIndex); +extern int Browser_SearchAndAddFile(OSHandle *browsetable, const char *fullpath, short *pIndex); //static long CalcDiskSpaceRequirements(...); // needs table type //static int ConvertMemToDisk(...); // needs table type -extern int Browser_PackBrowseFile(Handle h, OSHandle *hand, OSHandle *hand2); +extern int Browser_PackBrowseFile(Handle browsedata, OSHandle *browsetable, OSHandle *hand2); /********************************/ /* ?? Include Cache */ |