diff --git a/TODO b/TODO index a05502b..246c776 100644 --- a/TODO +++ b/TODO @@ -1,8 +1,5 @@ - Look into fixes for the bad padding we're getting on Mac OS X PPC - - fcbrec definitely kills us, others may too - - further populate check_structs.c + Fix the bad padding we're getting on Mac OS X PPC (put PACKED after + struct) package up the System Folder and whatnot so that people w/o the old executor-aux can run Executor diff --git a/src/AE_desc.c b/src/AE_desc.c index c73dde3..b4dec97 100644 --- a/src/AE_desc.c +++ b/src/AE_desc.c @@ -13,6 +13,7 @@ char ROMlib_rcsid_AE_desc[] = #include "MemoryMgr.h" #include "rsys/mman.h" +#include "rsys/apple_events.h" #define LIST_CLASS_P(desc) \ ( DESC_TYPE_X (desc) == CLC (typeAEList) \ @@ -24,113 +25,6 @@ char ROMlib_rcsid_AE_desc[] = #define APPLE_EVENT_CLASS_P(desc) \ (DESC_TYPE_X (desc) == CLC (typeAppleEvent)) -/* #### internal */ - -typedef struct -{ - DescType type PACKED; - uint32 size PACKED; - char data[0] LPACKED; -} inline_desc_t; - -typedef struct -{ - int32 key PACKED; - DescType type PACKED; - uint32 size PACKED; - char data[0] LPACKED; -} inline_key_desc_t; - -typedef struct list_header -{ - /* #### always zero (?) */ - uint32 unknown_1 PACKED; - - /* #### contains an applzone address */ - uint32 unknown_2 PACKED; - - uint32 param_offset PACKED; - - /* contains a tick that identifies the object, either `list' or - `reco'; for an apple event, this fiend contains the offset to the - parameter section */ - uint32 attribute_count PACKED; - - uint32 param_count PACKED; - - /* ### always zero (?) */ - int32 unknown_3 PACKED; - - /* offset: 0x18 */ - char data[0] LPACKED; -} list_header_t; - -typedef struct { list_header_t *p PACKED_P; } hidden_list_header_ptr; -typedef hidden_list_header_ptr *list_header_h; - -#define PARAM_OFFSET_X(aggr_desc_h) \ - (HxX ((list_header_h) aggr_desc_h, param_offset)) -#define PARAM_COUNT_X(aggr_desc_h) \ - (HxX ((list_header_h) aggr_desc_h, param_count)) -#define ATTRIBUTE_COUNT_X(aggr_desc_h) \ - (HxX ((list_header_h) aggr_desc_h, attribute_count)) - -#define PARAM_COUNT(aggr_desc_h) (CL (PARAM_COUNT_X (aggr_desc_h))) -#define PARAM_OFFSET(aggr_desc_h) (CL (PARAM_OFFSET_X (aggr_desc_h))) -#define ATTRIBUTE_COUNT(aggr_desc_h) (CL (ATTRIBUTE_COUNT_X (aggr_desc_h))) - -typedef struct ae_header -{ - /* #### always zero (?) */ - uint32 unknown_1 PACKED; - - /* #### contains unknown values */ - uint32 unknown_2 PACKED; - - uint32 param_offset PACKED; - - uint32 attribute_count PACKED; - uint32 param_count PACKED; - - /* #### zero pad, use unknown */ - char pad_1[26] LPACKED; - - AEEventClass event_class PACKED; - AEEventID event_id PACKED; - - /* #### takes on various values, no idea */ - uint32 unknown_3 PACKED; - - /* beginning of target inline descriptor; `target->size' determines - target's actual size */ - inline_desc_t target LPACKED; - -#if 0 - /* for show */ - /* #### contains `aevt' tick */ - uint32 unknown_4; - - /* contains 0x00010001 */ - uint32 unknown_5; - - char attribute_data[...]; - - /* marker containing tick `;;;;' */ - uint32 unknown_6; - - char param_data[...]; -#endif -} ae_header_t; - -typedef struct subdesc_info -{ - int count; - int base_offset; - uint32 *count_p; - boolean_t key_p; - int inline_desc_header_size; -} subdesc_info_t; - static OSErr get_subdesc_info (Handle aggr_desc_h, subdesc_info_t *info, boolean_t attribute_p) diff --git a/src/PSprint.c b/src/PSprint.c index b62a30a..3d0a81c 100644 --- a/src/PSprint.c +++ b/src/PSprint.c @@ -36,7 +36,6 @@ char ROMlib_rcsid_PSprint[] = #include "rsys/nextprint.h" #include "rsys/blockinterrupts.h" #include "rsys/next.h" -#include "rsys/myabort.h" #include "rsys/PSstrings.h" #include "rsys/tempalloc.h" diff --git a/src/alias.c b/src/alias.c index 55ba5c1..a69b192 100644 --- a/src/alias.c +++ b/src/alias.c @@ -23,6 +23,8 @@ char ROMlib_rcsid_alias[] = #include "win_temp.h" #endif +#include "rsys/alias.h" + #define paramErr (-50) /* NOTE: if we want to be more like the Mac, we should have a 'fld#',0 @@ -379,71 +381,6 @@ enum TAIL_TAG = 0x0009, }; -typedef unsigned char Str27[28]; - -typedef struct -{ - OSType type PACKED; - INTEGER length PACKED; - INTEGER usually_2 PACKED; - INTEGER usually_0 PACKED; - Str27 volumeName LPACKED; - LONGINT ioVCrDate PACKED; - INTEGER ioVSigWord PACKED; - INTEGER zero_or_one PACKED; - LONGINT zero_or_neg_one PACKED; - Str63 fileName LPACKED; - LONGINT ioDirID PACKED; /* -1 full */ - LONGINT ioFlCrDat PACKED; - OSType type_info PACKED; - OSType creator PACKED; - INTEGER mystery_words[10] PACKED; -} -alias_head_t; - -typedef struct /* 0x0000 */ -{ - INTEGER parent_length PACKED; - unsigned char parent_bytes[1] LPACKED; -} -alias_parent_t; - -typedef struct /* 0x0001 */ -{ - INTEGER eight PACKED; - LONGINT mystery_longs[2] PACKED; -} -alias_unknown_000100_t; - -typedef struct /* 0x0002 */ -{ - INTEGER fullpath_length PACKED; - unsigned char fullpath_bytes[1] LPACKED; -} -alias_fullpath_t; - -typedef struct /* 0x0009 */ -{ - INTEGER length PACKED; - INTEGER weird_info[12] PACKED; - Str32 zone LPACKED; - Str31 server LPACKED; - Str27 volumeName LPACKED; - Str32 network_identity_owner_name LPACKED; - char filler_zeros[18] LPACKED; -} -alias_tail_t; - -typedef struct -{ - alias_head_t *headp PACKED; - alias_parent_t *parentp PACKED; - alias_unknown_000100_t *unknownp PACKED; - alias_fullpath_t *fullpathp PACKED; - alias_tail_t *tailp PACKED; -} -alias_parsed_t; - /* * ResolveAlias is just a stub so we can recover the fsspecs that are stored * in the AppleEvent that is constructed as part of the process of launching diff --git a/src/check_structs.c b/src/check_structs.c index fbc8410..5c64089 100644 --- a/src/check_structs.c +++ b/src/check_structs.c @@ -1,17 +1,113 @@ +/* + * Check the size of all the structures that we use that correspond to Mac + * memory (i.e. layouts imposed by the Mac ABI). It would be nice if we + * checked the size and offset of each member element too, but this is a good + * start and something Executor should have done from the beginning, since + * if a structure doesn't get packed properly it can be a pain to track the + * issue down in a debugger. + * + * WARNING: The sizes that it is checking against are not known to be correct. + * In most cases they are correct, however, the sizes have been + * gleaned from a port that hasn't been tested much, so there are two + * potential sources of bad sizes. One is we may have structs that + * we've never used. The other is we may have structs that have been + * used on our more thoroughly tested ports that have managed to + * become incorrect on the port we generated the numbers on. + */ + #include #include -#include - -#if defined(USE_VDRIVER_H) -# include -#endif - +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define check(type, expected_size) \ do { \ @@ -22,25 +118,254 @@ void check_structs(void) { - check(VBLTask, 14); /* VRetraceMgr.h */ + /* ADB.h */ + check (ADBDataBlock, 10); + check (ADBSetInfoBlock, 8); -#if defined(USE_VDRIVER_H) - check (VDParamBlock, TODO); /* VDriver.h */ - check (VDEntryRecord, TODO); - check (VDGammaRecord, TODO); - check (VDPgInfo, TODO); - check (VDFlagRec, TODO); - check (VDDefModeRec, TODO); -#endif /* defined(USE_VDRIVER_H) */ + /* AliasMgr.h has no structs or unions */ - check (HMStringResType, 4); /* HelpMgr.h */ + /* AppleEvents.h */ + check (AEDesc, 8); + check (AEKeyDesc, 12); + check (AE_hdlr_t, 8); + check (AE_hdlr_selector_t, 8); + check (AE_hdlr_table_elt_t, 24); + check (AE_hdlr_table_t, 52); + check (AE_zone_tables_t, 56); + check (AE_info_t, 596); + check (AEArrayData, 12); + + /* AppleTalk.h has no structs or unions */ + + /* BinaryDecimal.h has no structs or unions */ + + /* CommTool.h */ + check (CRMRec, 34); + check (CRMSerialRecord, 30); + + /* Components.h */ + check (ComponentRecord, 4); + check (ComponentInstanceRecord, 4); + + /* ControlMgr.h */ + check (ControlRecord, 296); + check (CtlCTab, 16); + check (AuxCtlRec, 22); + + /* CQuickDraw.h */ + check (ITab, 7); + check (SProcRec, 8); + check (CProcRec, 8); + check (GDevice, 62); + check (ColorInfo, 16); + check (Palette, 32); + check (ReqListRec, 4); + check (OpenCPicParams, 24); + check (CommentSpec, 4); + check (FontSpec, 26); + check (PictInfo, 104); + + /* DeskMgr.h has no structs or unions */ + + /* DeviceMgr.h */ + check (ramdriver, 19); + check (DCtlEntry, 40); + + /* DialogMgr.h */ + check (DialogRecord, 170); + check (DialogTemplate, 276); + check (StageList, 2); + check (AlertTemplate, 12); + + /* Disk.h */ + check (DrvSts, 22); + + /* DiskInit.h has no structs or unions */ + + /* EditionMgr.h */ + check (struct SectionRecord, 36); + check (EditionContainerSpec, 110); + check (EditionInfoRecord, 126); + check (NewPublisherReply, 122); + check (NewSubscriberReply, 112); + check (SectionOptionsReply, 10); + check (EditionOpenerParamBlock, 148); + check (FormatIOParamBlock, 24); + + /* EventMgr.h */ + check (EventRecord, 16); + + /* FileMgr.h */ + check (FInfo, 16); + check (FXInfo, 16); + check (DInfo, 16); + check (DXInfo, 16); + check (ioParam, 50); + check (fileParam, 80); + check (volumeParam, 64); + check (cntrlParam, 50); + check (ParamBlockRec, 80); + check (HIoParam, 50); + check (HFileParam, 80); + check (HVolumeParam, 122); + check (HParamBlockRec, 122); + check (HFileInfo, 108); + check (DirInfo, 104); + check (CInfoPBRec, 108); + check (CMovePBRec, 52); + check (WDPBRec, 52); + check (FCBPBRec, 62); + check (VCB, 178); + check (DrvQEl, 16); + check (FSSpec, 70); + + /* Finder.h */ + check (DTPBRec, 102); + + /* FontMgr.h */ + check (FMetricRec, 20); + check (FamRec, 52); + check (WidthTable, 1072); + check (FMInput, 16); + check (FMOutput, 26); + check (FontRec, 26); + + /* Gestalt.h has no structs or unions */ + + /* HelpMgr.h */ + check (HMStringResType, 4); check (HMMessageRecord, 258); - check (ProcessSerialNumber, 8); /* ProcessMgr.h */ + /* Iconutil.h */ + check (CIcon, 84); + + /* IntlUtil.h */ + check (Intl0Rec, 32); + check (Intl1Rec, 332); + + /* ListMgr.h */ + check (ListRec, 88); + + /* MacTypes.h */ + check (QHdr, 10); + check (Point, 4); + check (Rect, 8); + + /* MemoryMgr.h */ + check (Zone, 54); + + /* MenuMgr.h */ + check (MenuInfo, 270); + check (MCEntry, 30); + + /* NotifyMgr.h */ + check (NMRec, 36); + + /* OSEvent.h */ + check (EvQEl, 22); + check (size_info_t, 20); + check (TargetID, 179); + check (HighLevelEventMsg, 36); + + /* OSUtil.h */ + check (SysParmType, 20); + check (DateTimeRec, 14); + check (SysEnvRec, 16); + check (QElem, 178); + + /* Package.h has no structs or unions */ + + /* PPC.h */ + check (LocationNameRec, 35); + check (PPCPortRec, 70); + + /* PrintMgr.h */ + check (TPrPort, 178); + check (TPrInfo, 14); + check (TPrStl, 8); + check (TPrXInfo, 16); + check (TPrJob, 20); + check (TPrint, 120); + check (TPrStatus, 26); + check (TPrDlg, 204); + + /* ProcessMgr.h */ + check (ProcessSerialNumber, 8); check (LaunchParamBlockRec, 44); check (ProcessInfoRec, 60); - check (SndCommand, 8); /* SoundMgr.h */ + /* QuickDraw.h */ + check (Region, 10); + check (BitMap, 14); + check (Cursor, 68); + check (Polygon, 14); + check (FontInfo, 8); + check (QDProcs, 52); + check (GrafPort, 108); + check (Picture, 10); + check (PenState, 18); + check (RGBColor, 6); + check (HSVColor, 6); + check (HSLColor, 6); + check (CMYColor, 6); + check (ColorSpec, 8); + check (ColorTable, 16); + check (CQDProcs, 80); + check (PixMap, 50); + check (PixPat, 28); + check (CGrafPort, 108); + check (CCrsr, 96); + check (MatchRec, 10); + + /* QuickTime.h */ + check (MovieRecord, 4); + + /* ResourceMgr.h has no structs or unions */ + + /* SANE.h */ + check (comp_t, 8); + check (native_comp_t, 8); + check (x80_t, 10); +#if defined (mc68000) + check (extended96, 12); +#endif /* defined (mc68000) */ + check (Decimal, 24); + check (DecForm, 4); + + /* ScrapMgr.h */ + check (ScrapStuff, 16); + + /* ScriptMgr.h */ + check (DateCacheRec, 512); + check (LongDateRec, 28); + check (NumFormatStringRec, 255); + check (WideChar, 4); + check (WideCharArr, 42); + check (NumberParts, 334); + check (Extended80, 10); + check (ToggleResults, 2); + check (LongDateField, 1); + check (DateDelta, 1); + check (TogglePB, 28); + + /* SegmentLdr.h */ + check (AppFile, 264); + + /* Serial.h */ + check (SerShk, 8); + check (SerStaRec, 6); + + /* ShutDown.h has no structs or unions */ + + /* SoundDvr.h */ + check (FFSynthRec, 30007); + check (Tone, 6); + check (SWSynthRec, 30008); + check (FTSoundRec, 50); + check (FTSynthRec, 6); + + /* SoundMgr.h */ + check (SndCommand, 8); check (SndChannel, 1060); check (SoundHeader, 22); check (ExtSoundHeader, 62); @@ -48,67 +373,294 @@ void check_structs(void) check (SndDoubleBufferHeader, 24); check (SCStatus, 24); - check(fcbrec, 94); /* rsys/file.h */ + /* StartMgr.h */ + check (DefStartRec, 4); + check (DefVideoRec, 2); + check (DefOSRec, 2); + + /* StdFilePkg.h */ + check (SFReply, 74); + check (StandardFileReply, 88); + + /* SysErr.h has no structs or unions */ + + /* TextEdit.h */ + check (TERec, 98); + check (StyleRun, 4); + check (STElement, 18); + check (LHElement, 4); + check (TextStyle, 12); + check (ScrpSTElement, 20); + check (StScrpRec, 22); + check (NullSTRec, 8); + check (TEStyleRec, 24); + + /* ThinkC.h has no structs or unions */ + + /* TimeMgr.h */ + check (TMTask, 14); + + /* ToolboxEvent.h has no structs or unions */ + + /* ToolboxUtil.h */ + check (Int64Bit, 8); + +#if defined(USE_VDRIVER_H) + /* VDriver.h */ + check (VDParamBlock, 0); /* TODO */ + check (VDEntryRecord, 0); /* TODO */ + check (VDGammaRecord, 0); /* TODO */ + check (VDPgInfo, 0); /* TODO */ + check (VDFlagRec, 0); /* TODO */ + check (VDDefModeRec, 0); /* TODO */ +#endif /* defined(USE_VDRIVER_H) */ + + /* VRetraceMgr.h */ + check (VBLTask, 14); + + /* WindowMgr.h */ + check (WindowRecord, 156); + check (WStateData, 16); + check (AuxWinRec, 28); + + /* rsys/alias.h */ + check (Str27, 28); + check (alias_head_t, 150); + check (alias_parent_t, 3); + check (alias_unknown_000100_t, 10); + check (alias_fullpath_t, 3); + check (alias_tail_t, 170); + check (alias_parsed_t, 20); + + /* rsys/apple_events.h */ + check (inline_desc_t, 8); + check (inline_key_desc_t, 12); + check (list_header_t, 24); + check (ae_header_t, 66); + check (subdesc_info_t, 20); + + /* rsys/cfm.h */ + check (cfrg_resource_t, 32); + check (cfir_t, 43); + check (MemFragment, 9); + check (DiskFragment, 12); + check (SegmentedFragment, 10); + check (FragmentLocator, 16); + check (InitBlock, 44); + check (section_info_t, 16); + check (CFragConnection_t, 28); + check (lib_t, 12); + check (CFragClosure_t, 4); + check (map_entry_t, 8); + + /* rsys/cquick.h */ + check (GrafVars, 26); + + /* rsys/ctl.h */ + check (struct popup_data, 12); + check (thumbstr, 18); + check (contrlrestype, 23); + check (struct lsastr, 18); + + /* rsys/dial.h */ + check (icon_item_template_t, 18); + + /* rsys/filedouble.h */ + check (Single_descriptor, 12); + check (Single_header, 26); + check (Single_dates, 16); + check (Single_finfo, 32); + check (Single_attribs, 4); + check (defaulthead_t, 146); + check (defaultentries_t, 52); + + /* rsys/file.h */ + check (hfs_access_t, 16); + check (DrvQExtra, 46); + check (fcbrec, 94); + check (fcbhidden, 32714); + check (hiddeninfo, 32); + check (VCBExtra, 202); + check (getvolparams_info_t, 20); + + /* rsys/float.h */ +#if defined (mc68000) + check (m68k_x96_t, 12); +#endif /* defined (mc68000) */ + +#if defined (i386) + check (i386_x80_t, 10); +#endif /* defined (i386) */ + +#if defined(__alpha) + check (alpha_x64_t, 8); +#endif /* defined(__alpha) */ + + check (f64_t, 8); + check (f32_t, 4); + check (native_f32_t, 4); + + /* rsys/font.h */ + check (fatabentry, 6); + check (widentry_t, 4); + + /* rsys/hfs.h */ + check (xtntdesc, 4); + check (volumeinfo, 162); + check (btnode, 14); + check (catkey, 38); + check (xtntkey, 8); + check (anykey, 38); + check (filerec, 102); + check (directoryrec, 70); + check (threadrec, 46); + check (filecontrolblock, 94); + check (btblock0, 512); + check (cacheentry, 540); + check (cachehead, 12); + check (trailentry, 8); + check (btparam, 124); + check (wdentry, 16); + + /* rsys/hfs_plus.h */ + check (HFSUniStr255, 512); + check (HFSPlusPermissions, 16); + check (HFSPlusExtentDescriptor, 8); + check (HFSPlusExtentRecord, 64); + check (HFSPlusForkData, 80); + check (HFSPlusVolumeHeader, 512); + check (BTNodeDescriptor, 14); + check (BTHeaderRec, 106); + check (HFSPlusCatalogKey, 518); + check (HFSPlusCatalogFolder, 88); + check (HFSPlusCatalogFile, 248); + check (HFSPlusCatalogThread, 520); + check (HFSPlusExtentKey, 12); + check (HFSPlusAttrForkData, 88); + check (HFSPlusAttrExtents, 72); + + /* rsys/icon.h */ + check (cotton_suite_layout_t, 28); + + /* rsys/itm.h */ + check (itmstr, 14); + check (altstr, 12); + check (dlogstr, 21); + check (item_style_info_t, 20); + check (item_color_info_t, 4); + + /* rsys/keyboard.h */ + check (completer_pair_t, 2); + check (completer_t, 2); + check (dead_key_rec_t, 6); + check (kchr_str, 262); + + /* rsys/launch.h */ + check (vers_t, 7); + + /* rsys/menu.h */ + check (mext, 5); + check (muelem, 6); + check (menu_elt, 8); + check (menu_list, 7); + check (menulist, 102); + check (mbdfheader, 20); + check (mbdfentry, 28); + check (mct_res_t, 32); + check (mbartype, 4); + check (startendpairs, 16); + check (table, 16); + + /* rsys/mixed_mode.h */ + check (RoutineRecord, 20); + check (RoutineDescriptor, 32); + + /* rsys/mman_private.h */ + check (block_header_t, 12); + check (pblock_t, 14); + + /* rsys/partition.h */ + check (oldmapentry_t, 12); + check (oldblock1_t, 506); + + /* rsys/pef.h */ + check (PEFContainerHeader_t, 40); + check (PEFSectionHeader_t, 28); + check (PEFLoaderInfoHeader_t, 56); + check (PEFImportedLibrary_t, 24); + check (PEFLoaderRelocationHeader_t, 12); + check (PEFExportedSymbol, 10); + + /* rsys/picture.h */ + check (piccache, 96); + + /* rsys/print.h */ + check (TGnlData, 8); + check (TRslRg, 4); + check (TRslRec, 4); + check (TGetRslBlk, 128); + check (TSetRslBlk, 16); + check (TTxtPicRec, 10); + check (TCenterRec, 8); + + /* rsys/process.h */ + check (size_resource_t, 10); + + /* rsys/quick.h */ + check (ccrsr_res, 147); + + /* rsys/resource.h */ + check (reshead, 16); + check (rsrvrec, 240); + check (resmap, 28); + check (typref, 8); + check (resref, 12); + check (empty_resource_template_t, 286); + check (dcomp_info_t, 16); + check (res_sorttype_t, 8); + + /* rsys/screen-dump.h */ + check (struct header, 8); + check (struct directory_entry, 12); + check (struct ifd, 14); + + /* rsys/segment.h */ + check (finderinfo, 268); + + /* rsys/serial.h */ + check (sersetbuf_t, 8); + + /* rsys/soundopts.h */ + check (ModifierStub, 52); + + /* rsys/tesave.h */ + check (tesave, 56); + check (generic_elt_t, 16); + check (tehidden, 20); + + /* rsys/toolevent.h */ + check (keymap, 644); + + /* rsys/wind.h */ + check (windrestype, 19); + + /* config/arch/powerpc/ppc_stubs.h */ + + /* + * I don't have a machine I can test the aixtosysv4 structs against. + * The PPC work used a gcc command line flag that is no longer + * present in the gccs that I have access to. + */ + } -#if false +/* -TODO: These .c files have structs that refer to Mac memory and should - be size checked +mkvol_internal.h is designed to work without the normal includes, as such +it can't be easily tested from here. Instead we should do the testing in +mkvol itself, since mkvol could be compiled with different compilation flags +anyway -./font.c:267:typedef struct { -./segment.c:66:typedef struct { -./resOpen.c:31: struct { /* empty resource template */ -./ctlMouse.c:72:typedef struct { -./icon.c:352:typedef struct -./ctlInit.c:110:typedef struct { -./menu.c:224:typedef struct mct_res -./menu.c:738:typedef struct { -./menu.c:806:typedef struct { -./mkvol/mkvol.c:487: typedef struct -./mkvol/mkvol.c:505: typedef struct -./mkvol/mkvol.c:519: static struct -./stdmdef.c:45:typedef struct -./ctlArrows.c:698:struct lsastr -./qCGrafPort.c:420:struct pixpat_res -./fileDouble.c:50:PRIVATE struct defaulthead { -./fileDouble.c:115:PRIVATE struct defaultentries { -./screen-dump.c:60:struct header -./screen-dump.c:67:struct directory_entry -./screen-dump.c:75:struct ifd -./windInit.c:550:typedef struct { -./process.c:28:typedef struct size_resource -./syserr.c:36:PRIVATE struct { -./syserr.c:165:struct adef { -./syserr.c:175:struct tdef { -./syserr.c:182:struct idef { -./syserr.c:189:struct pdef { -./syserr.c:196:struct bdef { -./syserr.c:200: struct but { -./syserr.c:207:struct sdef { -./launch.c:375:typedef struct { -./qCursor.c:221:typedef struct ccrsr_res -./dialAlert.c:29:static struct -./toolevent.c:160:typedef struct { -./alias.c:384:typedef struct -./alias.c:404:typedef struct /* 0x0000 */ -./alias.c:411:typedef struct /* 0x0001 */ -./alias.c:418:typedef struct /* 0x0002 */ -./alias.c:425:typedef struct /* 0x0009 */ -./alias.c:437:typedef struct -./resMod.c:332:typedef struct { -./fileVolumes.c:69:typedef struct { -./fileVolumes.c:76:typedef struct { -./emustubs.c:229:typedef struct -./emustubs.c:1783:typedef struct comm_toolbox_dispatch_args -./emustubs.c:2604:typedef struct -./AE_desc.c:29:typedef struct -./AE_desc.c:36:typedef struct -./AE_desc.c:44:typedef struct list_header -./AE_desc.c:82:typedef struct ae_header -./serial.c:128: struct { - -These .h files have structs that should be size checked ./mkvol/mkvol_internal.h:80:typedef struct { ./mkvol/mkvol_internal.h:89:typedef struct { @@ -121,397 +673,8 @@ These .h files have structs that should be size checked ./mkvol/mkvol_internal.h:194:typedef struct { ./mkvol/mkvol_internal.h:210:typedef struct { ./mkvol/mkvol_internal.h:224:typedef struct { -./config/arch/powerpc/ppc_stubs.h:11:typedef struct -./config/arch/powerpc/ppc_stubs.h:18:typedef struct -./config/arch/powerpc/ppc_stubs.h:25:typedef struct -./config/arch/powerpc/ppc_stubs.h:34:typedef struct -./config/arch/powerpc/ppc_stubs.h:41:typedef struct -./config/arch/powerpc/ppc_stubs.h:48:typedef struct -./config/arch/powerpc/ppc_stubs.h:55:typedef struct -./config/arch/powerpc/ppc_stubs.h:62:typedef struct -./config/arch/powerpc/ppc_stubs.h:69:typedef struct -./config/arch/powerpc/ppc_stubs.h:76:typedef struct -./config/arch/powerpc/ppc_stubs.h:84:typedef struct +./mkvol/mkvol.c:487: typedef struct +./mkvol/mkvol.c:505: typedef struct +./mkvol/mkvol.c:519: static struct -./include/VRetraceMgr.h:14:typedef struct { -./include/VDriver.h:13:typedef struct -./include/VDriver.h:24:typedef struct -./include/VDriver.h:34:typedef struct -./include/VDriver.h:42:typedef struct -./include/VDriver.h:53:typedef struct -./include/VDriver.h:61:typedef struct -./include/HelpMgr.h:15:typedef struct HMStringResType -./include/HelpMgr.h:21:typedef struct HMMessageRecord -./include/ProcessMgr.h:16:typedef struct ProcessSerialNumber -./include/ProcessMgr.h:32:typedef struct -./include/ProcessMgr.h:44:typedef struct -./include/ProcessMgr.h:70:typedef struct ProcessInfoRec -./include/SoundMgr.h:13:typedef struct { -./include/SoundMgr.h:28:typedef struct _SndChannel { -./include/SoundMgr.h:77:typedef struct { -./include/SoundMgr.h:87:typedef struct _SoundHeader { -./include/SoundMgr.h:98:typedef struct _ExtSoundHeader { -./include/SoundMgr.h:145:typedef struct -./include/SoundMgr.h:158:typedef struct -./include/SoundMgr.h:169:typedef struct _SCSTATUS { -./include/FileMgr.h:73:typedef struct { -./include/FileMgr.h:81:typedef struct { -./include/FileMgr.h:88:typedef struct { -./include/FileMgr.h:95:typedef struct { -./include/FileMgr.h:120:typedef struct { -./include/FileMgr.h:133:typedef struct { -./include/FileMgr.h:153:typedef struct { -./include/FileMgr.h:171:typedef struct { -./include/FileMgr.h:186:typedef struct { -./include/FileMgr.h:199:typedef struct { -./include/FileMgr.h:219:typedef struct { -./include/FileMgr.h:265:typedef struct { -./include/FileMgr.h:283:typedef struct { -./include/FileMgr.h:302:typedef struct { -./include/FileMgr.h:313:typedef struct { -./include/FileMgr.h:324:typedef struct { -./include/FileMgr.h:342:typedef struct { -./include/FileMgr.h:393:typedef struct { -./include/FileMgr.h:406:struct FSSpec -./include/MacTypes.h:58:typedef struct { -./include/MacTypes.h:71:typedef struct Point -./include/MacTypes.h:81:typedef struct Rect -./include/WindowMgr.h:81:struct __wr { -./include/WindowMgr.h:101:typedef struct { -./include/WindowMgr.h:117:typedef struct AuxWinRec { -./include/PPC.h:13:typedef struct EntityName -./include/PPC.h:18:typedef struct LocationNameRec -./include/PPC.h:29:typedef struct PPCPortRec -./include/PPC.h:39: struct -./include/FontMgr.h:54:typedef struct { -./include/FontMgr.h:62:typedef struct { -./include/FontMgr.h:83:typedef struct { -./include/FontMgr.h:107:typedef struct { -./include/FontMgr.h:117:typedef struct { -./include/FontMgr.h:138:typedef struct { -./include/DeviceMgr.h:21:typedef struct { -./include/DeviceMgr.h:30:typedef struct { -./include/DeviceMgr.h:49:typedef struct { -./include/DeviceMgr.h:92:typedef struct { -./include/StartMgr.h:13: struct { -./include/StartMgr.h:19: struct { -./include/StartMgr.h:26:typedef struct { -./include/StartMgr.h:31:typedef struct { -./include/Serial.h:70:typedef struct { -./include/Serial.h:81:typedef struct { -./include/ScrapMgr.h:16:typedef struct { -./include/CQuickDraw.h:7:typedef struct -./include/CQuickDraw.h:17:typedef struct -./include/CQuickDraw.h:37:typedef struct SProcRec -./include/CQuickDraw.h:45:typedef struct CProcRec -./include/CQuickDraw.h:53:typedef struct GDevice -./include/CQuickDraw.h:82:typedef struct ColorInfo -./include/CQuickDraw.h:91:typedef struct Palette -./include/CQuickDraw.h:147:typedef struct ReqListRec -./include/CQuickDraw.h:155:typedef struct OpenCPicParams -./include/CQuickDraw.h:165:typedef struct CommonSpec -./include/CQuickDraw.h:175:typedef struct FontSpec -./include/CQuickDraw.h:188:typedef struct PictInfo -./include/OSUtil.h:27:typedef struct { -./include/OSUtil.h:53:typedef struct { -./include/OSUtil.h:63:typedef struct { -./include/Components.h:11:typedef struct ComponentRecord -./include/Components.h:19:typedef struct ComponentInstanceRecord -./include/QuickTime.h:15:typedef struct MovieRecord -./include/AppleEvents.h:19:typedef struct AEDesc -./include/AppleEvents.h:34:typedef struct AEKeyDesc -./include/AppleEvents.h:115:typedef struct AE_hdlr -./include/AppleEvents.h:121:typedef struct AE_hdlr_selector -./include/AppleEvents.h:127:typedef struct AE_hdlr_table_elt -./include/AppleEvents.h:148:typedef struct AE_hdlr_table -./include/AppleEvents.h:164:typedef struct AE_zone_tables -./include/AppleEvents.h:185:typedef struct AE_info -./include/MemoryMgr.h:27:typedef struct Zone -./include/Disk.h:36:typedef struct { -./include/ADB.h:11:typedef struct -./include/ADB.h:19:typedef struct -./include/ToolboxUtil.h:21:typedef struct { -./include/CommTool.h:11:typedef struct -./include/CommTool.h:35:typedef struct -./include/OSEvent.h:18:typedef struct { -./include/OSEvent.h:58:typedef struct size_info -./include/OSEvent.h:98:typedef struct TargetID -./include/OSEvent.h:106:typedef struct HighLevelEventMsg -./include/DialogMgr.h:33:typedef struct -./include/DialogMgr.h:63:typedef struct -./include/DialogMgr.h:80:typedef struct { -./include/DialogMgr.h:95:typedef struct { -./include/NotifyMgr.h:11:typedef struct { -./include/SegmentLdr.h:21:typedef struct { -./include/ScriptMgr.h:99:typedef struct DateCacheRec -./include/ScriptMgr.h:104:typedef struct LongDateRec -./include/ScriptMgr.h:133:typedef struct -./include/ScriptMgr.h:148:typedef struct -./include/ScriptMgr.h:155:typedef struct -./include/ScriptMgr.h:175:typedef struct -./include/SoundDvr.h:17:typedef struct { -./include/SoundDvr.h:24:typedef struct { -./include/SoundDvr.h:31:typedef struct { -./include/SoundDvr.h:46:typedef struct { -./include/SoundDvr.h:64:typedef struct { -./include/Iconutil.h:98:typedef struct CIcon -./include/ControlMgr.h:87:struct __cr { -./include/ControlMgr.h:103:typedef struct { -./include/ControlMgr.h:117:typedef struct AuxCtlRec { -./include/IntlUtil.h:57:typedef struct { -./include/IntlUtil.h:90:typedef struct { -./include/SANE.h:14: struct { -./include/SANE.h:25: struct { -./include/SANE.h:37:typedef struct { -./include/SANE.h:41: struct { /* Here for added efficiency when BIGENDIAN. */ -./include/SANE.h:51: struct { -./include/SANE.h:68:typedef struct { -./include/SANE.h:77:typedef struct { -./include/SANE.h:93:typedef struct { -./include/StdFilePkg.h:31:typedef struct { -./include/StdFilePkg.h:47:typedef struct -./include/TimeMgr.h:12:typedef struct { -./include/TextEdit.h:53:typedef struct { -./include/TextEdit.h:92:typedef struct { -./include/TextEdit.h:97:typedef struct { -./include/TextEdit.h:113:typedef struct { -./include/TextEdit.h:123:typedef struct { -./include/TextEdit.h:131:typedef struct { -./include/TextEdit.h:144:typedef struct { -./include/TextEdit.h:153:typedef struct { -./include/TextEdit.h:162:typedef struct { -./include/Finder.h:11:typedef struct -./include/EditionMgr.h:16:typedef struct type ## Record type ## Record; \ -./include/EditionMgr.h:22:typedef struct type type; \ -./include/EditionMgr.h:38:struct SectionRecord -./include/EditionMgr.h:56:struct EditionContainerSpec -./include/EditionMgr.h:68:struct EditionInfoRecord -./include/EditionMgr.h:80:struct NewPublisherReply -./include/EditionMgr.h:94:struct NewSubscriberReply -./include/EditionMgr.h:104:struct SectionOptionsReply -./include/EditionMgr.h:123:struct EditionOpenerParamBlock -./include/EditionMgr.h:145:struct FormatIOParamBlock -./include/MenuMgr.h:23:typedef struct { -./include/MenuMgr.h:35:typedef struct MCEntry -./include/OLDSANE.h:11:typedef struct { -./include/OLDSANE.h:16:typedef struct { -./include/OLDSANE.h:22:typedef struct { -./include/OLDSANE.h:29:typedef struct { -./include/OLDSANE.h:44:typedef struct { -./include/PrintMgr.h:40:typedef struct { -./include/PrintMgr.h:49:typedef struct { -./include/PrintMgr.h:58:typedef struct { -./include/PrintMgr.h:67:typedef struct { -./include/PrintMgr.h:81:typedef struct { -./include/PrintMgr.h:94:typedef struct { -./include/PrintMgr.h:110:typedef struct { -./include/PrintMgr.h:124:typedef struct { -./include/ListMgr.h:26:typedef struct { -./include/QuickDraw.h:71:typedef struct { -./include/QuickDraw.h:81:typedef struct { -./include/QuickDraw.h:90:typedef struct { -./include/QuickDraw.h:107:typedef struct { -./include/QuickDraw.h:117:typedef struct { -./include/QuickDraw.h:124:typedef struct { -./include/QuickDraw.h:146:typedef struct { -./include/QuickDraw.h:178:typedef struct { -./include/QuickDraw.h:187:typedef struct { -./include/QuickDraw.h:205:typedef struct { -./include/QuickDraw.h:211:typedef struct { -./include/QuickDraw.h:217:typedef struct { -./include/QuickDraw.h:223:typedef struct { -./include/QuickDraw.h:229:typedef struct ColorSpec -./include/QuickDraw.h:237:typedef struct { -./include/QuickDraw.h:248:typedef struct { -./include/QuickDraw.h:271:typedef struct { -./include/QuickDraw.h:301:typedef struct { -./include/QuickDraw.h:314:typedef struct { -./include/QuickDraw.h:351:typedef struct { -./include/QuickDraw.h:367:typedef struct { -./include/EventMgr.h:66:typedef struct { - -These .h files may have structs that need to be size checked - -./include/rsys/common.h:50:typedef struct -./include/rsys/stdbits.h:4:struct cleanup_info -./include/rsys/file.h:27:typedef struct { -./include/rsys/file.h:34:typedef struct { -./include/rsys/file.h:70:typedef struct { -./include/rsys/file.h:92:typedef struct { -./include/rsys/file.h:99:typedef struct { /* add new elements to the beginning of this struct */ -./include/rsys/file.h:197:typedef struct hashlink_str { -./include/rsys/file.h:204:typedef struct { -./include/rsys/file.h:211: struct { -./include/rsys/file.h:251:typedef struct -./include/rsys/float.h:57: struct { -./include/rsys/float.h:69:typedef struct { -./include/rsys/float.h:77:typedef struct { -./include/rsys/float.h:98: struct { -./include/rsys/tempalloc.h:44:typedef struct -./include/rsys/hfs_plus.h:27:typedef struct HFSUniStr255 -./include/rsys/hfs_plus.h:40:typedef struct HFSPlusPermissions -./include/rsys/hfs_plus.h:49:typedef struct HFSPlusExtentDescriptor -./include/rsys/hfs_plus.h:58:typedef struct HFSPlusForkData -./include/rsys/hfs_plus.h:67:typedef struct HFSPlusVolumeHeader -./include/rsys/hfs_plus.h:98:typedef struct BTNodeDescriptor -./include/rsys/hfs_plus.h:109:typedef struct BTHeaderRec -./include/rsys/hfs_plus.h:129:typedef struct HFSPlusCatalogKey -./include/rsys/hfs_plus.h:137:typedef struct HFSPlusCatalogFolder -./include/rsys/hfs_plus.h:156:typedef struct HFSPlusCatalogFile -./include/rsys/hfs_plus.h:177:typedef struct HFSPlusCatalogThread -./include/rsys/hfs_plus.h:186:typedef struct HFSPlusExtentKey -./include/rsys/hfs_plus.h:196:typedef struct HFSPlusAttrForkData -./include/rsys/hfs_plus.h:204:typedef struct HFSPlusAttrExtents -./include/rsys/commonevt.h:11:typedef struct { -./include/rsys/mactype.h:21:typedef struct { int32 l PACKED; } HIDDEN_LONGINT; -./include/rsys/mactype.h:22:typedef struct { uint32 u PACKED; } HIDDEN_ULONGINT; -./include/rsys/ini.h:15:typedef struct pair_link_str -./include/rsys/options.h:11:typedef struct { -./include/rsys/int386.h:8: struct -./include/rsys/int386.h:12: struct -./include/rsys/int386.h:22: struct -./include/rsys/itm.h:13:typedef struct { -./include/rsys/itm.h:55:typedef struct { -./include/rsys/itm.h:65:typedef struct -./include/rsys/itm.h:81:typedef struct item_style_info -./include/rsys/itm.h:92:typedef struct item_color_info -./include/rsys/print.h:83:typedef struct -./include/rsys/print.h:91:typedef struct -./include/rsys/print.h:98:typedef struct -./include/rsys/print.h:105:typedef struct -./include/rsys/print.h:118:typedef struct -./include/rsys/print.h:129:typedef struct -./include/rsys/print.h:168:typedef struct -./include/rsys/gworld.h:4:typedef struct gw_info -./include/rsys/mixed_mode.h:33:typedef struct RoutineRecord -./include/rsys/mixed_mode.h:45:typedef struct RoutineDescriptor -./include/rsys/mman_private.h:15:typedef struct block_header -./include/rsys/mman_private.h:186:typedef struct -./include/rsys/vgavdriver.h:6:typedef struct -./include/rsys/keyboard.h:15:typedef struct -./include/rsys/keyboard.h:21:typedef struct -./include/rsys/keyboard.h:32:typedef struct -./include/rsys/keyboard.h:56:typedef struct -./include/rsys/menu.h:32:typedef struct { -./include/rsys/menu.h:75:typedef struct { -./include/rsys/menu.h:80:typedef struct menu_elt -./include/rsys/menu.h:115:typedef struct menu_list -./include/rsys/menu.h:128:typedef struct { -./include/rsys/menu.h:160:typedef struct { /* from MPW Private.a */ -./include/rsys/menu.h:174:typedef struct { -./include/rsys/menu.h:242:typedef struct icon_info -./include/rsys/sounddriver.h:6:struct _sound_driver_t -./include/rsys/font.h:8:typedef struct { -./include/rsys/fauxdbm.h:6:typedef struct -./include/rsys/blockdev.h:4:typedef struct _blockdev_t -./include/rsys/resource.h:18:typedef struct { -./include/rsys/resource.h:25:typedef struct { -./include/rsys/resource.h:30:typedef struct { -./include/rsys/resource.h:55:typedef struct { -./include/rsys/resource.h:61:typedef struct { -./include/rsys/resource.h:193:typedef struct -./include/rsys/cquick.h:14:typedef struct GrafVars -./include/rsys/cquick.h:564:typedef struct draw_state -./include/rsys/cquick.h:585:extern struct qd_color_elt -./include/rsys/cquick.h:591:typedef struct write_back_data -./include/rsys/depthconv.h:73:typedef struct -./include/rsys/depthconv.h:81:typedef struct -./include/rsys/newvga.h:13:typedef struct -./include/rsys/newvga.h:42:typedef struct -./include/rsys/newvga.h:52:typedef struct -./include/rsys/newvga.h:82:typedef struct -./include/rsys/newvga.h:87:typedef struct -./include/rsys/licensetext.h:4:typedef struct -./include/rsys/partition.h:15:typedef struct { -./include/rsys/partition.h:43:typedef struct { -./include/rsys/partition.h:51:typedef struct { -./include/rsys/mmanstubs.h:55: struct { -./include/rsys/pef.h:13:typedef struct PEFContainerHeader -./include/rsys/pef.h:59:typedef struct PEFSectionHeader -./include/rsys/pef.h:93:typedef struct PEFLoaderInfoHeader -./include/rsys/pef.h:154:typedef struct PEFImportedLibrary -./include/rsys/pef.h:174:typedef struct PEFLoaderRelocationHeader -./include/rsys/pef.h:214:typedef struct PEFExportedSymbol -./include/rsys/pef.h:248:typedef struct pef_hash -./include/rsys/hfs.h:42:typedef struct { -./include/rsys/hfs.h:47:typedef struct { -./include/rsys/hfs.h:87:typedef struct { -./include/rsys/hfs.h:98:typedef struct { -./include/rsys/hfs.h:105:typedef struct { -./include/rsys/hfs.h:120:typedef struct { -./include/rsys/hfs.h:145:typedef struct { -./include/rsys/hfs.h:161:typedef struct { -./include/rsys/hfs.h:179:typedef struct { -./include/rsys/hfs.h:212:typedef struct { -./include/rsys/hfs.h:254:typedef struct _cacheentry { -./include/rsys/hfs.h:271:typedef struct { -./include/rsys/hfs.h:282:typedef struct { -./include/rsys/hfs.h:295:typedef struct { -./include/rsys/hfs.h:306:typedef struct { /* from MPW equates */ -./include/rsys/custom.h:44:typedef struct -./include/rsys/custom.h:51:typedef struct -./include/rsys/custom.h:59:typedef struct -./include/rsys/custom.h:66:typedef struct -./include/rsys/custom.h:73:typedef struct -./include/rsys/xdata.h:9:typedef struct -./include/rsys/xdata.h:20:typedef struct _xdata_t -./include/rsys/rawblt.h:4:typedef struct -./include/rsys/keycode.h:13:typedef struct -./include/rsys/splash.h:4:struct splash_screen_rect -./include/rsys/splash.h:12:struct splash_screen_header -./include/rsys/splash.h:36: struct splash_screen_rect button_rects[4] -./include/rsys/splash.h:43:struct splash_screen_color -./include/rsys/option.h:20:typedef struct option -./include/rsys/option.h:55:typedef struct opt_val -./include/rsys/option.h:68:typedef struct opt_database -./include/rsys/ctl.h:93:struct popup_data -./include/rsys/cfm.h:18:typedef struct -./include/rsys/cfm.h:37:typedef struct -./include/rsys/cfm.h:111:typedef struct MemFragment -./include/rsys/cfm.h:119:typedef struct DiskFragment -./include/rsys/cfm.h:127:typedef struct SegmentedFragment -./include/rsys/cfm.h:135:typedef struct FragmentLocator -./include/rsys/cfm.h:148:typedef struct InitBlock -./include/rsys/cfm.h:180:typedef struct -./include/rsys/cfm.h:189:typedef struct CFragConnection -./include/rsys/cfm.h:207:typedef struct -./include/rsys/cfm.h:224:typedef struct -./include/rsys/cfm.h:236:typedef struct -./include/rsys/soundopts.h:54:typedef struct _ModifierStub { -./include/rsys/soundopts.h:88:struct hunger_info -./include/rsys/iv.h:13:typedef struct color -./include/rsys/iv.h:18:typedef struct image_header -./include/rsys/checkpoint.h:13:typedef struct -./include/rsys/nextprint.h:24:typedef struct { -./include/rsys/nextprint.h:31:typedef struct { -./include/rsys/nextprint.h:36:typedef struct { -./include/rsys/nextprint.h:42:typedef struct { -./include/rsys/nextprint.h:60:typedef struct { -./include/rsys/nextprint.h:67:typedef struct { -./include/rsys/nextprint.h:73:typedef struct { -./include/rsys/nextprint.h:94:typedef struct { -./include/rsys/vdriver.h:5:struct ColorSpec; -./include/rsys/vdriver.h:21:struct \ -./include/rsys/vdriver.h:25: struct { short width, height; } size[num_entries]; \ -./include/rsys/vdriver.h:34:typedef struct -./include/rsys/image.h:4:typedef struct pixel_image -./include/rsys/image.h:21:typedef struct image_bits_desc -./include/rsys/image.h:28:typedef struct pixel_image_desc -./include/rsys/picture.h:56:typedef struct { -./include/rsys/trapglue.h:4:typedef struct { -./include/rsys/trapglue.h:10:typedef struct { -./include/rsys/trapglue.h:15:typedef struct { -./include/rsys/tesave.h:13:typedef struct -./include/rsys/tesave.h:62:typedef struct generic_elt -./include/rsys/tesave.h:128:typedef struct { /* from MPW: ToolEqu.a */ -./include/rsys/rgbutil.h:8:struct rgb_spec; -./include/rsys/rgbutil.h:13:typedef struct -./include/rsys/rgbutil.h:21:typedef void (*rgb_extract_func_t) (const struct rgb_spec *rgb_spec, -./include/rsys/rgbutil.h:26:typedef struct rgb_spec -./include/rsys/rgbutil.h:49: uint32 (*rgbcolor_to_pixel) (const struct rgb_spec *rgb_spec, -./include/rsys/filedouble.h:30:typedef struct { -./include/rsys/filedouble.h:36:typedef struct { -./include/rsys/filedouble.h:43:typedef struct { -./include/rsys/filedouble.h:50:typedef struct { - -#endif +*/ diff --git a/src/config/front-ends/nextstep/MacAppClass.m b/src/config/front-ends/nextstep/MacAppClass.m index e87face..be1f075 100644 --- a/src/config/front-ends/nextstep/MacAppClass.m +++ b/src/config/front-ends/nextstep/MacAppClass.m @@ -33,7 +33,6 @@ #include "MemoryMgr.h" #include "rsys/soundopts.h" #include "rsys/blockinterrupts.h" -#include "rsys/screen.h" #include "rsys/syn68k_public.h" #include "rsys/prefs.h" #include "rsys/hfs.h" diff --git a/src/config/front-ends/nextstep/NEXTmain.m b/src/config/front-ends/nextstep/NEXTmain.m index 9c9068b..c9f7365 100644 --- a/src/config/front-ends/nextstep/NEXTmain.m +++ b/src/config/front-ends/nextstep/NEXTmain.m @@ -42,7 +42,6 @@ #include "rsys/next.h" #include "rsys/setuid.h" #include "rsys/blockinterrupts.h" -#include "rsys/screen.h" #include "rsys/syn68k_public.h" #include "ourstuff.h" #include "contextswitch.h" diff --git a/src/config/front-ends/nextstep/OldMacViewClass.m b/src/config/front-ends/nextstep/OldMacViewClass.m index c26536a..da09ad4 100644 --- a/src/config/front-ends/nextstep/OldMacViewClass.m +++ b/src/config/front-ends/nextstep/OldMacViewClass.m @@ -54,7 +54,6 @@ char ROMlib_rcsid_MacViewClass[] = #include "rsys/nextprint.h" #include "rsys/blockinterrupts.h" #include "rsys/next.h" -#include "rsys/screen.h" #include "rsys/myabort.h" #include "rsys/trapglue.h" #include "rsys/syn68k_public.h" diff --git a/src/ctlArrows.c b/src/ctlArrows.c index b6e58bc..3917bec 100644 --- a/src/ctlArrows.c +++ b/src/ctlArrows.c @@ -17,9 +17,6 @@ char ROMlib_rcsid_ctlArrows[] = #include "rsys/cquick.h" #include "rsys/ctl.h" -#include "rsys/screen.h" - -#include "rsys/fatal.h" #include "rsys/image.h" #include "rsys/host.h" @@ -695,13 +692,6 @@ restore (const save_t *sp) DisposHandle ((Handle) MR (sp->cp.portPixMap)); } -struct lsastr -{ - Rect limitRect LPACKED; - Rect slopRect LPACKED; - INTEGER axis PACKED; -}; - P4 (PUBLIC pascal, LONGINT, cdef16, /* IMI-328 */ INTEGER, var, ControlHandle, c, INTEGER, mess, LONGINT, param) { diff --git a/src/ctlInit.c b/src/ctlInit.c index 3a7069b..c8d5b65 100644 --- a/src/ctlInit.c +++ b/src/ctlInit.c @@ -107,17 +107,6 @@ P9(PUBLIC pascal trap, ControlHandle, NewControl, WindowPtr, wst, Rect *, r, return retval; } -typedef struct { - Rect _crect LPACKED; - INTEGER _cvalue PACKED; - INTEGER _cvisible PACKED; - INTEGER _cmax PACKED; - INTEGER _cmin PACKED; - INTEGER _cprocid PACKED; - LONGINT _crefcon PACKED; - Byte _ctitle LPACKED; -} contrlrestype; - P2(PUBLIC pascal trap, ControlHandle, GetNewControl, /* IMI-321 */ INTEGER, cid, WindowPtr, wst) { diff --git a/src/ctlMouse.c b/src/ctlMouse.c index 998ee46..6bd6cd1 100644 --- a/src/ctlMouse.c +++ b/src/ctlMouse.c @@ -69,12 +69,6 @@ P3(PUBLIC pascal trap, INTEGER, FindControl, Point, p, /* IMI-323 */ return retval; } -typedef struct { - Rect _tlimit LPACKED; - Rect _tslop LPACKED; - INTEGER _taxis PACKED; -} thumbstr; - typedef pascal void (*actionp)(ControlHandle c, INTEGER part); A3(PRIVATE inline, void, CALLACTION, ControlHandle, ch, INTEGER, inpart, diff --git a/src/ctlStddef.c b/src/ctlStddef.c index add9435..b5c29a3 100644 --- a/src/ctlStddef.c +++ b/src/ctlStddef.c @@ -19,7 +19,6 @@ char ROMlib_rcsid_ctlStddef[] = #include "rsys/ctl.h" #include "rsys/cquick.h" -#include "rsys/screen.h" enum diff --git a/src/dialAlert.c b/src/dialAlert.c index 215dffc..6bd980f 100644 --- a/src/dialAlert.c +++ b/src/dialAlert.c @@ -18,23 +18,15 @@ char ROMlib_rcsid_dialAlert[] = #include "OSUtil.h" #include "rsys/itm.h" -#include "rsys/screen.h" #include "rsys/resource.h" #include "rsys/cquick.h" #include "rsys/mman.h" #include "rsys/options.h" +#include "rsys/dial.h" int16 alert_extra_icon_id = -32768; -static struct -{ - int16 count PACKED; - Handle h PACKED_P; - Rect r LPACKED; - uint8 type LPACKED; - uint8 len LPACKED; - int16 res_id PACKED; -} icon_item_template = +static icon_item_template_t icon_item_template = { /* item count - 1 */ CWC (0), diff --git a/src/dialCreate.c b/src/dialCreate.c index ad376f2..2d12133 100644 --- a/src/dialCreate.c +++ b/src/dialCreate.c @@ -25,14 +25,11 @@ char ROMlib_rcsid_dialCreate[] = #include "rsys/wind.h" #include "rsys/itm.h" #include "rsys/ctl.h" -#include "rsys/screen.h" #include "rsys/glue.h" #include "rsys/mman.h" #include "rsys/resource.h" #include "rsys/host.h" -#include "rsys/fatal.h" - #define _PtrToHand(ptr, hand, len) \ ((void) \ ({ \ diff --git a/src/emustubs.c b/src/emustubs.c index a0b3d3c..3c4101c 100644 --- a/src/emustubs.c +++ b/src/emustubs.c @@ -226,13 +226,6 @@ STUB(ADBReInit) RTS (); } -typedef struct -{ - Ptr buffer PACKED; - ProcPtr proc PACKED; - Ptr data PACKED; -} adbop_t; - STUB(ADBOp) { adbop_t *p; @@ -1780,35 +1773,6 @@ STUB (Pack15) return do_selector_block (pack15_block, EM_D0 & 0xFF, Pack15); } -typedef struct comm_toolbox_dispatch_args -{ - int16 selector PACKED; - - union - { - struct - { - int16 n_items PACKED; - DialogPtr dp PACKED_P; - } shorten_args LPACKED; - struct - { - DITLMethod method PACKED; - Handle new_items_h PACKED_P; - DialogPtr dp PACKED_P; - } append_args LPACKED; - struct - { - DialogPtr dp PACKED_P; - } count_args; - struct - { - QElemPtr qp PACKED_P; - } crm_args; - - } args; -} comm_toolbox_dispatch_args_t; - STUB (CommToolboxDispatch) { comm_toolbox_dispatch_args_t *arg_block; @@ -2601,14 +2565,6 @@ STUB (MoreMasters) RTS (); } -typedef struct -{ - void *startPtr PACKED_P; - void *limitPtr PACKED_P; - short cMoreMasters PACKED; - void *pGrowZone PACKED_P; -} initzonehiddenargs_t; - STUB (InitZone) { initzonehiddenargs_t *ip; diff --git a/src/fileCreate.c b/src/fileCreate.c index a7aac2d..6206429 100644 --- a/src/fileCreate.c +++ b/src/fileCreate.c @@ -18,7 +18,6 @@ char ROMlib_rcsid_fileCreate[] = #include "rsys/file.h" #include "rsys/glue.h" -#include "rsys/assert.h" #include "rsys/filedouble.h" #include "rsys/suffix_maps.h" diff --git a/src/fileDouble.c b/src/fileDouble.c index d8d62f0..3996825 100644 --- a/src/fileDouble.c +++ b/src/fileDouble.c @@ -10,7 +10,6 @@ char ROMlib_rcsid_fileDouble[] = #include "rsys/common.h" #include "FileMgr.h" #include "rsys/file.h" -#include "rsys/assert.h" #if defined (CYGWIN32) #include "winfs.h" @@ -47,10 +46,7 @@ int apple_double_fork_prefix_length; #include "rsys/suffix_maps.h" #include "rsys/osutil.h" -PRIVATE struct defaulthead { - Single_header head LPACKED; - Single_descriptor desc[10] LPACKED; /* we use 4, 6 for spare */ -} ourdefault +PRIVATE defaulthead_t ourdefault #if !defined(__alpha) = { { @@ -112,11 +108,7 @@ PRIVATE void initialize_ourdefault( void ) } #endif /* defined(__alpha) */ -PRIVATE struct defaultentries { - Single_attribs attribs PACKED; - Single_dates dates LPACKED; - Single_finfo finfo LPACKED; -} ourentries; +PRIVATE defaultentries_t ourentries; PUBLIC void double_dir_op (char *name, double_dir_op_t op) diff --git a/src/fileInfo.c b/src/fileInfo.c index 5845d76..91e986d 100644 --- a/src/fileInfo.c +++ b/src/fileInfo.c @@ -21,7 +21,6 @@ char ROMlib_rcsid_fileInfo[] = #include "rsys/glue.h" #include "rsys/osutil.h" #include "rsys/filedouble.h" -#include "rsys/assert.h" #include "rsys/suffix_maps.h" #include diff --git a/src/fileMisc.c b/src/fileMisc.c index 9fff3a7..62f1e0d 100644 --- a/src/fileMisc.c +++ b/src/fileMisc.c @@ -22,8 +22,6 @@ char ROMlib_rcsid_fileMisc[] = #include "rsys/file.h" #include "rsys/notmac.h" #include "rsys/stdfile.h" -#include "rsys/debug.h" -#include "rsys/assert.h" #include "rsys/ini.h" #include "rsys/string.h" #include "rsys/custom.h" diff --git a/src/fileVolumes.c b/src/fileVolumes.c index e5fd765..474058b 100644 --- a/src/fileVolumes.c +++ b/src/fileVolumes.c @@ -21,8 +21,6 @@ char ROMlib_rcsid_fileVolumes[] = #include "rsys/file.h" #include "rsys/glue.h" #include "rsys/notmac.h" -#include "rsys/myabort.h" -#include "rsys/assert.h" #include "rsys/segment.h" #include "rsys/string.h" @@ -66,18 +64,6 @@ char ROMlib_rcsid_fileVolumes[] = #define HASHSIZE 101 -typedef struct { - LONGINT dirid; - INTEGER filesystemlen; - unsigned char hostnamelen; - char hostnameandroot[1]; /* potentially many more */ -} rkey_t; - -typedef struct { - LONGINT parid; - char path[1]; /* potentially many more */ -} rcontent_t; - A2(PRIVATE, hashlink_t **, hashloc, VCBExtra *, vcbp, LONGINT, dir) { hashlink_t **hlpp; diff --git a/src/font.c b/src/font.c index 58886cb..4563ac4 100644 --- a/src/font.c +++ b/src/font.c @@ -264,11 +264,6 @@ INTEGER nhappybits(unsigned short want, unsigned short have) #define WIDTHBIT (1 << 1) -typedef struct { - unsigned short style; - INTEGER table[1]; /* actually more */ -} widentry_t; - A0(PRIVATE, INTEGER *, findfondwidths) { INTEGER *retval, *numentriesminusone; diff --git a/src/gestalt.c b/src/gestalt.c index c506b72..4e1d25f 100644 --- a/src/gestalt.c +++ b/src/gestalt.c @@ -16,7 +16,6 @@ char ROMlib_rcsid_gestalt[] = #include "rsys/prefs.h" #include "rsys/soundopts.h" #include "rsys/mman.h" -#include "rsys/assert.h" #include "rsys/gestalt.h" #include "rsys/version.h" #include "rsys/vdriver.h" diff --git a/src/hfsBtree.c b/src/hfsBtree.c index 7f633d3..c2e01bd 100644 --- a/src/hfsBtree.c +++ b/src/hfsBtree.c @@ -70,7 +70,6 @@ char ROMlib_rcsid_hfsBtree[] = #include "MemoryMgr.h" #include "ToolboxUtil.h" #include "rsys/hfs.h" -#include "rsys/assert.h" #include "rsys/dcache.h" #include "rsys/hfs_plus.h" diff --git a/src/icon.c b/src/icon.c index b197a04..bd68481 100644 --- a/src/icon.c +++ b/src/icon.c @@ -19,6 +19,7 @@ char ROMlib_rcsid_icon[] = #include "rsys/cquick.h" #include "rsys/resource.h" #include "rsys/mman.h" +#include "rsys/icon.h" #define ICON_RETURN_ERROR(error) \ ({ \ @@ -342,20 +343,6 @@ P1 (PUBLIC pascal trap, void, DisposeCIcon, DisposHandle ((Handle) icon); } -#define N_SUITE_ICONS 6 - -/* NOTE: Cotton didn't really use a struct and I'm not about to munch his - code, especially since we don't know the real layout and this is subject - to change. I just wanted to paste in the flags field so we can drop a - label in there. */ - -typedef struct -{ - Handle icons[N_SUITE_ICONS]; - INTEGER label; -} -cotton_suite_layout_t; - #define large_bw_icon 0 #define small_bw_icon 3 diff --git a/src/include/OLDSANE.h b/src/include/OLDSANE.h deleted file mode 100644 index efbd501..0000000 --- a/src/include/OLDSANE.h +++ /dev/null @@ -1,229 +0,0 @@ -#if !defined(__SANE__) -#define __SANE__ - -/* - * Copyright 1990, 1991 by Abacus Research and Development, Inc. - * All rights reserved. - * - * $Id: OLDSANE.h 63 2004-12-24 18:19:43Z ctm $ - */ - -typedef struct { - INTEGER exp PACKED; - INTEGER man[4] PACKED; -} extended80; - -typedef struct { - INTEGER exp PACKED; - INTEGER zero PACKED; - INTEGER man[4] PACKED; -} extended96; - -typedef struct { - LONGINT hilong PACKED; - LONGINT lowlong PACKED; -} comp; - -#define SIGDIGLEN 20 - -typedef struct { - INTEGER sgn PACKED; - INTEGER exp PACKED; - unsigned char sig[SIGDIGLEN] PACKED; -} Decimal; - -typedef enum { FloatDecimal, FixedDecimal = 256 } toobigdecformstyle_t; - -typedef INTEGER DecFormStyle; - -#define DECIMALTYPEMASK 0x0100 - -typedef enum {SNaN = 1, QNaN, Infinite, ZeroNum, NormalNum, DenormalNum} - NumClass; - -typedef struct { - DecFormStyle style PACKED; - INTEGER digits PACKED; -} DecForm; - -#define Decstr char * - -#define FX_OPERAND 0x0000 -#define FD_OPERAND 0x0800 -#define FS_OPERAND 0x1000 -#define FC_OPERAND 0x3000 -#define FI_OPERAND 0x2000 -#define FL_OPERAND 0x2800 - -#define Fx2X_OPCODE 0x000E - -#define FI2X (FI_OPERAND + Fx2X_OPCODE) -/* DO NOT DELETE THIS LINE */ -#if !defined (__STDC__) -extern pascal void ROMlib_Fcomp2X(); -extern void ROMlib_Fsetenv(); -extern void ROMlib_Fgetenv(); -extern void ROMlib_Fprocentry(); -extern void ROMlib_Fprocexit(); -extern void ROMlib_Ftestxcp(); -extern void ROMlib_FsqrtX(); -extern void ROMlib_FscalbX(); -extern void ROMlib_FlogbX(); -extern void ROMlib_FabsX(); -extern void ROMlib_FnegX(); -extern void ROMlib_FrintX(); -extern void ROMlib_FtintX(); -extern void ROMlib_Fcpysgnx(); -extern void ROMlib_Faddx(); -extern void ROMlib_Fsubx(); -extern void ROMlib_Fmulx(); -extern void ROMlib_Fdivx(); -extern void ROMlib_Fremx(); -extern void ROMlib_Fcmpx(); -extern void ROMlib_FcpXx(); -extern void ROMlib_FX2x(); -extern void ROMlib_Fx2X(); -extern void ROMlib_Fx2dec(); -extern void ROMlib_Fdec2x(); -extern void ROMlib_Fclassx(); -extern void ROMlib_FlnX(); -extern void ROMlib_Flog2X(); -extern void ROMlib_Fln1X(); -extern void ROMlib_Flog21X(); -extern void ROMlib_FexpX(); -extern void ROMlib_Fexp2X(); -extern void ROMlib_Fexp1X(); -extern void ROMlib_Fexp21X(); -extern void ROMlib_Fxpwri(); -extern void ROMlib_Fxpwry(); -extern void ROMlib_Fcompound(); -extern void ROMlib_Fannuity(); -extern void ROMlib_FsinX(); -extern void ROMlib_FcosX(); -extern void ROMlib_FtanX(); -extern void ROMlib_FatanX(); -extern void ROMlib_FrandX(); -extern void ROMlib_Fdec2str(); -extern void ROMlib_Fxstr2dec(); -extern void ROMlib_Fcstr2dec(); -extern void ROMlib_Fpstr2dec(); -#else /* __STDC__ */ -extern pascal void C_ROMlib_Fcomp2X( comp volatile sp, extended80 * - volatile dp ); extern pascal void P_ROMlib_Fcomp2X( comp volatile sp, extended80 * - volatile dp ); -extern pascal trap void C_ROMlib_Fsetenv( INTEGER *volatile dp, - INTEGER volatile sel ); extern pascal trap void P_ROMlib_Fsetenv( INTEGER *volatile dp, - INTEGER volatile sel ); -extern pascal trap void C_ROMlib_Fgetenv( INTEGER *volatile dp, - INTEGER volatile sel ); extern pascal trap void P_ROMlib_Fgetenv( INTEGER *volatile dp, - INTEGER volatile sel ); -extern pascal trap void C_ROMlib_Fprocentry( INTEGER *volatile dp, - INTEGER volatile sel ); extern pascal trap void P_ROMlib_Fprocentry( INTEGER *volatile dp, - INTEGER volatile sel ); -extern pascal trap void C_ROMlib_Fprocexit( INTEGER *volatile dp, - INTEGER volatile sel ); extern pascal trap void P_ROMlib_Fprocexit( INTEGER *volatile dp, - INTEGER volatile sel ); -extern pascal trap void C_ROMlib_Ftestxcp( INTEGER *volatile dp, - INTEGER volatile sel ); extern pascal trap void P_ROMlib_Ftestxcp( INTEGER *volatile dp, - INTEGER volatile sel ); -extern pascal trap void C_ROMlib_FsqrtX( extended80 *volatile dp, - unsigned short volatile sel ); extern pascal trap void P_ROMlib_FsqrtX( extended80 *volatile dp, - unsigned short volatile sel ); -extern pascal trap void C_ROMlib_FscalbX( INTEGER *volatile sp, - extended80 *volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_FscalbX( INTEGER *volatile sp, - extended80 *volatile dp, unsigned short volatile sel ); -extern pascal trap void C_ROMlib_FlogbX( extended80 *volatile dp, - unsigned short volatile sel ); extern pascal trap void P_ROMlib_FlogbX( extended80 *volatile dp, - unsigned short volatile sel ); -extern pascal trap void C_ROMlib_FabsX( extended80 *volatile dp, - unsigned short volatile sel ); extern pascal trap void P_ROMlib_FabsX( extended80 *volatile dp, - unsigned short volatile sel ); -extern pascal trap void C_ROMlib_FnegX( extended80 *volatile dp, - unsigned short volatile sel ); extern pascal trap void P_ROMlib_FnegX( extended80 *volatile dp, - unsigned short volatile sel ); -extern pascal trap void C_ROMlib_FrintX( extended80 *volatile dp, - unsigned short volatile sel ); extern pascal trap void P_ROMlib_FrintX( extended80 *volatile dp, - unsigned short volatile sel ); -extern pascal trap void C_ROMlib_FtintX( extended80 *volatile dp, - unsigned short volatile sel ); extern pascal trap void P_ROMlib_FtintX( extended80 *volatile dp, - unsigned short volatile sel ); -extern pascal trap void C_ROMlib_Fcpysgnx( float *volatile sp, - float *volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fcpysgnx( float *volatile sp, - float *volatile dp, unsigned short volatile sel ); -extern pascal trap void C_ROMlib_Faddx( void *volatile sp, extended80 * - volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Faddx( void *volatile sp, extended80 * - volatile dp, unsigned short volatile sel ); -extern pascal trap void C_ROMlib_Fsubx( void *volatile sp, extended80 * - volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fsubx( void *volatile sp, extended80 * - volatile dp, unsigned short volatile sel ); -extern pascal trap void C_ROMlib_Fmulx( void *volatile sp, extended80 * - volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fmulx( void *volatile sp, extended80 * - volatile dp, unsigned short volatile sel ); -extern pascal trap void C_ROMlib_Fdivx( void *volatile sp, extended80 * - volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fdivx( void *volatile sp, extended80 * - volatile dp, unsigned short volatile sel ); -extern pascal trap void C_ROMlib_Fremx( void *volatile sp, - extended80 *volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fremx( void *volatile sp, - extended80 *volatile dp, unsigned short volatile sel ); -extern pascal trap void C_ROMlib_Fcmpx( void *volatile sp, extended80 * - volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fcmpx( void *volatile sp, extended80 * - volatile dp, unsigned short volatile sel ); -extern pascal trap void C_ROMlib_FcpXx( void *volatile sp, extended80 * - volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_FcpXx( void *volatile sp, extended80 * - volatile dp, unsigned short volatile sel ); -extern pascal trap void C_ROMlib_FX2x( extended80 *volatile sp, void * - volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_FX2x( extended80 *volatile sp, void * - volatile dp, unsigned short volatile sel ); -extern pascal trap void C_ROMlib_Fx2X( void *volatile sp, extended80 * - volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fx2X( void *volatile sp, extended80 * - volatile dp, unsigned short volatile sel ); -extern pascal trap void C_ROMlib_Fx2dec( DecForm *volatile sp2, void * - volatile sp, Decimal *volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fx2dec( DecForm *volatile sp2, void * - volatile sp, Decimal *volatile dp, unsigned short volatile sel ); -extern pascal trap void C_ROMlib_Fdec2x( Decimal *volatile sp, void * - volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fdec2x( Decimal *volatile sp, void * - volatile dp, unsigned short volatile sel ); -extern pascal trap void C_ROMlib_Fclassx( void *volatile sp, INTEGER * - volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fclassx( void *volatile sp, INTEGER * - volatile dp, unsigned short volatile sel ); -extern pascal trap void C_ROMlib_FlnX( extended80 *volatile dp ); extern pascal trap void P_ROMlib_FlnX( extended80 *volatile dp); -extern pascal trap void C_ROMlib_Flog2X( extended80 *volatile dp ); extern pascal trap void P_ROMlib_Flog2X( extended80 *volatile dp); -extern pascal trap void C_ROMlib_Fln1X( extended80 *volatile dp ); extern pascal trap void P_ROMlib_Fln1X( extended80 *volatile dp); -extern pascal trap void C_ROMlib_Flog21X( extended80 *volatile dp ); extern pascal trap void P_ROMlib_Flog21X( extended80 *volatile dp); -extern pascal trap void C_ROMlib_FexpX( extended80 *volatile dp ); extern pascal trap void P_ROMlib_FexpX( extended80 *volatile dp); -extern pascal trap void C_ROMlib_Fexp2X( extended80 *volatile dp ); extern pascal trap void P_ROMlib_Fexp2X( extended80 *volatile dp); -extern pascal trap void C_ROMlib_Fexp1X( extended80 *volatile dp ); extern pascal trap void P_ROMlib_Fexp1X( extended80 *volatile dp); -extern pascal trap void C_ROMlib_Fexp21X( extended80 *volatile dp ); extern pascal trap void P_ROMlib_Fexp21X( extended80 *volatile dp); -extern pascal trap void C_ROMlib_Fxpwri( INTEGER *volatile sp, - extended80 *volatile dp ); extern pascal trap void P_ROMlib_Fxpwri( INTEGER *volatile sp, - extended80 *volatile dp ); -extern pascal trap void C_ROMlib_Fxpwry( extended80 *volatile sp, - extended80 *volatile dp ); extern pascal trap void P_ROMlib_Fxpwry( extended80 *volatile sp, - extended80 *volatile dp ); -extern pascal trap void C_ROMlib_Fcompound( extended80 *volatile sp2, - extended80 *volatile sp, extended80 *volatile dp ); extern pascal trap void P_ROMlib_Fcompound( extended80 *volatile sp2, - extended80 *volatile sp, extended80 *volatile dp ); -extern pascal trap void C_ROMlib_Fannuity( extended80 *volatile sp2, - extended80 *volatile sp, extended80 *volatile dp ); extern pascal trap void P_ROMlib_Fannuity( extended80 *volatile sp2, - extended80 *volatile sp, extended80 *volatile dp ); -extern pascal trap void C_ROMlib_FsinX( extended80 *volatile dp ); extern pascal trap void P_ROMlib_FsinX( extended80 *volatile dp); -extern pascal trap void C_ROMlib_FcosX( extended80 *volatile dp ); extern pascal trap void P_ROMlib_FcosX( extended80 *volatile dp); -extern pascal trap void C_ROMlib_FtanX( extended80 *volatile dp ); extern pascal trap void P_ROMlib_FtanX( extended80 *volatile dp); -extern pascal trap void C_ROMlib_FatanX( extended80 *volatile dp ); extern pascal trap void P_ROMlib_FatanX( extended80 *volatile dp); -extern pascal trap void C_ROMlib_FrandX( extended80 *volatile dp ); extern pascal trap void P_ROMlib_FrandX( extended80 *volatile dp); -extern pascal trap void C_ROMlib_Fdec2str( DecForm *volatile sp2, - Decimal *volatile sp, Decstr volatile dp ); extern pascal trap void P_ROMlib_Fdec2str( DecForm *volatile sp2, - Decimal *volatile sp, Decstr volatile dp ); -extern pascal trap void C_ROMlib_Fxstr2dec( Decstr volatile sp2, - INTEGER *volatile sp, Decimal *volatile dp2, Byte *volatile dp, - INTEGER lastchar ); extern pascal trap void P_ROMlib_Fxstr2dec( Decstr volatile sp2, - INTEGER *volatile sp, Decimal *volatile dp2, Byte *volatile dp, - INTEGER lastchar ); -extern pascal trap void C_ROMlib_Fcstr2dec( Decstr volatile sp2, - INTEGER *volatile sp, Decimal *volatile dp2, Byte *volatile dp ); extern pascal trap void P_ROMlib_Fcstr2dec( Decstr volatile sp2, - INTEGER *volatile sp, Decimal *volatile dp2, Byte *volatile dp ); -extern pascal trap void C_ROMlib_Fpstr2dec( Decstr volatile sp2, - INTEGER *volatile sp, Decimal *volatile dp2, Byte *volatile dp ); extern pascal trap void P_ROMlib_Fpstr2dec( Decstr volatile sp2, - INTEGER *volatile sp, Decimal *volatile dp2, Byte *volatile dp ); -#endif /* __STDC__ */ -#endif diff --git a/src/include/SysError.h b/src/include/SysError.h deleted file mode 100644 index e69de29..0000000 diff --git a/src/include/VDriver.h b/src/include/VDriver.h index 9582f12..c56cb0e 100644 --- a/src/include/VDriver.h +++ b/src/include/VDriver.h @@ -52,7 +52,7 @@ typedef VDPgInfo *VDPgInfoPtr; typedef struct { - SignedByte flag PACKED; + SignedByte flag LPACKED; } VDFlagRec; typedef VDFlagRec *VDFlagPtr; @@ -60,7 +60,7 @@ typedef VDFlagRec *VDFlagPtr; typedef struct { - SignedByte spID; PACKED; + SignedByte spID LPACKED; } VDDefModeRec; typedef VDDefModeRec *VDDefModePtr; diff --git a/src/include/pascal.h b/src/include/pascal.h deleted file mode 100644 index 55ad8c2..0000000 --- a/src/include/pascal.h +++ /dev/null @@ -1,3 +0,0 @@ -/* - * $Id: pascal.h 63 2004-12-24 18:19:43Z ctm $ - */ diff --git a/src/include/rsys/alias.h b/src/include/rsys/alias.h new file mode 100644 index 0000000..53eb655 --- /dev/null +++ b/src/include/rsys/alias.h @@ -0,0 +1,70 @@ +#if !defined (__rsys_alias_h__) +# define __rsys_alias_h__ + +typedef unsigned char Str27[28]; + +typedef struct +{ + OSType type PACKED; + INTEGER length PACKED; + INTEGER usually_2 PACKED; + INTEGER usually_0 PACKED; + Str27 volumeName LPACKED; + LONGINT ioVCrDate PACKED; + INTEGER ioVSigWord PACKED; + INTEGER zero_or_one PACKED; + LONGINT zero_or_neg_one PACKED; + Str63 fileName LPACKED; + LONGINT ioDirID PACKED; /* -1 full */ + LONGINT ioFlCrDat PACKED; + OSType type_info PACKED; + OSType creator PACKED; + INTEGER mystery_words[10] PACKED; +} +alias_head_t; + +typedef struct /* 0x0000 */ +{ + INTEGER parent_length PACKED; + unsigned char parent_bytes[1] LPACKED; +} +alias_parent_t; + +typedef struct /* 0x0001 */ +{ + INTEGER eight PACKED; + LONGINT mystery_longs[2] PACKED; +} +alias_unknown_000100_t; + +typedef struct /* 0x0002 */ +{ + INTEGER fullpath_length PACKED; + unsigned char fullpath_bytes[1] LPACKED; +} +alias_fullpath_t; + +typedef struct /* 0x0009 */ +{ + INTEGER length PACKED; + INTEGER weird_info[12] PACKED; + Str32 zone LPACKED; + Str31 server LPACKED; + Str27 volumeName LPACKED; + Str32 network_identity_owner_name LPACKED; + char filler_zeros[18] LPACKED; +} +alias_tail_t; + +typedef struct +{ + alias_head_t *headp PACKED; + alias_parent_t *parentp PACKED; + alias_unknown_000100_t *unknownp PACKED; + alias_fullpath_t *fullpathp PACKED; + alias_tail_t *tailp PACKED; +} +alias_parsed_t; + + +#endif /* !defined (__rsys_alias_h__) */ diff --git a/src/include/rsys/apple_events.h b/src/include/rsys/apple_events.h new file mode 100644 index 0000000..2b84528 --- /dev/null +++ b/src/include/rsys/apple_events.h @@ -0,0 +1,111 @@ +#if !defined (__rsys_apple_events_h__) +# define __rsys_apple_events_h__ + +/* #### internal */ + +typedef struct +{ + DescType type PACKED; + uint32 size PACKED; + char data[0] LPACKED; +} inline_desc_t; + +typedef struct +{ + int32 key PACKED; + DescType type PACKED; + uint32 size PACKED; + char data[0] LPACKED; +} inline_key_desc_t; + +typedef struct list_header +{ + /* #### always zero (?) */ + uint32 unknown_1 PACKED; + + /* #### contains an applzone address */ + uint32 unknown_2 PACKED; + + uint32 param_offset PACKED; + + /* contains a tick that identifies the object, either `list' or + `reco'; for an apple event, this fiend contains the offset to the + parameter section */ + uint32 attribute_count PACKED; + + uint32 param_count PACKED; + + /* ### always zero (?) */ + int32 unknown_3 PACKED; + + /* offset: 0x18 */ + char data[0] LPACKED; +} list_header_t; + +typedef struct { list_header_t *p PACKED_P; } hidden_list_header_ptr; +typedef hidden_list_header_ptr *list_header_h; + +#define PARAM_OFFSET_X(aggr_desc_h) \ + (HxX ((list_header_h) aggr_desc_h, param_offset)) +#define PARAM_COUNT_X(aggr_desc_h) \ + (HxX ((list_header_h) aggr_desc_h, param_count)) +#define ATTRIBUTE_COUNT_X(aggr_desc_h) \ + (HxX ((list_header_h) aggr_desc_h, attribute_count)) + +#define PARAM_COUNT(aggr_desc_h) (CL (PARAM_COUNT_X (aggr_desc_h))) +#define PARAM_OFFSET(aggr_desc_h) (CL (PARAM_OFFSET_X (aggr_desc_h))) +#define ATTRIBUTE_COUNT(aggr_desc_h) (CL (ATTRIBUTE_COUNT_X (aggr_desc_h))) + +typedef struct ae_header +{ + /* #### always zero (?) */ + uint32 unknown_1 PACKED; + + /* #### contains unknown values */ + uint32 unknown_2 PACKED; + + uint32 param_offset PACKED; + + uint32 attribute_count PACKED; + uint32 param_count PACKED; + + /* #### zero pad, use unknown */ + char pad_1[26] LPACKED; + + AEEventClass event_class PACKED; + AEEventID event_id PACKED; + + /* #### takes on various values, no idea */ + uint32 unknown_3 PACKED; + + /* beginning of target inline descriptor; `target->size' determines + target's actual size */ + inline_desc_t target LPACKED; + +#if 0 + /* for show */ + /* #### contains `aevt' tick */ + uint32 unknown_4; + + /* contains 0x00010001 */ + uint32 unknown_5; + + char attribute_data[...]; + + /* marker containing tick `;;;;' */ + uint32 unknown_6; + + char param_data[...]; +#endif +} ae_header_t; + +typedef struct subdesc_info +{ + int count; + int base_offset; + uint32 *count_p; + boolean_t key_p; + int inline_desc_header_size; +} subdesc_info_t; + +#endif /* !defined (__rsys_apple_events_h__) */ diff --git a/src/include/rsys/assert.h b/src/include/rsys/assert.h deleted file mode 100644 index e69de29..0000000 diff --git a/src/include/rsys/cfm.h b/src/include/rsys/cfm.h index 0814877..a0a67cc 100644 --- a/src/include/rsys/cfm.h +++ b/src/include/rsys/cfm.h @@ -114,7 +114,7 @@ typedef struct MemFragment uint32 length PACKED; BOOLEAN inPlace LPACKED; } -MemFragment; +MemFragment; typedef struct DiskFragment { diff --git a/src/include/rsys/commonevt.h b/src/include/rsys/commonevt.h index 76fbcb9..61f4cbd 100644 --- a/src/include/rsys/commonevt.h +++ b/src/include/rsys/commonevt.h @@ -11,11 +11,11 @@ typedef struct { enum { commonkeypress, commonkeyrelease, commonbuttonpress, commonbuttonrelease, commonexpose, commonenternotify, - commonleavenotify, commonmotionnotify } type PACKED; - INTEGER button PACKED; - INTEGER x PACKED; - INTEGER y PACKED; - LONGINT state PACKED; + commonleavenotify, commonmotionnotify } type; + INTEGER button; + INTEGER x; + INTEGER y; + LONGINT state; } commonevent; #define commonshiftmask (1 << 0) diff --git a/src/include/rsys/cquick.h b/src/include/rsys/cquick.h index c126f7c..715691d 100644 --- a/src/include/rsys/cquick.h +++ b/src/include/rsys/cquick.h @@ -594,6 +594,12 @@ typedef struct write_back_data Rect src_rect, dst_rect; } write_back_data_t; +struct pixpat_res +{ + PixPat pixpat; + PixMap patmap; +}; + void pixmap_free_copy (PixMap *pm); void pixmap_copy (const PixMap *src_pm, const Rect *src_rect, PixMap *return_pm, Rect *return_rect); diff --git a/src/include/rsys/ctl.h b/src/include/rsys/ctl.h index eb1d922..b8e8da5 100644 --- a/src/include/rsys/ctl.h +++ b/src/include/rsys/ctl.h @@ -105,6 +105,30 @@ typedef popup_data_t *popup_data_ptr; typedef struct { popup_data_ptr p PACKED_P; } hidden_popup_data_ptr; typedef hidden_popup_data_ptr *popup_data_handle; +typedef struct { + Rect _tlimit LPACKED; + Rect _tslop LPACKED; + INTEGER _taxis PACKED; +} thumbstr; + +typedef struct { + Rect _crect LPACKED; + INTEGER _cvalue PACKED; + INTEGER _cvisible PACKED; + INTEGER _cmax PACKED; + INTEGER _cmin PACKED; + INTEGER _cprocid PACKED; + LONGINT _crefcon PACKED; + Byte _ctitle LPACKED; +} contrlrestype; + +struct lsastr +{ + Rect limitRect LPACKED; + Rect slopRect LPACKED; + INTEGER axis PACKED; +}; + extern BOOLEAN ROMlib_cdef0_is_rectangular; extern void image_arrow_up_active_init (void); diff --git a/src/include/rsys/debug.h b/src/include/rsys/debug.h deleted file mode 100644 index e69de29..0000000 diff --git a/src/include/rsys/dial.h b/src/include/rsys/dial.h new file mode 100644 index 0000000..c6eb114 --- /dev/null +++ b/src/include/rsys/dial.h @@ -0,0 +1,14 @@ +#if !defined (__rsys_dial_h__) +# define __rsys_dial_h__ + +typedef struct +{ + int16 count PACKED; + Handle h PACKED_P; + Rect r LPACKED; + uint8 type LPACKED; + uint8 len LPACKED; + int16 res_id PACKED; +} icon_item_template_t; + +#endif /* !defined (__rsys_dial_h__) */ diff --git a/src/include/rsys/emustubs.h b/src/include/rsys/emustubs.h index 63b0496..509fbc0 100644 --- a/src/include/rsys/emustubs.h +++ b/src/include/rsys/emustubs.h @@ -8,6 +8,51 @@ * $Id: emustubs.h 63 2004-12-24 18:19:43Z ctm $ */ +typedef struct +{ + Ptr buffer PACKED; + ProcPtr proc PACKED; + Ptr data PACKED; +} adbop_t; + +typedef struct comm_toolbox_dispatch_args +{ + int16 selector PACKED; + + union + { + struct + { + int16 n_items PACKED; + DialogPtr dp PACKED_P; + } shorten_args LPACKED; + struct + { + DITLMethod method PACKED; + Handle new_items_h PACKED_P; + DialogPtr dp PACKED_P; + } append_args LPACKED; + struct + { + DialogPtr dp PACKED_P; + } count_args; + struct + { + QElemPtr qp PACKED_P; + } crm_args; + + } args; +} comm_toolbox_dispatch_args_t; + +typedef struct +{ + void *startPtr PACKED_P; + void *limitPtr PACKED_P; + short cMoreMasters PACKED; + void *pGrowZone PACKED_P; +} initzonehiddenargs_t; + + extern void ROMlib_GetTrapAddress_helper (uint32 *d0p, uint32 d1, uint32 *a0p); extern void ROMlib_reset_bad_trap_addresses (void); extern void C_pack8_unknown_selector (void); diff --git a/src/include/rsys/fatal.h b/src/include/rsys/fatal.h deleted file mode 100644 index e69de29..0000000 diff --git a/src/include/rsys/file.h b/src/include/rsys/file.h index aec4454..99aa389 100644 --- a/src/include/rsys/file.h +++ b/src/include/rsys/file.h @@ -104,6 +104,18 @@ typedef struct { /* add new elements to the beginning of this struct */ LONGINT CrDat PACKED; } hiddeninfo; +typedef struct { + LONGINT dirid; + INTEGER filesystemlen; + unsigned char hostnamelen; + char hostnameandroot[1]; /* potentially many more */ +} rkey_t; + +typedef struct { + LONGINT parid; + char path[1]; /* potentially many more */ +} rcontent_t; + #define FILLOCK 1 /* dirflags & FILLOCK tell whether file is locked */ #define VOLCHAR ':' diff --git a/src/include/rsys/filedouble.h b/src/include/rsys/filedouble.h index 26a1d2a..5e5e05f 100644 --- a/src/include/rsys/filedouble.h +++ b/src/include/rsys/filedouble.h @@ -54,6 +54,18 @@ typedef struct { typedef ULONGINT Single_attribs; + +typedef struct defaulthead { + Single_header head LPACKED; + Single_descriptor desc[10] LPACKED; /* we use 4, 6 for spare */ +} defaulthead_t; + +typedef struct defaultentries { + Single_attribs attribs PACKED; + Single_dates dates LPACKED; + Single_finfo finfo LPACKED; +} defaultentries_t; + #define SINGLEMAGIC 0x0051600 #define DOUBLEMAGIC 0x0051607 diff --git a/src/include/rsys/font.h b/src/include/rsys/font.h index de88633..e8a61d0 100644 --- a/src/include/rsys/font.h +++ b/src/include/rsys/font.h @@ -11,6 +11,11 @@ typedef struct { INTEGER fontresid PACKED; } fatabentry; +typedef struct { + unsigned short style; + INTEGER table[1]; /* actually more */ +} widentry_t; + typedef WidthTable *WPtr; typedef struct { WPtr p PACKED_P; } HIDDEN_WPtr; typedef HIDDEN_WPtr *WHandle; diff --git a/src/include/rsys/icon.h b/src/include/rsys/icon.h new file mode 100644 index 0000000..e8592da --- /dev/null +++ b/src/include/rsys/icon.h @@ -0,0 +1,18 @@ +#if !defined (__rsys_icon_h__) +#define __rsys_icon_h__ + +#define N_SUITE_ICONS 6 + +/* NOTE: Cotton didn't really use a struct and I'm not about to munch his + code, especially since we don't know the real layout and this is subject + to change. I just wanted to paste in the flags field so we can drop a + label in there. */ + +typedef struct +{ + Handle icons[N_SUITE_ICONS]; + INTEGER label; +} +cotton_suite_layout_t; + +#endif /* !defined (__rsys_icon_h__) */ diff --git a/src/include/rsys/launch.h b/src/include/rsys/launch.h index 4d71aa9..918110e 100644 --- a/src/include/rsys/launch.h +++ b/src/include/rsys/launch.h @@ -23,6 +23,12 @@ typedef enum } launch_failure_t; +typedef struct { + unsigned char c[4] LPACKED; + short loc PACKED; + unsigned char shortname[1] LPACKED; +} vers_t; + extern launch_failure_t ROMlib_launch_failure; extern INTEGER ROMlib_exevrefnum; diff --git a/src/include/rsys/menu.h b/src/include/rsys/menu.h index 0d8a570..6ec7011 100644 --- a/src/include/rsys/menu.h +++ b/src/include/rsys/menu.h @@ -251,6 +251,35 @@ typedef struct icon_info int width, height; } icon_info_t; + +typedef struct mct_res +{ + int16 n_entries; + MCEntry entries[1]; +} mct_res_t; + +typedef struct { + INTEGER nmen; + INTEGER mrid[1]; +} mbartype; + +typedef struct { + muelem *startp; + muelem *endp; +} startendpairs[2]; + +typedef struct +{ + int32 lasttick PACKED; + int16 count PACKED; + struct tableentry + { + int16 top PACKED; + StringPtr name PACKED; + mextp options PACKED; + } entry[1]; +} table, *tablePtr, **tableHandle; + extern int ROMlib_sticky_menus_p; extern int ROMlib_AppleChar; diff --git a/src/include/rsys/mman_private.h b/src/include/rsys/mman_private.h index f678b5b..3d66a83 100644 --- a/src/include/rsys/mman_private.h +++ b/src/include/rsys/mman_private.h @@ -193,6 +193,14 @@ typedef struct } zone_info_t; + +typedef struct { + Zone *sp PACKED_P; + Ptr lp PACKED_P; + INTEGER mm PACKED; + ProcPtr gz PACKED_P; +} pblock_t; + extern void ROMlib_sledgehammer_zone (THz zone, boolean_t print_p, const char *fn, const char *file, int lineno, const char *where, diff --git a/src/include/rsys/mmanstubs.h b/src/include/rsys/mmanstubs.h index 1a87c89..79e00bf 100644 --- a/src/include/rsys/mmanstubs.h +++ b/src/include/rsys/mmanstubs.h @@ -10,9 +10,11 @@ /* Stubs for calling of register based traps to the memory manager */ #if !defined(BINCOMPAT) || defined(SYN68K) - Only valid for bincompat. +# error "Only valid for bincompat, on real 680x0 (not Syn68k)" #endif +#include + extern OSErr MemErr; #include "rsys/trapdefines.h" @@ -52,12 +54,7 @@ static inline void InitZone(ProcPtr pGrowZone, INTEGER cMoreMasters, Ptr limitPtr, Zone *startPtr) { - struct { - Zone *sp PACKED_P; - Ptr lp PACKED_P; - INTEGER mm PACKED; - ProcPtr gz PACKED_P; - } pblock; + pblock_t pblock; pblock.sp = startPtr; pblock.lp = limitPtr; diff --git a/src/include/rsys/myabort.h b/src/include/rsys/myabort.h deleted file mode 100644 index e69de29..0000000 diff --git a/src/include/rsys/process.h b/src/include/rsys/process.h new file mode 100644 index 0000000..0a2e141 --- /dev/null +++ b/src/include/rsys/process.h @@ -0,0 +1,11 @@ +#if !defined (__rsys_process_h__) +# define __rsys_process_h__ + +typedef struct size_resource +{ + int16 flags PACKED; + int32 pref_size PACKED; + int32 min_size PACKED; +} size_resource_t; + +#endif /* !defined (__rsys_process_h__) */ diff --git a/src/include/rsys/quick.h b/src/include/rsys/quick.h index f83fc0d..f618ba4 100644 --- a/src/include/rsys/quick.h +++ b/src/include/rsys/quick.h @@ -14,6 +14,13 @@ in inline functions below */ #include "rsys/trapglue.h" +typedef struct ccrsr_res +{ + CCrsr crsr LPACKED; + PixMap crsr_map LPACKED; + char data LPACKED; +} ccrsr_res, *ccrsr_res_ptr; + extern boolean_t ROMlib_text_output_disabled_p; #define SMALLRGN sizeof(Region) /* 0x000A */ diff --git a/src/include/rsys/resource.h b/src/include/rsys/resource.h index 0fa5e33..9815c4c 100644 --- a/src/include/rsys/resource.h +++ b/src/include/rsys/resource.h @@ -66,6 +66,14 @@ typedef struct { Handle rhand PACKED_P; } resref; +typedef struct { /* empty resource template */ + reshead bhead LPACKED; + rsrvrec bfill LPACKED; + resmap bmap LPACKED; + INTEGER negone PACKED; +} empty_resource_template_t; + + #if !defined (__STDC__) extern resmaphand ROMlib_rntohandl(); extern Handle ROMlib_mgetres(); @@ -201,5 +209,10 @@ typedef struct } dcomp_info_t; +typedef struct { + LONGINT diskoff; + resref *rrptr; +} res_sorttype_t; + #define __MYRESOURCE__ #endif /* __MYRESOURCE__ */ diff --git a/src/include/rsys/safe_alloca.h b/src/include/rsys/safe_alloca.h index 076d50f..dbc3d42 100644 --- a/src/include/rsys/safe_alloca.h +++ b/src/include/rsys/safe_alloca.h @@ -1,8 +1,6 @@ #if !defined(__safe_alloca__) #define __safe_alloca__ -#include "rsys/assert.h" - #if !defined(NDEBUG) #define FIREWALL_START 0x940504FE diff --git a/src/include/rsys/screen-dump.h b/src/include/rsys/screen-dump.h new file mode 100644 index 0000000..0df10c7 --- /dev/null +++ b/src/include/rsys/screen-dump.h @@ -0,0 +1,26 @@ +#if !defined (__rsys_screen_dump_h__) +# define __rsys_screen_dump_h__ + +struct header +{ + int16 byte_order __attribute__ ((packed)); + int16 magic_number __attribute__ ((packed)); + int32 ifd_offset __attribute__ ((packed)); +}; + +struct directory_entry +{ + int16 tag __attribute__ ((packed)); + int16 type __attribute__ ((packed)); + int32 count __attribute__ ((packed)); + int32 value_offset __attribute__ ((packed)); +}; + +struct ifd +{ + int16 count __attribute__ ((packed)); + /* gcc 4.3.0 warns if we leave the following packed attribute in */ + struct directory_entry entries[1] /* __attribute__ ((packed)) */; +}; + +#endif /* !defined (__rsys_screen_dump_h__) */ diff --git a/src/include/rsys/screen.h b/src/include/rsys/screen.h deleted file mode 100644 index 9ee4adc..0000000 --- a/src/include/rsys/screen.h +++ /dev/null @@ -1 +0,0 @@ -/* This file is obsolete and should be axed. */ diff --git a/src/include/rsys/segment.h b/src/include/rsys/segment.h index 13f15dd..30b93f1 100644 --- a/src/include/rsys/segment.h +++ b/src/include/rsys/segment.h @@ -3,7 +3,18 @@ extern char ROMlib_exit; + #if !defined (USE_WINDOWS_NOT_MAC_TYPEDEFS_AND_DEFINES) + +#include + +typedef struct { + INTEGER message; + INTEGER count; + AppFile files[1]; +} finderinfo; + + extern int ROMlib_print; extern void flushcache( void ); extern void SFSaveDisk_Update (INTEGER vrefnum, Str255 filename); diff --git a/src/include/rsys/serial.h b/src/include/rsys/serial.h index ab7fb1a..ac6e994 100644 --- a/src/include/rsys/serial.h +++ b/src/include/rsys/serial.h @@ -8,6 +8,11 @@ * $Id: serial.h 63 2004-12-24 18:19:43Z ctm $ */ +typedef struct { + Ptr p; + INTEGER i; +} sersetbuf_t; + extern OSErr ROMlib_serialopen (ParmBlkPtr pbp, DCtlPtr dcp); extern OSErr ROMlib_serialprime (ParmBlkPtr pbp, DCtlPtr dcp); extern OSErr ROMlib_serialctl (ParmBlkPtr pbp, DCtlPtr dcp); diff --git a/src/include/rsys/stubs.h b/src/include/rsys/stubs.h deleted file mode 100644 index e69de29..0000000 diff --git a/src/include/rsys/syserr.h b/src/include/rsys/syserr.h new file mode 100644 index 0000000..389026b --- /dev/null +++ b/src/include/rsys/syserr.h @@ -0,0 +1,106 @@ +#if !defined (__rsys_syserr_h__) +# define __rsys_syserr_h__ + +typedef struct { + INTEGER count PACKED; + + INTEGER id1 PACKED, + len1 PACKED, + prim1 PACKED, + sec1 PACKED, + icon1 PACKED, + proc1 PACKED, + but1 PACKED; + + INTEGER id2 PACKED, + len2 PACKED; + Point point2 LPACKED; + unsigned char str2[52] LPACKED; + + INTEGER id3 PACKED, + len3 PACKED; + + Rect rect3 LPACKED; + char icon3[32][4] LPACKED; + + INTEGER id4 PACKED, + len4 PACKED; + + Point point4 LPACKED; + char str4[46] LPACKED; + + INTEGER id5 PACKED, + len5 PACKED, + num5 PACKED, + str5 PACKED; + Rect rect5 LPACKED; + INTEGER proc5 PACKED, + str5b PACKED; + Rect rect5b LPACKED; + INTEGER proc5b PACKED; + + INTEGER id6 PACKED, + len6 PACKED; + + char str6[4] LPACKED; + + INTEGER id7 PACKED, + len7 PACKED; + char str7[6] LPACKED; + + INTEGER id8 PACKED, + len8 PACKED; + void (*func8)(void) PACKED; + +} myalerttab_t; + + +struct adef { + INTEGER id PACKED, + alen PACKED, + primetextid PACKED, + secondtextid PACKED, + iconid PACKED, + procid PACKED, + buttonid PACKED; +}; + +struct tdef { + INTEGER id PACKED, + alen PACKED; + Point loc LPACKED; + char text[1] LPACKED; /* at least one NUL byte */ +}; + +struct idef { + INTEGER id PACKED, + alen PACKED; + Rect loc LPACKED; + LONGINT ike[32] PACKED; +}; + +struct pdef { + INTEGER id PACKED, + alen PACKED; + void (*proc)() PACKED; + /* NOTE: THIS IS NOT THE WAY IT WORKS IN THE M*C */ +}; + +struct bdef { + INTEGER id PACKED, + alen PACKED, + nbut PACKED; + struct but { + INTEGER butstrid PACKED; + Rect butloc LPACKED; + INTEGER butprocid PACKED; + } buts[1] LPACKED; +}; + +struct sdef { + INTEGER id PACKED, + alen PACKED; + char text[1] LPACKED; +}; + +#endif /* !defined (__rsys_syserr_h__) */ diff --git a/src/include/rsys/toolevent.h b/src/include/rsys/toolevent.h index 31d2589..13374df 100644 --- a/src/include/rsys/toolevent.h +++ b/src/include/rsys/toolevent.h @@ -8,6 +8,13 @@ * $Id: toolevent.h 63 2004-12-24 18:19:43Z ctm $ */ +typedef struct { + INTEGER version; + INTEGER tableno[256]; + INTEGER ntables; + Byte table[1][128]; /* who knows how many */ +} keymap; + extern void dofloppymount (void); extern BOOLEAN ROMlib_beepedonce; extern int ROMlib_right_button_modifier; diff --git a/src/include/rsys/wind.h b/src/include/rsys/wind.h index 79f24c7..aff8a19 100644 --- a/src/include/rsys/wind.h +++ b/src/include/rsys/wind.h @@ -18,6 +18,17 @@ #include "rsys/smash.h" #include "rsys/pstuff.h" +typedef struct { + Rect _wrect LPACKED; + INTEGER _wprocid PACKED; + char _wvisible LPACKED; + char _padding1 LPACKED; + char _wgoaway LPACKED; + char _padding2 LPACKED; + LONGINT _wrefcon PACKED; + Byte _wtitle LPACKED; +} windrestype; + extern LONGINT C_wdef0 (INTEGER, WindowPtr, INTEGER, LONGINT), C_wdef16(INTEGER, WindowPtr, INTEGER, LONGINT); diff --git a/src/iu.c b/src/iu.c index c195ebc..ed93bbc 100644 --- a/src/iu.c +++ b/src/iu.c @@ -17,7 +17,6 @@ char ROMlib_rcsid_iu[] = #include "BinaryDecimal.h" #include "rsys/glue.h" #include "rsys/resource.h" -#include "rsys/assert.h" #include "rsys/hook.h" #include diff --git a/src/keycode.c b/src/keycode.c index d5420b1..6123033 100644 --- a/src/keycode.c +++ b/src/keycode.c @@ -55,7 +55,6 @@ char ROMlib_rcsid_keycode[] = "$Id: keycode.c 63 2004-12-24 18:19:43Z ctm $"; #include "rsys/soundopts.h" #include "rsys/blockinterrupts.h" -#include "rsys/screen.h" #include "rsys/prefs.h" #include #include "rsys/version.h" diff --git a/src/launch.c b/src/launch.c index c0c2a19..90c558c 100644 --- a/src/launch.c +++ b/src/launch.c @@ -27,7 +27,6 @@ char ROMlib_rcsid_launch[] = #include "SoundDvr.h" #include "TextEdit.h" #include "SysErr.h" -#include "SysError.h" #include "MenuMgr.h" #include "ScriptMgr.h" #include "DeskMgr.h" @@ -372,11 +371,6 @@ size_info_t size_info; #define VERSFMT "(0x%02x, 0x%02x, 0x%02x, 0x%02x, %d)" #define VERSSIZE(vp) (sizeof(VERSFMT) + (vp)->shortname[0] + 6) -typedef struct { - unsigned char c[4] LPACKED; - short loc PACKED; - unsigned char shortname[1] LPACKED; -} vers_t; LONGINT ROMlib_creator; diff --git a/src/listAccess.c b/src/listAccess.c index 9fb10e8..c2904f6 100644 --- a/src/listAccess.c +++ b/src/listAccess.c @@ -13,7 +13,6 @@ char ROMlib_rcsid_listAccess[] = #include "ListMgr.h" #include "MemoryMgr.h" #include "IntlUtil.h" -#include "rsys/screen.h" #include "rsys/list.h" #include "rsys/hook.h" diff --git a/src/listAddDel.c b/src/listAddDel.c index 352ee88..be60149 100644 --- a/src/listAddDel.c +++ b/src/listAddDel.c @@ -13,7 +13,6 @@ char ROMlib_rcsid_listAddDel[] = #include "ListMgr.h" #include "MemoryMgr.h" #include "rsys/list.h" -#include "rsys/screen.h" P3(PUBLIC pascal trap, INTEGER, LAddColumn, INTEGER, count, /* IMIV-271 */ INTEGER, coln, ListHandle, list) diff --git a/src/listCreate.c b/src/listCreate.c index 9b8a83c..b0f823f 100644 --- a/src/listCreate.c +++ b/src/listCreate.c @@ -14,7 +14,6 @@ char ROMlib_rcsid_listCreate[] = #include "ResourceMgr.h" #include "ListMgr.h" #include "rsys/list.h" -#include "rsys/screen.h" #define STEF_lActivefix diff --git a/src/listDisplay.c b/src/listDisplay.c index 45c3f84..9295cac 100644 --- a/src/listDisplay.c +++ b/src/listDisplay.c @@ -14,7 +14,6 @@ char ROMlib_rcsid_listDisplay[] = #include "rsys/cquick.h" #include "rsys/list.h" -#include "rsys/screen.h" #include "rsys/hook.h" P2(PUBLIC pascal trap, void, LDraw, Cell, cell, /* IMIV-275 */ diff --git a/src/listMouse.c b/src/listMouse.c index 361d350..be2a61e 100644 --- a/src/listMouse.c +++ b/src/listMouse.c @@ -19,7 +19,6 @@ char ROMlib_rcsid_listMouse[] = #include "rsys/cquick.h" #include "rsys/list.h" -#include "rsys/screen.h" #include "rsys/pstuff.h" #include "rsys/hook.h" diff --git a/src/listStdLDEF.c b/src/listStdLDEF.c index 05dfc1d..d76d344 100644 --- a/src/listStdLDEF.c +++ b/src/listStdLDEF.c @@ -10,7 +10,6 @@ char ROMlib_rcsid_listStdLDEF[] = #include "rsys/common.h" #include "ListMgr.h" #include "MemoryMgr.h" -#include "rsys/screen.h" A5(PRIVATE, void, draw, BOOLEAN, sel, Rect *, rect, INTEGER, doff, INTEGER, dl, ListHandle, list) diff --git a/src/menu.c b/src/menu.c index 45b0c0c..d2224fd 100644 --- a/src/menu.c +++ b/src/menu.c @@ -31,7 +31,6 @@ char ROMlib_rcsid_menu[] = #include "rsys/menu.h" #include "rsys/cquick.h" #include "rsys/quick.h" -#include "rsys/screen.h" #include "rsys/glue.h" #include "rsys/mman.h" #include "rsys/smash.h" @@ -221,12 +220,6 @@ P1(PUBLIC pascal trap, void, CalcMenuSize, MenuHandle, mh) * from a resource id to a handle. */ -typedef struct mct_res -{ - int16 n_entries; - MCEntry entries[1]; -} mct_res_t; - P1 (PUBLIC pascal trap, MenuHandle, GetMenu, int16, rid) { MenuHandle retval; @@ -735,11 +728,6 @@ P1 (PUBLIC pascal trap, void, DeleteMenu, int16, mid) HIEROFFX = CW (HIEROFF - sizeof (muelem)); } -typedef struct { - INTEGER nmen; - INTEGER mrid[1]; -} mbartype; - typedef mbartype *mbarptr; typedef struct { mbarptr p PACKED_P; } HIDDEN_mbarptr; typedef HIDDEN_mbarptr *mbarhandle; @@ -803,11 +791,6 @@ P1(PUBLIC pascal trap, void, SetMenuBar, Handle, ml) MenuList = RM(temph.p); } -typedef struct { - muelem *startp; - muelem *endp; -} startendpairs[2]; - enum { nonhier = 0, hier = 1 }; A1(PRIVATE, void, initpairs, startendpairs, pairs) diff --git a/src/menuColor.c b/src/menuColor.c index 4eadb3f..5cbe470 100644 --- a/src/menuColor.c +++ b/src/menuColor.c @@ -15,7 +15,6 @@ char ROMlib_rcsid_menuColor[] = #include "rsys/menu.h" #include "rsys/cquick.h" -#include "rsys/assert.h" void menu_bar_color (RGBColor *bar_color) diff --git a/src/mmansubr.c b/src/mmansubr.c index c079b18..4d1ab0f 100644 --- a/src/mmansubr.c +++ b/src/mmansubr.c @@ -17,8 +17,6 @@ char ROMlib_rcsid_mmansubr[] = #include "ResourceMgr.h" #include "rsys/mman_private.h" -#include "rsys/assert.h" -#include "rsys/fatal.h" #include "rsys/hook.h" #include "rsys/system_error.h" #include "rsys/vdriver.h" diff --git a/src/parse.y b/src/parse.y index 579142c..2a34ff6 100644 --- a/src/parse.y +++ b/src/parse.y @@ -1,8 +1,6 @@ %{ #include "rsys/common.h" #include "rsys/options.h" -#include "rsys/debug.h" -#include "rsys/myabort.h" #include "rsys/prefs.h" #include "rsys/crc.h" #include "rsys/parse.h" diff --git a/src/prLowLevel.c b/src/prLowLevel.c index 3b9d501..329b6fa 100644 --- a/src/prLowLevel.c +++ b/src/prLowLevel.c @@ -22,7 +22,6 @@ char ROMlib_rcsid_prLowLevel[] = #include "rsys/pstuff.h" #include "rsys/print.h" #include "rsys/hook.h" -#include "rsys/debug.h" #include "rsys/ctl.h" #include "rsys/ini.h" #include "rsys/notmac.h" diff --git a/src/process.c b/src/process.c index bb41624..dfb5c0d 100644 --- a/src/process.c +++ b/src/process.c @@ -15,7 +15,7 @@ char ROMlib_rcsid_process[] = #include "ToolboxEvent.h" #include "rsys/mman.h" -#include "rsys/fatal.h" +#include "rsys/process.h" #define declare_handle_type(type_prefix) \ typedef type_prefix ## _t *type_prefix ## _ptr; \ @@ -25,13 +25,6 @@ char ROMlib_rcsid_process[] = } hidden_ ## type_prefix ## _ptr; \ typedef hidden_ ## type_prefix ## _ptr *type_prefix ## _handle -typedef struct size_resource -{ - int16 flags PACKED; - int32 pref_size PACKED; - int32 min_size PACKED; -} size_resource_t; - declare_handle_type (size_resource); #define SIZE_FLAGS_X(size) (HxX (size, flags)) diff --git a/src/qBit.c b/src/qBit.c index 02a84ad..3329bc4 100644 --- a/src/qBit.c +++ b/src/qBit.c @@ -19,7 +19,6 @@ char ROMlib_rcsid_qBit[] = #include "rsys/cquick.h" #include "rsys/stdbits.h" #include "rsys/picture.h" -#include "rsys/screen.h" #include "rsys/mman.h" P6 (PUBLIC pascal trap, void, CopyBits, diff --git a/src/qCConv.c b/src/qCConv.c index e65f3f1..c6bcd3b 100644 --- a/src/qCConv.c +++ b/src/qCConv.c @@ -10,10 +10,6 @@ char ROMlib_rcsid_qCConv[] = #include "rsys/common.h" #include "QuickDraw.h" -#include "rsys/fatal.h" -#include "rsys/myabort.h" -#include "rsys/assert.h" - /* cmy and rgb color spaces are simply complements */ P2 (PUBLIC pascal trap, void, CMY2RGB, diff --git a/src/qCGrafPort.c b/src/qCGrafPort.c index 27cdcf5..62604ae 100644 --- a/src/qCGrafPort.c +++ b/src/qCGrafPort.c @@ -18,9 +18,6 @@ char ROMlib_rcsid_qCGrafport[] = #include "rsys/cquick.h" #include "rsys/mman.h" -#include "rsys/myabort.h" -#include "rsys/assert.h" - #include "rsys/xdata.h" #include "rsys/evil.h" @@ -417,12 +414,6 @@ P0 (PUBLIC pascal trap, PixPatHandle, NewPixPat) return pixpat; } -struct pixpat_res -{ - PixPat pixpat; - PixMap patmap; -}; - typedef struct pixpat_res *pixpat_res_ptr; typedef struct { pixpat_res_ptr p PACKED_P; } HIDDEN_pixpat_res_ptr; typedef HIDDEN_pixpat_res_ptr *pixpat_res_handle; diff --git a/src/qCursor.c b/src/qCursor.c index acf66bd..fc634ef 100644 --- a/src/qCursor.c +++ b/src/qCursor.c @@ -24,9 +24,10 @@ char ROMlib_rcsid_qCursor[] = #include "rsys/resource.h" #include "rsys/host.h" -#include "rsys/fatal.h" #include "rsys/osevent.h" +#include "rsys/quick.h" + #if !defined (CURSOR_DEBUG) #define HOST_SET_CURSOR(d,m,x,y) host_set_cursor (d,m,x,y) @@ -218,13 +219,6 @@ P2(PUBLIC pascal trap, void, ShieldCursor, Rect *, rp, Point, p) /* IMI-474 */ wewantpointermovements(-1); } -typedef struct ccrsr_res -{ - CCrsr crsr LPACKED; - PixMap crsr_map LPACKED; - char data LPACKED; -} ccrsr_res, *ccrsr_res_ptr; - typedef struct { ccrsr_res_ptr p PACKED_P; } HIDDEN_ccrsr_res_ptr; typedef HIDDEN_ccrsr_res_ptr *ccrsr_res_handle; diff --git a/src/qIMIV.c b/src/qIMIV.c index 2fc8776..84e88fe 100644 --- a/src/qIMIV.c +++ b/src/qIMIV.c @@ -16,7 +16,6 @@ char ROMlib_rcsid_qIMIV[] = #include "rsys/quick.h" #include "rsys/cquick.h" #include "rsys/stdbits.h" -#include "rsys/screen.h" #include "rsys/safe_alloca.h" #include "rsys/tempalloc.h" #include "rsys/dirtyrect.h" diff --git a/src/qIMVxfer.c b/src/qIMVxfer.c index 0be3c0e..f12beb4 100644 --- a/src/qIMVxfer.c +++ b/src/qIMVxfer.c @@ -13,9 +13,6 @@ char ROMlib_rcsid_qIMVxfer[] = #include "CQuickDraw.h" #include "rsys/cquick.h" -#include "rsys/fatal.h" - - /* Helper function: creates a new, sorted table so the value is the * same as the index (although we don't bother filling in most of the * color table fields). diff --git a/src/qPicstuff.c b/src/qPicstuff.c index 40c1e0c..3d99227 100644 --- a/src/qPicstuff.c +++ b/src/qPicstuff.c @@ -22,7 +22,6 @@ char ROMlib_rcsid_qPicstuff[] = #include "rsys/toolutil.h" #include "rsys/cquick.h" #include "rsys/picture.h" -#include "rsys/screen.h" #include "rsys/mman.h" #include "rsys/xdata.h" #include "rsys/tempalloc.h" diff --git a/src/qScale.c b/src/qScale.c index 4de763c..324d0df 100644 --- a/src/qScale.c +++ b/src/qScale.c @@ -12,7 +12,6 @@ char ROMlib_rcsid_qScale[] = #include "CQuickDraw.h" #include "rsys/cquick.h" -#include "rsys/fatal.h" /* This routine scales old_bitmap and stores the result in dst_bitmap. * The only field of dst_bitmap that needs to be valid on entry is diff --git a/src/qStdPoly.c b/src/qStdPoly.c index 232c0e0..607beee 100644 --- a/src/qStdPoly.c +++ b/src/qStdPoly.c @@ -18,7 +18,6 @@ char ROMlib_rcsid_qStdPoly[] = #include "rsys/cquick.h" #include "rsys/picture.h" -#include "rsys/screen.h" A2(PRIVATE, void, polyrgn, PolyHandle, ph, RgnHandle, rh) { diff --git a/src/qStdRgn.c b/src/qStdRgn.c index 5e949f2..51e207d 100644 --- a/src/qStdRgn.c +++ b/src/qStdRgn.c @@ -24,9 +24,6 @@ char ROMlib_rcsid_qStdRgn[] = #include "rsys/flags.h" #include "rsys/host.h" #include "rsys/vdriver.h" -#include "rsys/fatal.h" -#include "rsys/assert.h" -#include "rsys/myabort.h" #include "rsys/tempalloc.h" #include "rsys/xdblt.h" diff --git a/src/resMod.c b/src/resMod.c index b2bfe69..37ea70f 100644 --- a/src/resMod.c +++ b/src/resMod.c @@ -18,7 +18,6 @@ char ROMlib_rcsid_resMod[] = #include "rsys/glue.h" #include "rsys/mman.h" #include "rsys/file.h" -#include "rsys/assert.h" P3(PUBLIC pascal trap, void, SetResInfo, Handle, res, INTEGER, id, StringPtr, name) @@ -329,18 +328,13 @@ A2(PUBLIC, void, ROMlib_wr, resmaphand, map, resref *, rr) /* INTERNAL */ ROMlib_setreserr(noErr); } -typedef struct { - LONGINT diskoff; - resref *rrptr; -} sorttype; - -typedef sorttype *sorttypeptr; +typedef res_sorttype_t *sorttypeptr; typedef struct { sorttypeptr p PACKED_P; } HIDDEN_sorttypeptr; typedef HIDDEN_sorttypeptr *sorttypehand; A3(PRIVATE, void, fillst, sorttypehand, st, resref *, rp, resref *, rep) { - sorttype *end = STARH(st), *sp; + res_sorttype_t *end = STARH(st), *sp; LONGINT newoff; end++->diskoff = -1; /* real disk offsets are always > 0 */ @@ -352,7 +346,7 @@ A3(PRIVATE, void, fillst, sorttypehand, st, resref *, rp, resref *, rep) for (sp = end-1; newoff < sp->diskoff; sp--) ; sp++; - BlockMove((Ptr) sp, (Ptr) (sp+1), (Size)(end - sp) * sizeof(sorttype)); + BlockMove((Ptr) sp, (Ptr) (sp+1), (Size)(end - sp) * sizeof(res_sorttype_t)); sp->diskoff = newoff; sp->rrptr = rp; end++; @@ -401,7 +395,7 @@ A4(PRIVATE, void, putdat, INTEGER, fn, LONGINT, datoff, LONGINT *, doffp, *doffp += sizeof(LONGINT) + size; } -A4(PRIVATE, LONGINT, walkst, sorttype *, sp, sorttype *, sep, INTEGER, fn, +A4(PRIVATE, LONGINT, walkst, res_sorttype_t *, sp, res_sorttype_t *, sep, INTEGER, fn, LONGINT, datoff) { LONGINT size; @@ -462,7 +456,7 @@ A1(PRIVATE, void, compactdata, resmaphand, map) resoff = TYPEOFF(map) + sizeof(INTEGER) + (NUMTMINUS1(map) + 1) * sizeof(typref); nres = (NAMEOFF(map) - resoff) / sizeof(resref); - st = (sorttypehand) NewHandle((Size)sizeof(sorttype) * (nres + 1)); + st = (sorttypehand) NewHandle((Size)sizeof(res_sorttype_t) * (nres + 1)); mapstate = HGetState((Handle) map); HLock((Handle) map); rr = (resref *)((char *) STARH(map) + resoff); diff --git a/src/resOpen.c b/src/resOpen.c index a46f767..773e832 100644 --- a/src/resOpen.c +++ b/src/resOpen.c @@ -28,12 +28,7 @@ HCreateResFile_helper (INTEGER vrefnum, LONGINT parid, Str255 name, { INTEGER f; LONGINT leof, lc; - struct { /* empty resource template */ - reshead bhead LPACKED; - rsrvrec bfill LPACKED; - resmap bmap LPACKED; - INTEGER negone PACKED; - } buf; + empty_resource_template_t buf; ROMlib_setreserr(HCreate(vrefnum, parid, name, creator, type)); /* ???? might diff --git a/src/screen-dump.c b/src/screen-dump.c index 8c1a57a..022b074 100644 --- a/src/screen-dump.c +++ b/src/screen-dump.c @@ -24,6 +24,7 @@ char ROMlib_rcsid_screendump[] = #include "rsys/uniquefile.h" #include "rsys/notmac.h" #include "rsys/vdriver.h" +#include "rsys/screen-dump.h" #define II_little_endian 0x4949 #define MM_big_endian 0x4D4D @@ -57,28 +58,6 @@ char ROMlib_rcsid_screendump[] = #define ResolutionUnit 296 #define ColorMap 320 -struct header -{ - int16 byte_order __attribute__ ((packed)); - int16 magic_number __attribute__ ((packed)); - int32 ifd_offset __attribute__ ((packed)); -}; - -struct directory_entry -{ - int16 tag __attribute__ ((packed)); - int16 type __attribute__ ((packed)); - int32 count __attribute__ ((packed)); - int32 value_offset __attribute__ ((packed)); -}; - -struct ifd -{ - int16 count __attribute__ ((packed)); - /* gcc 4.3.0 warns if we leave the following packed attribute in */ - struct directory_entry entries[1] /* __attribute__ ((packed)) */; -}; - static void ifd_add_entry (struct ifd *ifd, int tag, int type, ...) { diff --git a/src/segment.c b/src/segment.c index 4e17574..8788c86 100644 --- a/src/segment.c +++ b/src/segment.c @@ -63,12 +63,6 @@ char ROMlib_rcsid_segment[] = #include "vga.h" #endif /* defined(MSDOS) */ -typedef struct { - INTEGER message; - INTEGER count; - AppFile files[1]; -} finderinfo; - typedef finderinfo *finderinfoptr; typedef struct { finderinfoptr p PACKED_P; } HIDDEN_finderinfoptr; typedef HIDDEN_finderinfoptr *finderinfohand; diff --git a/src/serial.c b/src/serial.c index a2a893e..93c9b9a 100644 --- a/src/serial.c +++ b/src/serial.c @@ -28,6 +28,7 @@ char ROMlib_rcsid_serial[] = #include "rsys/file.h" #include "rsys/hfs.h" +#include "rsys/serial.h" #if defined (MSDOS) #include "dosserial.h" @@ -125,10 +126,7 @@ A2(PUBLIC, OSErr, SerReset, INTEGER, rn, INTEGER, config) /* IMII-250 */ A3(PUBLIC, OSErr, SerSetBuf, INTEGER, rn, Ptr, p, INTEGER, len) /* IMII-251 */ { - struct { - Ptr p; - INTEGER i; - } temp; + sersetbuf_t temp; temp.p = RM (p); temp.i = CW (len); diff --git a/src/stdfile.c b/src/stdfile.c index 73882aa..076d8ce 100644 --- a/src/stdfile.c +++ b/src/stdfile.c @@ -47,7 +47,6 @@ char ROMlib_rcsid_stdfile[] = #include "rsys/file.h" #include "rsys/stdfile.h" #include "rsys/arrowkeys.h" -#include "rsys/screen.h" #include "rsys/glue.h" #include "rsys/resource.h" #include "rsys/pstuff.h" diff --git a/src/stdmdef.c b/src/stdmdef.c index 3e4122b..99a86b7 100644 --- a/src/stdmdef.c +++ b/src/stdmdef.c @@ -22,7 +22,6 @@ char ROMlib_rcsid_stdmdef[] = #include "rsys/wind.h" #include "rsys/host.h" -#include "rsys/fatal.h" #include "rsys/custom.h" static Rect *current_menu_rect; @@ -42,18 +41,6 @@ typedef enum uparrow, downarrow, } arrowtype; -typedef struct -{ - int32 lasttick PACKED; - int16 count PACKED; - struct tableentry - { - int16 top PACKED; - StringPtr name PACKED; - mextp options PACKED; - } entry[1]; -} table, *tablePtr, **tableHandle; - /* * I think SICNFLAG is correct. I'm guessing from what I've seen in MacMan * and some sort of dollhouse construction set. MacMan doesn't have any icon diff --git a/src/syserr.c b/src/syserr.c index fbb3fc0..c75c085 100644 --- a/src/syserr.c +++ b/src/syserr.c @@ -23,7 +23,6 @@ char ROMlib_rcsid_syserr[] = #include "rsys/cquick.h" #include "rsys/quick.h" -#include "rsys/screen.h" #include "rsys/next.h" #include "rsys/segment.h" #include "rsys/flags.h" @@ -32,59 +31,9 @@ char ROMlib_rcsid_syserr[] = #include "rsys/next.h" #include "rsys/osevent.h" #include "rsys/options.h" +#include "rsys/syserr.h" -PRIVATE struct { - INTEGER count PACKED; - - INTEGER id1 PACKED, - len1 PACKED, - prim1 PACKED, - sec1 PACKED, - icon1 PACKED, - proc1 PACKED, - but1 PACKED; - - INTEGER id2 PACKED, - len2 PACKED; - Point point2 LPACKED; - unsigned char str2[52] LPACKED; - - INTEGER id3 PACKED, - len3 PACKED; - - Rect rect3 LPACKED; - char icon3[32][4] LPACKED; - - INTEGER id4 PACKED, - len4 PACKED; - - Point point4 LPACKED; - char str4[46] LPACKED; - - INTEGER id5 PACKED, - len5 PACKED, - num5 PACKED, - str5 PACKED; - Rect rect5 LPACKED; - INTEGER proc5 PACKED, - str5b PACKED; - Rect rect5b LPACKED; - INTEGER proc5b PACKED; - - INTEGER id6 PACKED, - len6 PACKED; - - char str6[4] LPACKED; - - INTEGER id7 PACKED, - len7 PACKED; - char str7[6] LPACKED; - - INTEGER id8 PACKED, - len8 PACKED; - void (*func8)(void) PACKED; - -} myalerttab = { +PRIVATE myalerttab_t myalerttab = { CWC(8), #define WELCOME_CODE 0x28 @@ -162,54 +111,6 @@ PRIVATE struct { char syserr_msg[256]; -struct adef { - INTEGER id PACKED, - alen PACKED, - primetextid PACKED, - secondtextid PACKED, - iconid PACKED, - procid PACKED, - buttonid PACKED; -}; - -struct tdef { - INTEGER id PACKED, - alen PACKED; - Point loc LPACKED; - char text[1] LPACKED; /* at least one NUL byte */ -}; - -struct idef { - INTEGER id PACKED, - alen PACKED; - Rect loc LPACKED; - LONGINT ike[32] PACKED; -}; - -struct pdef { - INTEGER id PACKED, - alen PACKED; - void (*proc)() PACKED; - /* NOTE: THIS IS NOT THE WAY IT WORKS IN THE M*C */ -}; - -struct bdef { - INTEGER id PACKED, - alen PACKED, - nbut PACKED; - struct but { - INTEGER butstrid PACKED; - Rect butloc LPACKED; - INTEGER butprocid PACKED; - } buts[1] LPACKED; -}; - -struct sdef { - INTEGER id PACKED, - alen PACKED; - char text[1] LPACKED; -}; - A1(PRIVATE, INTEGER *, findid, INTEGER, id) { int i; diff --git a/src/teEdit.c b/src/teEdit.c index 1b91575..de39e25 100644 --- a/src/teEdit.c +++ b/src/teEdit.c @@ -22,7 +22,6 @@ char ROMlib_rcsid_teEdit[] = #include "rsys/mman.h" #include "rsys/tesave.h" #include "rsys/arrowkeys.h" -#include "rsys/screen.h" #include "rsys/notmac.h" #include "rsys/osevent.h" diff --git a/src/toolevent.c b/src/toolevent.c index df43ccf..8fa27f0 100644 --- a/src/toolevent.c +++ b/src/toolevent.c @@ -157,13 +157,6 @@ A0(PUBLIC, void, ROMlib_alarmoffmbar) ROMlib_togglealarm(); } -typedef struct { - INTEGER version; - INTEGER tableno[256]; - INTEGER ntables; - Byte table[1][128]; /* who knows how many */ -} keymap; - P3(PUBLIC pascal trap, LONGINT, KeyTrans, Ptr, mapp, unsigned short, code, LONGINT *, state) { diff --git a/src/uniquefile.c b/src/uniquefile.c index e4c796a..8ee02f7 100644 --- a/src/uniquefile.c +++ b/src/uniquefile.c @@ -9,7 +9,6 @@ char ROMlib_rcsid_uniquefile[] = #include "rsys/common.h" #include "rsys/uniquefile.h" -#include "rsys/assert.h" #include "rsys/file.h" diff --git a/src/unix_like.c b/src/unix_like.c index ddedec4..5f676c3 100644 --- a/src/unix_like.c +++ b/src/unix_like.c @@ -17,7 +17,6 @@ #include "rsys/mman.h" #include "rsys/system_error.h" #include "rsys/memory_layout.h" -#include "rsys/assert.h" #include "rsys/lowglobals.h" #include "Gestalt.h" diff --git a/src/windDisplay.c b/src/windDisplay.c index f139467..39e6c48 100644 --- a/src/windDisplay.c +++ b/src/windDisplay.c @@ -17,7 +17,6 @@ char ROMlib_rcsid_windDisplay[] = /* get {C}PORT_... accessors */ #include "rsys/cquick.h" #include "rsys/wind.h" -#include "rsys/screen.h" #include "rsys/glue.h" P2(PUBLIC pascal trap, void, SetWTitle, WindowPtr, w, StringPtr, t) diff --git a/src/windDocdef.c b/src/windDocdef.c index c49ed40..ec82c98 100644 --- a/src/windDocdef.c +++ b/src/windDocdef.c @@ -16,8 +16,6 @@ char ROMlib_rcsid_windDocdef[] = #include "rsys/cquick.h" #include "rsys/wind.h" #include "rsys/ctl.h" -#include "rsys/screen.h" -#include "rsys/fatal.h" #include "rsys/image.h" diff --git a/src/windInit.c b/src/windInit.c index dc47257..042cabd 100644 --- a/src/windInit.c +++ b/src/windInit.c @@ -27,7 +27,6 @@ char ROMlib_rcsid_windInit[] = #include "rsys/cquick.h" #include "rsys/wind.h" -#include "rsys/screen.h" #include "rsys/menu.h" #include "rsys/resource.h" #include "rsys/system_error.h" @@ -547,17 +546,6 @@ P8 (PUBLIC pascal trap, CWindowPtr, NewCWindow, return (CWindowPtr) w; } -typedef struct { - Rect _wrect LPACKED; - INTEGER _wprocid PACKED; - char _wvisible LPACKED; - char _padding1 LPACKED; - char _wgoaway LPACKED; - char _padding2 LPACKED; - LONGINT _wrefcon PACKED; - Byte _wtitle LPACKED; -} windrestype; - typedef windrestype *windrestypeptr; typedef struct { windrestypeptr p PACKED_P; } HIDDEN_windrestypeptr; typedef HIDDEN_windrestypeptr *windrestypehand; diff --git a/src/windMisc.c b/src/windMisc.c index c386753..93b3b31 100644 --- a/src/windMisc.c +++ b/src/windMisc.c @@ -19,7 +19,6 @@ char ROMlib_rcsid_windMisc[] = #include "rsys/cquick.h" #include "rsys/wind.h" -#include "rsys/screen.h" #include "rsys/hook.h" #include "MemoryMgr.h" diff --git a/src/windMouse.c b/src/windMouse.c index dfe2791..89ac60e 100644 --- a/src/windMouse.c +++ b/src/windMouse.c @@ -18,7 +18,6 @@ char ROMlib_rcsid_windMouse[] = #include "rsys/cquick.h" #include "rsys/wind.h" -#include "rsys/screen.h" #include "rsys/menu.h" #if !defined (No_STEF_zoommods) diff --git a/src/windSize.c b/src/windSize.c index f017c86..62abdc5 100644 --- a/src/windSize.c +++ b/src/windSize.c @@ -20,7 +20,6 @@ char ROMlib_rcsid_windSize[] = #include "rsys/cquick.h" #include "rsys/wind.h" -#include "rsys/screen.h" /* * Note, the code below probably be rewritten to use XorRgn as much