K&R: cmwind/*.c bulk forward reference function prototype conversion

K&R obsolete syntax removal for C23 compatibility series
This commit is contained in:
Darryl L. Miles 2024-10-04 11:20:05 +01:00 committed by Tim Edwards
parent b716aaa59d
commit 0e715ce98e
3 changed files with 18 additions and 15 deletions

View File

@ -43,10 +43,11 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
/* Forward declarations: */
extern void cmwButtonUp(), cmwButtonDown();
extern void cbUpdate();
extern void RGBxHSV();
extern void HSVxRGB();
extern void cmwButtonUp(MagWindow *w, Point *p, int button);
extern void cmwButtonDown(MagWindow *w, Point *p, int button);
extern void cbUpdate(MagWindow *w, int code, double x, int replace);
extern bool RGBxHSV(double r, double g, double b, double *h, double *s, double *v);
extern void HSVxRGB(double h, double s, double v, double *r, double *g, double *b);
/* If a button is pressed over the top box in the window, which
* displays the current color, we must save the window in which
@ -231,7 +232,7 @@ cmwButtonUp(w, p, button)
{
CMWclientRec *crec;
int r, g, b, color, oldR, oldG, oldB;
extern int cmwRedisplayFunc();
extern int cmwRedisplayFunc(MagWindow *w, int color);
/* If the button wasn't depressed over the top box in the window
* (the one displaying the current color), then we ignore the
@ -548,7 +549,7 @@ cbUpdate(w, code, x, replace)
CMWclientRec *cr = (CMWclientRec *) w->w_clientData;
double values[6];
int r, g, b, nr, ng, nb;
extern int cmwRedisplayFunc();
extern int cmwRedisplayFunc(MagWindow *w, int color);
/* Get current color map values */
(void) GrGetColor(cr->cmw_color, &r, &g, &b);

View File

@ -44,12 +44,12 @@ global WindClient CMWclientID;
/* Forward and external declarations */
extern void cmwColor();
extern void cmwSave();
extern void cmwLoad();
extern void cmwPushbutton();
extern void RGBxHSV();
extern void CMWundoInit();
extern void cmwColor(MagWindow *w, TxCommand *cmd);
extern void cmwSave(MagWindow *w, TxCommand *cmd);
extern void cmwLoad(MagWindow *w, TxCommand *cmd);
extern void cmwPushbutton(MagWindow *w, TxCommand *cmd);
extern bool RGBxHSV(double r, double g, double b, double *h, double *s, double *v);
extern void CMWundoInit(void);
/* -------------------------------------------------------------------- */

View File

@ -38,8 +38,10 @@ UndoType cmwUndoClientID;
/*
* Functions to play events forward/backward.
*/
void cmwUndoForw(), cmwUndoBack();
void cmwUndoStart(), cmwUndoDone();
void cmwUndoForw(colorUE *up);
void cmwUndoBack(colorUE *up);
void cmwUndoStart(void);
void cmwUndoDone(void);
/*
* A single undo event for the
@ -201,7 +203,7 @@ void
cmwUndoDone()
{
int i;
extern int cmwRedisplayFunc();
extern int cmwRedisplayFunc(MagWindow *w, int color);
for (i = 0; i < 256; i++)
if (cmwColorsChanged[i])