Fix GCC 14 incompatible function pointer and const errors in cmwind

This commit is contained in:
Enno Schnackenberg 2026-05-05 13:37:23 +02:00
parent a053b2fa14
commit 1c686ead41
3 changed files with 14 additions and 13 deletions

View File

@ -409,11 +409,12 @@ CMWloadWindow(
void void
CMWinit(void) CMWinit(void)
{ {
CMWclientID = WindAddClient("color", CMWcreate, CMWdelete, CMWclientID = WindAddClient("color",
CMWredisplay, CMWcommand, (bool (*)())CMWcreate, (bool (*)())CMWdelete,
(void(*)()) NULL, (void (*)())CMWredisplay, (void (*)())CMWcommand,
CMWCheckWritten, (void (*)()) NULL,
CMWreposition, (bool (*)())CMWCheckWritten,
(void (*)())CMWreposition,
(GrGlyph *) NULL); (GrGlyph *) NULL);
CMWundoInit(); CMWundoInit();
@ -421,16 +422,16 @@ CMWinit(void)
WindAddCommand(CMWclientID, WindAddCommand(CMWclientID,
"pushbutton button invoke a button press in the color window", "pushbutton button invoke a button press in the color window",
cmwPushbutton, FALSE); (void (*)())cmwPushbutton, FALSE);
WindAddCommand(CMWclientID, WindAddCommand(CMWclientID,
"color [color-#] specify color to edit, or print current intensities", "color [color-#] specify color to edit, or print current intensities",
cmwColor, FALSE); (void (*)())cmwColor, FALSE);
WindAddCommand(CMWclientID, WindAddCommand(CMWclientID,
"load [techStyle displayStyle monitorType]\n\ "load [techStyle displayStyle monitorType]\n\
load new color map techStyle.displayStyle.monitorType", load new color map techStyle.displayStyle.monitorType",
cmwLoad, FALSE); (void (*)())cmwLoad, FALSE);
WindAddCommand(CMWclientID, WindAddCommand(CMWclientID,
"save [techStyle displayStyle monitorType]\n\ "save [techStyle displayStyle monitorType]\n\
save color map to techStyle.displayStyle.monitorType", save color map to techStyle.displayStyle.monitorType",
cmwSave, FALSE); (void (*)())cmwSave, FALSE);
} }

View File

@ -56,7 +56,7 @@ extern bool GrHaveLock();
extern void GrClipTo(); extern void GrClipTo();
extern void GrClipBox(Rect *, int); extern void GrClipBox(Rect *, int);
extern void GrClipLine(); extern void GrClipLine();
extern bool GrPutText(char *, int, Point *, int, int, bool, Rect *, Rect *); extern bool GrPutText(const char *, int, Point *, int, int, bool, Rect *, Rect *);
extern void GrFillPolygon(); extern void GrFillPolygon();
extern void (*GrDrawGlyphPtr)(); extern void (*GrDrawGlyphPtr)();
extern void (*GrBitBltPtr)(); extern void (*GrBitBltPtr)();

View File

@ -241,7 +241,7 @@ extern WindClient WindGetClient();
extern WindClient WindNextClient(); extern WindClient WindNextClient();
extern WindClient WindAddClient(char *, bool (*)(), bool (*)(), void (*)(), extern WindClient WindAddClient(char *, bool (*)(), bool (*)(), void (*)(),
void (*)(), void (*)(), bool (*)(), void (*)(), void (*)(), bool (*)(),
void (*)(), void (*)()); void (*)(), GrGlyph *);
extern char *WindGetClientName(); extern char *WindGetClientName();
extern void WindInit(); extern void WindInit();
extern void WindUpdate(); extern void WindUpdate();
@ -265,7 +265,7 @@ extern MagWindow *WindSearchData();
/* procs for moving the surface inside of a window (changing the view) */ /* procs for moving the surface inside of a window (changing the view) */
extern void WindZoom(); extern void WindZoom();
extern void WindMove(MagWindow *, Rect *); extern void WindMove(MagWindow *, const Rect *);
extern void WindView(); extern void WindView();
extern void WindScroll(); extern void WindScroll();
@ -280,7 +280,7 @@ extern void WindFullScreen();
/* procs to transform into and out of screen coordinates */ /* procs to transform into and out of screen coordinates */
extern void WindScreenToSurface(); extern void WindScreenToSurface();
extern void WindSurfaceToScreen(MagWindow *, Rect *, Rect *); extern void WindSurfaceToScreen(MagWindow *, const Rect *, Rect *);
extern void WindPointToSurface(); extern void WindPointToSurface();
extern void WindPointToScreen(); extern void WindPointToScreen();
extern void WindSurfaceToScreenNoClip(MagWindow *, Rect *, Rect *); extern void WindSurfaceToScreenNoClip(MagWindow *, Rect *, Rect *);