Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
[dopus5 next] Build without compiler warnings on GCC 16 (issue #228)
Program, dopus5.library, all modules and build-system change; version
bump deferred.

- The warning flags are passed to the linker too, because LTO generates
the code at link time, and the code is built with
-fno-strict-aliasing because it casts between Exec list structures.
- dopus5.library takes const pointers in AddObjectList(),
AddWindowMenus(), BuildMenuStrip(), CalcWindowDims(),
SetConfigWindowLimits(), Att_NewNode() and WriteBuf(), and in
NewConfigWindow.dims. The library vectors and registers do not
change.
- Module source change: NewConfigWindow.dims now points to a const
ConfigWindow, so modules that write the window size through
newwin.dims->... must set it in their own ConfigWindow instead, as
the ftp module now does.
- Opus no longer redefines the ILBM chunk IDs or AFF_68060 that the NDK
provides, and each module's libinit.c tells the compiler that exit()
does not return.
- Initializer braces, pointer types, const qualifiers, ctype arguments,
old-style function definitions, unused variables, trigraphs and
misleading indentation are fixed across the program, the library and
the modules. None of this is meant to change behaviour.

[dopus5 next] Quitting Opus leaves later system patches in place
dopus5.library change; version bump deferred.

Expand Down
14 changes: 7 additions & 7 deletions source/Include/clib/dopus5_protos.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ int CalcObjectDims(void *,
ULONG,
GL_Object *,
GL_Object *);
int CalcWindowDims(struct Screen *, ConfigWindow *, struct IBox *, struct TextFont *, ULONG);
int CalcWindowDims(struct Screen *, const ConfigWindow *, struct IBox *, struct TextFont *, ULONG);
//-----
ObjectList *AddObjectList(struct Window *, ObjectDef *);
ObjectList *AddObjectList(struct Window *, const ObjectDef *);
void FreeObject(ObjectList *, GL_Object *);
void FreeObjectList(ObjectList *);
void RefreshObjectList(struct Window *, ObjectList *);
Expand All @@ -134,7 +134,7 @@ void DisplayObject(struct Window *, GL_Object *, int fg, int bg, char *txt);
void DisableObject(ObjectList *, ULONG, BOOL);
int BoundsCheckGadget(ObjectList *, ULONG, int, int);
//-----
void AddWindowMenus(struct Window *, MenuData *);
void AddWindowMenus(struct Window *, const MenuData *);
void FreeWindowMenus(struct Window *);
//-----
void SetWindowBusy(struct Window *);
Expand All @@ -150,7 +150,7 @@ ULONG GetWindowID(struct Window *);
struct MsgPort *GetWindowAppPort(struct Window *);
//-----
Att_List *Att_NewList(ULONG);
Att_Node *Att_NewNode(Att_List *list, char *name, IPTR data, ULONG flags);
Att_Node *Att_NewNode(Att_List *list, const char *name, IPTR data, ULONG flags);
void Att_RemNode(Att_Node *node);
void Att_PosNode(Att_List *, Att_Node *, Att_Node *);
void Att_RemList(Att_List *list, long);
Expand All @@ -164,7 +164,7 @@ void Att_ChangeNodeName(Att_Node *node, char *name);
long Att_FindNodeNumber(Att_List *list, Att_Node *node);
void AddSorted(struct List *list, struct Node *node);
//-----
struct Menu *BuildMenuStrip(MenuData *, struct DOpusLocale *);
struct Menu *BuildMenuStrip(const MenuData *, struct DOpusLocale *);
struct MenuItem *FindMenuItem(struct Menu *, UWORD);
UWORD DoPopUpMenu(struct Window *, PopUpMenu *, PopUpItem **, UWORD);
PopUpItem *GetPopUpItem(PopUpMenu *, UWORD);
Expand Down Expand Up @@ -254,7 +254,7 @@ void GetPalette32(struct ViewPort *, ULONG *, UWORD, short);
APTR OpenBuf(char *name, long mode, long buffer_size);
long CloseBuf(APTR file);
long ReadBuf(APTR file, char *data, long size);
long WriteBuf(APTR file, char *data, long size);
long WriteBuf(APTR file, const char *data, long size);
long FlushBuf(APTR file);
long SeekBuf(APTR file, long offset, long mode);
long ExamineBuf(APTR file, struct FileInfoBlock *fib);
Expand Down Expand Up @@ -464,7 +464,7 @@ void DisposeBitMap(struct BitMap *);
FuncArgs *ParseArgs(char *, char *);
void DisposeArgs(FuncArgs *);
//-----
void SetConfigWindowLimits(struct Window *, ConfigWindow *, ConfigWindow *);
void SetConfigWindowLimits(struct Window *, const ConfigWindow *, const ConfigWindow *);
//-----
void SetEnv(char *, char *, BOOL);
BOOL IsListLockEmpty(struct ListLock *);
Expand Down
70 changes: 35 additions & 35 deletions source/Include/defines/dopus5.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
187, \
/* s */)

#define AddObjectList(___window, ___objects) \
AROS_LC2(ObjectList *, \
AddObjectList, \
AROS_LCA(struct Window *, (___window), A0), \
AROS_LCA(ObjectDef *, (___objects), A1), \
struct Library *, \
DOPUS_BASE_NAME, \
48, \
#define AddObjectList(___window, ___objects) \
AROS_LC2(ObjectList *, \
AddObjectList, \
AROS_LCA(struct Window *, (___window), A0), \
AROS_LCA(const ObjectDef *, (___objects), A1), \
struct Library *, \
DOPUS_BASE_NAME, \
48, \
/* s */)

#define AddScrollBars(___win, ___list, ___drawinfo, ___noidcmp) \
Expand All @@ -79,14 +79,14 @@
86, \
/* s */)

#define AddWindowMenus(___window, ___data) \
#define AddWindowMenus(___window, ___data) \
AROS_LC2NR(void, \
AddWindowMenus, \
AROS_LCA(struct Window *, (___window), A0), \
AROS_LCA(MenuData *, (___data), A1), \
struct Library *, \
DOPUS_BASE_NAME, \
63, \
AddWindowMenus, \
AROS_LCA(struct Window *, (___window), A0), \
AROS_LCA(const MenuData *, (___data), A1), \
struct Library *, \
DOPUS_BASE_NAME, \
63, \
/* s */)

#define AllocAppMessage(___mem, ___reply, ___num) \
Expand Down Expand Up @@ -223,7 +223,7 @@
AROS_LC4(Att_Node *, \
Att_NewNode, \
AROS_LCA(Att_List *, (___list), A0), \
AROS_LCA(char *, (___name), A1), \
AROS_LCA(const char *, (___name), A1), \
AROS_LCA(IPTR, (___data), D0), \
AROS_LCA(ULONG, (___flags), D1), \
struct Library *, \
Expand Down Expand Up @@ -331,7 +331,7 @@
#define BuildMenuStrip(___data, ___locale) \
AROS_LC2(struct Menu *, \
BuildMenuStrip, \
AROS_LCA(MenuData *, (___data), A0), \
AROS_LCA(const MenuData *, (___data), A0), \
AROS_LCA(struct DOpusLocale *, (___locale), A1), \
struct Library *, \
DOPUS_BASE_NAME, \
Expand Down Expand Up @@ -443,7 +443,7 @@
AROS_LC5(int, \
CalcWindowDims, \
AROS_LCA(struct Screen *, (___screen), A0), \
AROS_LCA(ConfigWindow *, (___pos), A1), \
AROS_LCA(const ConfigWindow *, (___pos), A1), \
AROS_LCA(struct IBox *, (___dest), A2), \
AROS_LCA(struct TextFont *, (___font), A3), \
AROS_LCA(ULONG, (___flags), D0), \
Expand Down Expand Up @@ -2648,15 +2648,15 @@
AROS_LC1NR(void, SetBusyPointer, AROS_LCA(struct Window *, (___window), A0), struct Library *, DOPUS_BASE_NAME, 15, \
/* s */)

#define SetConfigWindowLimits(___window, ___min, ___max) \
#define SetConfigWindowLimits(___window, ___min, ___max) \
AROS_LC3NR(void, \
SetConfigWindowLimits, \
AROS_LCA(struct Window *, (___window), A0), \
AROS_LCA(ConfigWindow *, (___min), A1), \
AROS_LCA(ConfigWindow *, (___max), A2), \
struct Library *, \
DOPUS_BASE_NAME, \
310, \
SetConfigWindowLimits, \
AROS_LCA(struct Window *, (___window), A0), \
AROS_LCA(const ConfigWindow *, (___min), A1), \
AROS_LCA(const ConfigWindow *, (___max), A2), \
struct Library *, \
DOPUS_BASE_NAME, \
310, \
/* s */)

#define SetEnv(___name, ___data, ___save) \
Expand Down Expand Up @@ -3173,15 +3173,15 @@

#define WB_Remove_Patch() AROS_LC0(BOOL, WB_Remove_Patch, struct Library *, DOPUS_BASE_NAME, 178, /* s */)

#define WriteBuf(___file, ___data, ___size) \
AROS_LC3(long, \
WriteBuf, \
AROS_LCA(APTR, (___file), A0), \
AROS_LCA(char *, (___data), A1), \
AROS_LCA(long, (___size), D0), \
struct Library *, \
DOPUS_BASE_NAME, \
167, \
#define WriteBuf(___file, ___data, ___size) \
AROS_LC3(long, \
WriteBuf, \
AROS_LCA(APTR, (___file), A0), \
AROS_LCA(const char *, (___data), A1), \
AROS_LCA(long, (___size), D0), \
struct Library *, \
DOPUS_BASE_NAME, \
167, \
/* s */)

#define WriteClipString(___clip, ___string, ___len) \
Expand Down
14 changes: 7 additions & 7 deletions source/Include/fd/dopus_lib.sfd
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ void StripIntuiMessagesDopus(struct Window * window) (a0)
void CloseWindowSafely(struct Window * window) (a0)
*
int CalcObjectDims(void * parent, struct TextFont * font, struct IBox * pos, struct IBox * dest, GL_Object * last, ULONG flags, GL_Object * obj, GL_Object * ob) (a0,a1,a2,a3,a4,d0,d1,d2)
int CalcWindowDims(struct Screen * screen, ConfigWindow * pos, struct IBox * dest, struct TextFont * font, ULONG flags) (a0,a1,a2,a3,d0)
int CalcWindowDims(struct Screen * screen, const ConfigWindow * pos, struct IBox * dest, struct TextFont * font, ULONG flags) (a0,a1,a2,a3,d0)
*
ObjectList * AddObjectList(struct Window * window, ObjectDef * objects) (a0,a1)
ObjectList * AddObjectList(struct Window * window, const ObjectDef * objects) (a0,a1)
void FreeObject(ObjectList * objlist, GL_Object * object) (a0,a1)
void FreeObjectList(ObjectList * objlist) (a0)
void RefreshObjectList(struct Window * window, ObjectList * list) (a0,a1)
Expand All @@ -87,7 +87,7 @@ void DisplayObject(struct Window * window, GL_Object * object, int fg, int bg, c
void DisableObject(ObjectList * list, ULONG id, BOOL state) (a0,d0,d1)
int BoundsCheckGadget(ObjectList * list, ULONG id, int min, int max) (a0,d0,d1,d2)
*
void AddWindowMenus(struct Window * window, MenuData * data) (a0,a1)
void AddWindowMenus(struct Window * window, const MenuData * data) (a0,a1)
void FreeWindowMenus(struct Window * window) (a0)
*
void SetWindowBusy(struct Window * window) (a0)
Expand All @@ -103,7 +103,7 @@ ULONG GetWindowID(struct Window * window) (a0)
struct MsgPort * GetWindowAppPort(struct Window * window) (a0)
*
Att_List * Att_NewList(ULONG flags) (d0)
Att_Node * Att_NewNode(Att_List * list, char * name, IPTR data, ULONG flags) (a0,a1,d0,d1)
Att_Node * Att_NewNode(Att_List * list, const char * name, IPTR data, ULONG flags) (a0,a1,d0,d1)
void Att_RemNode(Att_Node * node) (a0)
void Att_PosNode(Att_List * list, Att_Node * node, Att_Node * before) (a0,a1,a2)
void Att_RemList(Att_List * list, long flags) (a0,d0)
Expand All @@ -117,7 +117,7 @@ void Att_ChangeNodeName(Att_Node * node, char * name) (a0,a1)
long Att_FindNodeNumber(Att_List * list, Att_Node * node) (a0,a1)
void AddSorted(struct List * list, struct Node * node) (a0,a1)
*
struct Menu * BuildMenuStrip(MenuData * data, struct DOpusLocale * locale) (a0,a1)
struct Menu * BuildMenuStrip(const MenuData * data, struct DOpusLocale * locale) (a0,a1)
struct MenuItem * FindMenuItem(struct Menu * menu, UWORD id) (a0,d0)
UWORD DoPopUpMenu(struct Window * window, PopUpMenu * menu, PopUpItem ** item, UWORD code) (a0,a1,a2,d0)
PopUpItem * GetPopUpItem(PopUpMenu * menu, UWORD id) (a0,d0)
Expand Down Expand Up @@ -211,7 +211,7 @@ void GetPalette32(struct ViewPort * vp, ULONG * palette, UWORD count, short firs
APTR OpenBuf(char * name, long mode, long buffer_size) (a0,d0,d1)
long CloseBuf(APTR file) (a0)
long ReadBuf(APTR file, char * data, long size) (a0,a1,d0)
long WriteBuf(APTR file, char * data, long size) (a0,a1,d0)
long WriteBuf(APTR file, const char * data, long size) (a0,a1,d0)
long FlushBuf(APTR file) (a0)
long SeekBuf(APTR file, long offset, long mode) (a0,d0,d1)
long ExamineBuf(APTR file, struct FileInfoBlock * fib) (a0,a1)
Expand Down Expand Up @@ -433,7 +433,7 @@ void DisposeBitMap(struct BitMap * b) (a0)
FuncArgs * ParseArgs(char * temp, char * args) (a0,a1)
void DisposeArgs(FuncArgs * args) (a0)
*
void SetConfigWindowLimits(struct Window * window, ConfigWindow * min, ConfigWindow * max) (a0,a1,a2)
void SetConfigWindowLimits(struct Window * window, const ConfigWindow * min, const ConfigWindow * max) (a0,a1,a2)
*
void SetEnv(char * name, char * data, BOOL save) (a0,a1,d0)
BOOL IsListLockEmpty(struct ListLock * list) (a0)
Expand Down
14 changes: 7 additions & 7 deletions source/Include/inline/dopus5.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,11 @@ typedef ULONG _sfdc_vararg;
, DOPUS_BASE_NAME)

#define CalcWindowDims(___screen, ___pos, ___dest, ___font, ___flags) \
LP5(0x11a, int, CalcWindowDims , struct Screen *, ___screen, a0, ConfigWindow *, ___pos, a1, struct IBox *, ___dest, a2, struct TextFont *, ___font, a3, ULONG, ___flags, d0,\
LP5(0x11a, int, CalcWindowDims , struct Screen *, ___screen, a0, const ConfigWindow *, ___pos, a1, struct IBox *, ___dest, a2, struct TextFont *, ___font, a3, ULONG, ___flags, d0,\
, DOPUS_BASE_NAME)

#define AddObjectList(___window, ___objects) \
LP2(0x120, ObjectList *, AddObjectList , struct Window *, ___window, a0, ObjectDef *, ___objects, a1,\
LP2(0x120, ObjectList *, AddObjectList , struct Window *, ___window, a0, const ObjectDef *, ___objects, a1,\
, DOPUS_BASE_NAME)

#define FreeObject(___objlist, ___object) \
Expand Down Expand Up @@ -253,7 +253,7 @@ typedef ULONG _sfdc_vararg;
, DOPUS_BASE_NAME)

#define AddWindowMenus(___window, ___data) \
LP2NR(0x17a, AddWindowMenus , struct Window *, ___window, a0, MenuData *, ___data, a1,\
LP2NR(0x17a, AddWindowMenus , struct Window *, ___window, a0, const MenuData *, ___data, a1,\
, DOPUS_BASE_NAME)

#define FreeWindowMenus(___window) \
Expand Down Expand Up @@ -297,7 +297,7 @@ typedef ULONG _sfdc_vararg;
, DOPUS_BASE_NAME)

#define Att_NewNode(___list, ___name, ___data, ___flags) \
LP4(0x1bc, Att_Node *, Att_NewNode , Att_List *, ___list, a0, char *, ___name, a1, IPTR, ___data, d0, ULONG, ___flags, d1,\
LP4(0x1bc, Att_Node *, Att_NewNode , Att_List *, ___list, a0, const char *, ___name, a1, IPTR, ___data, d0, ULONG, ___flags, d1,\
, DOPUS_BASE_NAME)

#define Att_RemNode(___node) \
Expand Down Expand Up @@ -349,7 +349,7 @@ typedef ULONG _sfdc_vararg;
, DOPUS_BASE_NAME)

#define BuildMenuStrip(___data, ___locale) \
LP2(0x20a, struct Menu *, BuildMenuStrip , MenuData *, ___data, a0, struct DOpusLocale *, ___locale, a1,\
LP2(0x20a, struct Menu *, BuildMenuStrip , const MenuData *, ___data, a0, struct DOpusLocale *, ___locale, a1,\
, DOPUS_BASE_NAME)

#define FindMenuItem(___menu, ___id) \
Expand Down Expand Up @@ -679,7 +679,7 @@ typedef ULONG _sfdc_vararg;
, DOPUS_BASE_NAME)

#define WriteBuf(___file, ___data, ___size) \
LP3(0x3ea, long, WriteBuf , APTR, ___file, a0, char *, ___data, a1, long, ___size, d0,\
LP3(0x3ea, long, WriteBuf , APTR, ___file, a0, const char *, ___data, a1, long, ___size, d0,\
, DOPUS_BASE_NAME)

#define FlushBuf(___file) \
Expand Down Expand Up @@ -1281,7 +1281,7 @@ typedef ULONG _sfdc_vararg;
, DOPUS_BASE_NAME)

#define SetConfigWindowLimits(___window, ___min, ___max) \
LP3NR(0x744, SetConfigWindowLimits , struct Window *, ___window, a0, ConfigWindow *, ___min, a1, ConfigWindow *, ___max, a2,\
LP3NR(0x744, SetConfigWindowLimits , struct Window *, ___window, a0, const ConfigWindow *, ___min, a1, const ConfigWindow *, ___max, a2,\
, DOPUS_BASE_NAME)

#define SetEnv(___name, ___data, ___save) \
Expand Down
Loading