reqtools.library changes:

- synchronize header copies
- make structures packed for binary compatibility of prefs files
This commit is contained in:
deadwood 2022-06-26 09:02:28 +02:00
parent eec138b0cd
commit 60e34e3a86
3 changed files with 21 additions and 10 deletions

View File

@ -94,7 +94,7 @@ struct ReqDefaults
UWORD TopOffset; UWORD TopOffset;
UWORD MinEntries; UWORD MinEntries;
UWORD MaxEntries; UWORD MaxEntries;
}; } __packed;
struct ReqToolsPrefs struct ReqToolsPrefs
{ {
@ -102,12 +102,13 @@ struct ReqToolsPrefs
ULONG PrefsSize; ULONG PrefsSize;
struct SignalSemaphore PrefsSemaphore; struct SignalSemaphore PrefsSemaphore;
/* Start of real preferences */ /* Start of real preferences (saved/loaded from ReqTools.prefs) */
ULONG Flags; ULONG Flags;
struct ReqDefaults ReqDefaults[RTPREF_NR_OF_REQ]; struct ReqDefaults ReqDefaults[RTPREF_NR_OF_REQ];
/* End of real preferences */
BOOL IsLoaded; /* To avoid multiple loading of preferences */ BOOL IsLoaded; /* To avoid multiple loading of preferences */
}; } __packed;
#ifdef __AROS__ #ifdef __AROS__
#define RTPREFS_SIZE (4 + (RTPREF_NR_OF_REQ * (4 + 4 + 2 + 2 + 2 + 2))) #define RTPREFS_SIZE (4 + (RTPREF_NR_OF_REQ * (4 + 4 + 2 + 2 + 2 + 2)))
@ -157,7 +158,6 @@ struct ReqToolsBase
confused by the library bases below. Add the rt_ prefix to the confused by the library bases below. Add the rt_ prefix to the
library names to fix the problem (e.g. rt_IntuitionBase). */ library names to fix the problem (e.g. rt_IntuitionBase). */
/* The following library bases may be read and used by your program */ /* The following library bases may be read and used by your program */
struct IntuitionBase *IntuitionBase; struct IntuitionBase *IntuitionBase;
struct GfxBase *GfxBase; struct GfxBase *GfxBase;
@ -169,8 +169,11 @@ struct ReqToolsBase
/* PRIVATE FIELDS, THESE WILL CHANGE FROM RELEASE TO RELEASE! */ /* PRIVATE FIELDS, THESE WILL CHANGE FROM RELEASE TO RELEASE! */
/* The RealOpenCnt is for the buffered AvailFonts feature. Since
Kickstart 3.0 offers low memory handlers a release of ReqTools for 3.0
will not use this field and start using the normal OpenCnt again. */
/* Obsolete, at least for AROS. Dont know about AmigaOS. -ksvalast. */ /* Obsolete, at least for AROS. Dont know about AmigaOS. -ksvalast. */
UWORD RealOpenCnt; UWORD RealOpenCnt;
UWORD AvailFontsLock; UWORD AvailFontsLock;
struct AvailFontsHeader *AvailFontsHeader; struct AvailFontsHeader *AvailFontsHeader;

View File

@ -61,6 +61,10 @@
#include <utility/utility.h> #include <utility/utility.h>
#endif /* UTILITY_TAGITEM_H */ #endif /* UTILITY_TAGITEM_H */
#ifndef INTUITION_INTUITION_H
#include <intuition/intuition.h>
#endif /* INTUITION_INTUITION_H */
#define REQTOOLSNAME "reqtools.library" #define REQTOOLSNAME "reqtools.library"
#define REQTOOLSVERSION 38L #define REQTOOLSVERSION 38L
@ -90,19 +94,21 @@ struct ReqDefaults
UWORD TopOffset; UWORD TopOffset;
UWORD MinEntries; UWORD MinEntries;
UWORD MaxEntries; UWORD MaxEntries;
}; } __packed;
struct ReqToolsPrefs struct ReqToolsPrefs
{ {
/* Size of preferences (_without_ this field, the semaphore and IsLoaded) */ /* Size of preferences (_without_ this field, the semaphore and IsLoaded) */
ULONG PrefsSize; ULONG PrefsSize;
struct SignalSemaphore PrefsSemaphore; struct SignalSemaphore PrefsSemaphore;
BOOL IsLoaded; /* To avoid multiple loading of preferences */
/* Start of real preferences */ /* Start of real preferences (saved/loaded from ReqTools.prefs) */
ULONG Flags; ULONG Flags;
struct ReqDefaults ReqDefaults[RTPREF_NR_OF_REQ]; struct ReqDefaults ReqDefaults[RTPREF_NR_OF_REQ];
}; /* End of real preferences */
BOOL IsLoaded; /* To avoid multiple loading of preferences */
} __packed;
#ifdef __AROS__ #ifdef __AROS__
#define RTPREFS_SIZE (4 + (RTPREF_NR_OF_REQ * (4 + 4 + 2 + 2 + 2 + 2))) #define RTPREFS_SIZE (4 + (RTPREF_NR_OF_REQ * (4 + 4 + 2 + 2 + 2 + 2)))
@ -166,7 +172,9 @@ struct ReqToolsBase
/* The RealOpenCnt is for the buffered AvailFonts feature. Since /* The RealOpenCnt is for the buffered AvailFonts feature. Since
Kickstart 3.0 offers low memory handlers a release of ReqTools for 3.0 Kickstart 3.0 offers low memory handlers a release of ReqTools for 3.0
will not use this field and start using the normal OpenCnt again. */ will not use this field and start using the normal OpenCnt again. */
/* Obsolete, at least for AROS. Dont know about AmigaOS. -ksvalast. */
UWORD RealOpenCnt; UWORD RealOpenCnt;
UWORD AvailFontsLock; UWORD AvailFontsLock;
struct AvailFontsHeader *AvailFontsHeader; struct AvailFontsHeader *AvailFontsHeader;
ULONG FontsAssignType; ULONG FontsAssignType;

View File

@ -3,7 +3,7 @@ basename ReqTools
libbasetype struct ReqToolsBase libbasetype struct ReqToolsBase
libbasetypeextern struct ReqToolsBase libbasetypeextern struct ReqToolsBase
seglist_field SegList seglist_field SegList
version 39.6 version 39.7
##end config ##end config
##begin cdef ##begin cdef