[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1114446: xfractint: FTBFS: editpal.c:1365:16: error: too many arguments to function 'this->change'; expected 0, have 2



control: tags 1114446 + pending
control: tags 1114466 + patch

Will be submitting the fix in upload to mentors.

Regards,
Syed Shahrukh Hussain.
From: Syed Shahrukh Hussain <syed.shahrukh@ossrevival.org>
Date: Wed, 3 Dec 2025 07:30:14 +0500
Subject: Fixes function declaration for gcc-15 build.
Forwarded: not-needed

diff --git a/common/editpal.c b/common/editpal.c
index 730107a..1ed2633 100644
--- a/common/editpal.c
+++ b/common/editpal.c
@@ -1210,8 +1210,8 @@ struct _CEditor
    void    (*other_key)(int key, struct _CEditor *ce, VOIDPTR info);
    void    (*change)(struct _CEditor *ce, VOIDPTR info);
 #else
-   void    (*other_key)();
-   void    (*change)();
+   void    (*other_key)(int key, struct _CEditor *ce, VOIDPTR info);
+   void    (*change)(struct _CEditor *ce, VOIDPTR info);
 #endif
    void     *info;
 
@@ -1234,9 +1234,9 @@ struct _CEditor
    static void CEditor_SetHidden (CEditor *this, BOOLEAN hidden);
    static int  CEditor_Edit      (CEditor *this);
 #else
-   static CEditor *CEditor_Construct( int , int , char ,
-                                    void (*other_key)(),
-                                    void (*change)(), VOIDPTR );
+   static CEditor *CEditor_Construct( int x, int y, char letter,
+                                      void (*other_key)(int,CEditor*,void*),
+                                      void (*change)(CEditor*,void*), VOIDPTR info);
    static void CEditor_Destroy         (CEditor *);
    static void CEditor_Draw    (CEditor *);
    static void CEditor_SetPos  (CEditor *, int , int );
@@ -1258,8 +1258,8 @@ static CEditor *CEditor_Construct( int x, int y, char letter,
                                    void (*change)(CEditor*, VOIDPTR), VOIDPTR info)
 #else
 static CEditor *CEditor_Construct( int x, int y, char letter,
-                                   void (*other_key)(),
-                                   void (*change)(), VOIDPTR info)
+                                   void (*other_key)(int,CEditor*,VOIDPTR),
+                                   void (*change)(CEditor*, VOIDPTR), VOIDPTR info)
 #endif
    {
    CEditor *this = new(CEditor);
@@ -1468,8 +1468,8 @@ struct _RGBEditor
    void    (*other_key)(int key, struct _RGBEditor *e, VOIDPTR info);
    void    (*change)(struct _RGBEditor *e, VOIDPTR info);
 #else
-   void    (*other_key)();
-   void    (*change)();
+   void    (*other_key)(int key, struct _RGBEditor *e, VOIDPTR info);
+   void    (*change)(struct _RGBEditor *e, VOIDPTR info);
 #endif
    void     *info;
    } ;
@@ -1489,8 +1489,8 @@ struct _RGBEditor
                      void (*change)(RGBEditor*,void*), VOIDPTR info);
 #else
    static RGBEditor *RGBEditor_Construct(int x, int y,
-                     void (*other_key)(),
-                     void (*change)(), VOIDPTR info);
+                     void (*other_key)(int,RGBEditor*,void*),
+                     void (*change)(RGBEditor*,void*), VOIDPTR info);
 #endif
 
    static void     RGBEditor_Destroy  (RGBEditor *this);
@@ -1516,8 +1516,8 @@ struct _RGBEditor
 static RGBEditor *RGBEditor_Construct(int x, int y, void (*other_key)(int,RGBEditor*,void*),
                                       void (*change)(RGBEditor*,void*), VOIDPTR info)
 #else
-static RGBEditor *RGBEditor_Construct(int x, int y, void (*other_key)(),
-                                      void (*change)(), VOIDPTR info)
+static RGBEditor *RGBEditor_Construct(int x, int y, void (*other_key)(int,RGBEditor*,void*),
+                                      void (*change)(RGBEditor*,void*), VOIDPTR info)
 #endif
    {
    RGBEditor      *this     = new(RGBEditor);
diff --git a/common/help.c b/common/help.c
index 9491ef0..12d0c5a 100644
--- a/common/help.c
+++ b/common/help.c
@@ -1084,7 +1084,7 @@ typedef struct PRINT_DOC_INFO
 #ifndef XFRACT
    int     (*msg_func)(int pnum, int num_page);
 #else
-   int     (*msg_func)();
+   int     (*msg_func)(int pnum, int num_page);
    int pnum;
 #endif
 
diff --git a/common/lsys.c b/common/lsys.c
index 7ff2b0e..2dfff50 100644
--- a/common/lsys.c
+++ b/common/lsys.c
@@ -832,17 +832,17 @@ LSysISizeTransform(char far *s, struct lsys_turtlestatei *ts)
   struct lsys_cmd far *doub;
   int maxval = 10;
   int n = 0;
-  void (*f)();
+  void (*f)(struct lsys_turtlestatei *);
   long num;
 
-  void (*plus)() = (ispow2(ts->maxangle)) ? lsysi_doplus_pow2 : lsysi_doplus;
-  void (*minus)() = (ispow2(ts->maxangle)) ? lsysi_dominus_pow2 : lsysi_dominus;
-  void (*pipe)() = (ispow2(ts->maxangle)) ? lsysi_dopipe_pow2 : lsysi_dopipe;
+  void (*plus)(struct lsys_turtlestatei *) = (ispow2(ts->maxangle)) ? lsysi_doplus_pow2 : lsysi_doplus;
+  void (*minus)(struct lsys_turtlestatei *) = (ispow2(ts->maxangle)) ? lsysi_dominus_pow2 : lsysi_dominus;
+  void (*pipe)(struct lsys_turtlestatei *) = (ispow2(ts->maxangle)) ? lsysi_dopipe_pow2 : lsysi_dopipe;
 
-  void (*slash)() =  (cpu >= 386) ? lsysi_doslash_386 : lsysi_doslash;
-  void (*bslash)() = (cpu >= 386) ? lsysi_dobslash_386 : lsysi_dobslash;
-  void (*at)() =     (cpu >= 386) ? lsysi_doat_386 : lsysi_doat;
-  void (*dogf)() =   (cpu >= 386) ? lsysi_dosizegf_386 : lsysi_dosizegf;
+  void (*slash)(struct lsys_turtlestatei *) =  (cpu >= 386) ? lsysi_doslash_386 : lsysi_doslash;
+  void (*bslash)(struct lsys_turtlestatei *) = (cpu >= 386) ? lsysi_dobslash_386 : lsysi_dobslash;
+  void (*at)(struct lsys_turtlestatei *) =     (cpu >= 386) ? lsysi_doat_386 : lsysi_doat;
+  void (*dogf)(struct lsys_turtlestatei *) =   (cpu >= 386) ? lsysi_dosizegf_386 : lsysi_dosizegf;
 
   ret = (struct lsys_cmd far *) farmemalloc((long) maxval * sizeof(struct lsys_cmd));
   if (ret == NULL) {
@@ -872,7 +872,7 @@ LSysISizeTransform(char far *s, struct lsys_turtlestatei *ts)
         break;
     }
 #ifdef XFRACT
-    ret[n].f = (void (*)())f;
+    ret[n].f = (void (*)(struct lsys_turtlestatei *))f;
 #else
     ret[n].f = (void (*)(struct lsys_turtlestatei *))f;
 #endif
@@ -914,17 +914,17 @@ LSysIDrawTransform(char far *s, struct lsys_turtlestatei *ts)
   struct lsys_cmd far *doub;
   int maxval = 10;
   int n = 0;
-  void (*f)();
+  void (*f)(struct lsys_turtlestatei *);
   long num;
 
-  void (*plus)() = (ispow2(ts->maxangle)) ? lsysi_doplus_pow2 : lsysi_doplus;
-  void (*minus)() = (ispow2(ts->maxangle)) ? lsysi_dominus_pow2 : lsysi_dominus;
-  void (*pipe)() = (ispow2(ts->maxangle)) ? lsysi_dopipe_pow2 : lsysi_dopipe;
+  void (*plus)(struct lsys_turtlestatei *) = (ispow2(ts->maxangle)) ? lsysi_doplus_pow2 : lsysi_doplus;
+  void (*minus)(struct lsys_turtlestatei *) = (ispow2(ts->maxangle)) ? lsysi_dominus_pow2 : lsysi_dominus;
+  void (*pipe)(struct lsys_turtlestatei *) = (ispow2(ts->maxangle)) ? lsysi_dopipe_pow2 : lsysi_dopipe;
 
-  void (*slash)() =  (cpu >= 386) ? lsysi_doslash_386 : lsysi_doslash;
-  void (*bslash)() = (cpu >= 386) ? lsysi_dobslash_386 : lsysi_dobslash;
-  void (*at)() =     (cpu >= 386) ? lsysi_doat_386 : lsysi_doat;
-  void (*drawg)() =  (cpu >= 386) ? lsysi_dodrawg_386 : lsysi_dodrawg;
+  void (*slash)(struct lsys_turtlestatei *) =  (cpu >= 386) ? lsysi_doslash_386 : lsysi_doslash;
+  void (*bslash)(struct lsys_turtlestatei *) = (cpu >= 386) ? lsysi_dobslash_386 : lsysi_dobslash;
+  void (*at)(struct lsys_turtlestatei *) =     (cpu >= 386) ? lsysi_doat_386 : lsysi_doat;
+  void (*drawg)(struct lsys_turtlestatei *) =  (cpu >= 386) ? lsysi_dodrawg_386 : lsysi_dodrawg;
 
   ret = (struct lsys_cmd far *) farmemalloc((long) maxval * sizeof(struct lsys_cmd));
   if (ret == NULL) {
@@ -957,7 +957,7 @@ LSysIDrawTransform(char far *s, struct lsys_turtlestatei *ts)
         break;
     }
 #ifdef XFRACT
-    ret[n].f = (void (*)())f;
+    ret[n].f = (void (*)(struct lsys_turtlestatei *))f;
 #else
     ret[n].f = (void (*)(struct lsys_turtlestatei *))f;
 #endif
diff --git a/common/lsysf.c b/common/lsysf.c
index f39e7cd..15b0f38 100644
--- a/common/lsysf.c
+++ b/common/lsysf.c
@@ -497,19 +497,19 @@ LSysFSizeTransform(char far *s, struct lsys_turtlestatef *ts)
   struct lsys_cmd far *doub;
   int max = 10;
   int n = 0;
-  void (*f)();
+  void (*f)(struct lsys_turtlestatef *);
   long num;
   int ptype;
   double PI180 = PI / 180.0;
 
-  void (*plus)() = (ispow2(ts->maxangle)) ? lsysf_doplus_pow2 : lsysf_doplus;
-  void (*minus)() = (ispow2(ts->maxangle)) ? lsysf_dominus_pow2 : lsysf_dominus;
-  void (*pipe)() = (ispow2(ts->maxangle)) ? lsysf_dopipe_pow2 : lsysf_dopipe;
+  void (*plus)(struct lsys_turtlestatef *) = (ispow2(ts->maxangle)) ? lsysf_doplus_pow2 : lsysf_doplus;
+  void (*minus)(struct lsys_turtlestatef *) = (ispow2(ts->maxangle)) ? lsysf_dominus_pow2 : lsysf_dominus;
+  void (*pipe)(struct lsys_turtlestatef *) = (ispow2(ts->maxangle)) ? lsysf_dopipe_pow2 : lsysf_dopipe;
 
-  void (*slash)() =  lsysf_doslash;
-  void (*bslash)() = lsysf_dobslash;
-  void (*at)() =     lsysf_doat;
-  void (*dogf)() =   lsysf_dosizegf;
+  void (*slash)(struct lsys_turtlestatef *) =  lsysf_doslash;
+  void (*bslash)(struct lsys_turtlestatef *) = lsysf_dobslash;
+  void (*at)(struct lsys_turtlestatef *) =     lsysf_doat;
+  void (*dogf)(struct lsys_turtlestatef *) =   lsysf_dosizegf;
 
   ret = (struct lsys_cmd far *) farmemalloc((long) max * sizeof(struct lsys_cmd));
   if (ret == NULL) {
@@ -540,7 +540,7 @@ LSysFSizeTransform(char far *s, struct lsys_turtlestatef *ts)
         break;
     }
 #ifdef XFRACT
-    ret[n].f = (void (*)())f;
+    ret[n].f = (void (*)(struct lsys_turtlestatef *))f;
 #else
     ret[n].f = (void (*)(struct lsys_turtlestatef *))f;
 #endif
@@ -584,19 +584,19 @@ LSysFDrawTransform(char far *s, struct lsys_turtlestatef *ts)
   struct lsys_cmd far *doub;
   int max = 10;
   int n = 0;
-  void (*f)();
+  void (*f)(struct lsys_turtlestatef *);
   LDBL num;
   int ptype;
   LDBL PI180 = PI / 180.0;
 
-  void (*plus)() = (ispow2(ts->maxangle)) ? lsysf_doplus_pow2 : lsysf_doplus;
-  void (*minus)() = (ispow2(ts->maxangle)) ? lsysf_dominus_pow2 : lsysf_dominus;
-  void (*pipe)() = (ispow2(ts->maxangle)) ? lsysf_dopipe_pow2 : lsysf_dopipe;
+  void (*plus)(struct lsys_turtlestatef *) = (ispow2(ts->maxangle)) ? lsysf_doplus_pow2 : lsysf_doplus;
+  void (*minus)(struct lsys_turtlestatef *) = (ispow2(ts->maxangle)) ? lsysf_dominus_pow2 : lsysf_dominus;
+  void (*pipe)(struct lsys_turtlestatef *) = (ispow2(ts->maxangle)) ? lsysf_dopipe_pow2 : lsysf_dopipe;
 
-  void (*slash)() =  lsysf_doslash;
-  void (*bslash)() = lsysf_dobslash;
-  void (*at)() =     lsysf_doat;
-  void (*drawg)() =  lsysf_dodrawg;
+  void (*slash)(struct lsys_turtlestatef *) =  lsysf_doslash;
+  void (*bslash)(struct lsys_turtlestatef *) = lsysf_dobslash;
+  void (*at)(struct lsys_turtlestatef *) =     lsysf_doat;
+  void (*drawg)(struct lsys_turtlestatef *) =  lsysf_dodrawg;
 
   ret = (struct lsys_cmd far *) farmemalloc((long) max * sizeof(struct lsys_cmd));
   if (ret == NULL) {
@@ -630,7 +630,7 @@ LSysFDrawTransform(char far *s, struct lsys_turtlestatef *ts)
         break;
     }
 #ifdef XFRACT
-    ret[n].f = (void (*)())f;
+    ret[n].f = (void (*)(struct lsys_turtlestatef *))f;
 #else
     ret[n].f = (void (*)(struct lsys_turtlestatef *))f;
 #endif
diff --git a/unix/general.c b/unix/general.c
index 44229f3..0207933 100644
--- a/unix/general.c
+++ b/unix/general.c
@@ -506,7 +506,11 @@ int len;
  * If dir==0, we convert to MSDOS form.  Otherwise we convert from MSDOS.
  */
 
-static void getChar(), getInt(), getLong(), getFloat(), getDouble();
+static void getChar(unsigned char *dst, unsigned char **src, int dir);
+static void getInt(short *dst, unsigned char **src, int dir);
+static void getLong(long *dst, unsigned char **src, int dir);
+static void getFloat(float *dst, unsigned char **src, int dir);
+static void getDouble(double *dst, unsigned char **src, int dir);
 
 void
 decode_fractal_info(info,dir)
@@ -533,103 +537,103 @@ decode_fractal_info(info,dir)
 	strncpy((char *)bufPtr,info->info_id,8);
     }
     bufPtr += 8;
-    getInt(&info->iterationsold,&bufPtr,dir);
-    getInt(&info->fractal_type,&bufPtr,dir);
+    getInt((short*)&info->iterationsold,&bufPtr,dir);
+    getInt((short*)&info->fractal_type,&bufPtr,dir);
     getDouble(&info->xmin,&bufPtr,dir);
     getDouble(&info->xmax,&bufPtr,dir);
     getDouble(&info->ymin,&bufPtr,dir);
     getDouble(&info->ymax,&bufPtr,dir);
     getDouble(&info->creal,&bufPtr,dir);
     getDouble(&info->cimag,&bufPtr,dir);
-    getInt(&info->videomodeax,&bufPtr,dir);
-    getInt(&info->videomodebx,&bufPtr,dir);
-    getInt(&info->videomodecx,&bufPtr,dir);
-    getInt(&info->videomodedx,&bufPtr,dir);
-    getInt(&info->dotmode,&bufPtr,dir);
-    getInt(&info->xdots,&bufPtr,dir);
-    getInt(&info->ydots,&bufPtr,dir);
-    getInt(&info->colors,&bufPtr,dir);
-    getInt(&info->version,&bufPtr,dir);
+    getInt((short*)&info->videomodeax,&bufPtr,dir);
+    getInt((short*)&info->videomodebx,&bufPtr,dir);
+    getInt((short*)&info->videomodecx,&bufPtr,dir);
+    getInt((short*)&info->videomodedx,&bufPtr,dir);
+    getInt((short*)&info->dotmode,&bufPtr,dir);
+    getInt((short*)&info->xdots,&bufPtr,dir);
+    getInt((short*)&info->ydots,&bufPtr,dir);
+    getInt((short*)&info->colors,&bufPtr,dir);
+    getInt((short*)&info->version,&bufPtr,dir);
     getFloat(&info->parm3,&bufPtr,dir);
     getFloat(&info->parm4,&bufPtr,dir);
     getFloat(&info->potential[0],&bufPtr,dir);
     getFloat(&info->potential[1],&bufPtr,dir);
     getFloat(&info->potential[2],&bufPtr,dir);
-    getInt(&info->rseed,&bufPtr,dir);
-    getInt(&info->rflag,&bufPtr,dir);
-    getInt(&info->biomorph,&bufPtr,dir);
-    getInt(&info->inside,&bufPtr,dir);
-    getInt(&info->logmap,&bufPtr,dir);
+    getInt((short*)&info->rseed,&bufPtr,dir);
+    getInt((short*)&info->rflag,&bufPtr,dir);
+    getInt((short*)&info->biomorph,&bufPtr,dir);
+    getInt((short*)&info->inside,&bufPtr,dir);
+    getInt((short*)&info->logmap,&bufPtr,dir);
     getFloat(&info->invert[0],&bufPtr,dir);
     getFloat(&info->invert[1],&bufPtr,dir);
     getFloat(&info->invert[2],&bufPtr,dir);
-    getInt(&info->decomp[0],&bufPtr,dir);
-    getInt(&info->decomp[1],&bufPtr,dir);
-    getInt(&info->symmetry,&bufPtr,dir);
+    getInt((short*)&info->decomp[0],&bufPtr,dir);
+    getInt((short*)&info->decomp[1],&bufPtr,dir);
+    getInt((short*)&info->symmetry,&bufPtr,dir);
     for (i=0;i<16;i++) {
-	getInt(&info->init3d[i],&bufPtr,dir);
+	getInt((short*)&info->init3d[i],&bufPtr,dir);
     }
-    getInt(&info->previewfactor,&bufPtr,dir);
-    getInt(&info->xtrans,&bufPtr,dir);
-    getInt(&info->ytrans,&bufPtr,dir);
-    getInt(&info->red_crop_left,&bufPtr,dir);
-    getInt(&info->red_crop_right,&bufPtr,dir);
-    getInt(&info->blue_crop_left,&bufPtr,dir);
-    getInt(&info->blue_crop_right,&bufPtr,dir);
-    getInt(&info->red_bright,&bufPtr,dir);
-    getInt(&info->blue_bright,&bufPtr,dir);
-    getInt(&info->xadjust,&bufPtr,dir);
-    getInt(&info->eyeseparation,&bufPtr,dir);
-    getInt(&info->glassestype,&bufPtr,dir);
-    getInt(&info->outside,&bufPtr,dir);
+    getInt((short*)&info->previewfactor,&bufPtr,dir);
+    getInt((short*)&info->xtrans,&bufPtr,dir);
+    getInt((short*)&info->ytrans,&bufPtr,dir);
+    getInt((short*)&info->red_crop_left,&bufPtr,dir);
+    getInt((short*)&info->red_crop_right,&bufPtr,dir);
+    getInt((short*)&info->blue_crop_left,&bufPtr,dir);
+    getInt((short*)&info->blue_crop_right,&bufPtr,dir);
+    getInt((short*)&info->red_bright,&bufPtr,dir);
+    getInt((short*)&info->blue_bright,&bufPtr,dir);
+    getInt((short*)&info->xadjust,&bufPtr,dir);
+    getInt((short*)&info->eyeseparation,&bufPtr,dir);
+    getInt((short*)&info->glassestype,&bufPtr,dir);
+    getInt((short*)&info->outside,&bufPtr,dir);
     getDouble(&info->x3rd,&bufPtr,dir);
     getDouble(&info->y3rd,&bufPtr,dir);
     getChar(&info->stdcalcmode,&bufPtr,dir);
     getChar(&info->useinitorbit,&bufPtr,dir);
-    getInt(&info->calc_status,&bufPtr,dir);
+    getInt((short*)&info->calc_status,&bufPtr,dir);
     getLong(&info->tot_extend_len,&bufPtr,dir);
-    getInt(&info->distest,&bufPtr,dir);
-    getInt(&info->floatflag,&bufPtr,dir);
-    getInt(&info->bailoutold,&bufPtr,dir);
+    getInt((short*)&info->distest,&bufPtr,dir);
+    getInt((short*)&info->floatflag,&bufPtr,dir);
+    getInt((short*)&info->bailoutold,&bufPtr,dir);
     getLong(&info->calctime,&bufPtr,dir);
     for (i=0;i<4;i++) {
 	getChar(&info->trigndx[i],&bufPtr,dir);
     }
-    getInt(&info->finattract,&bufPtr,dir);
+    getInt((short*)&info->finattract,&bufPtr,dir);
     getDouble(&info->initorbit[0],&bufPtr,dir);
     getDouble(&info->initorbit[1],&bufPtr,dir);
-    getInt(&info->periodicity,&bufPtr,dir);
-    getInt(&info->pot16bit,&bufPtr,dir);
+    getInt((short*)&info->periodicity,&bufPtr,dir);
+    getInt((short*)&info->pot16bit,&bufPtr,dir);
     getFloat(&info->faspectratio,&bufPtr,dir);
-    getInt(&info->system,&bufPtr,dir);
-    getInt(&info->release,&bufPtr,dir);
-    getInt(&info->flag3d,&bufPtr,dir);
-    getInt(&info->transparent[0],&bufPtr,dir);
-    getInt(&info->transparent[1],&bufPtr,dir);
-    getInt(&info->ambient,&bufPtr,dir);
-    getInt(&info->haze,&bufPtr,dir);
-    getInt(&info->randomize,&bufPtr,dir);
-    getInt(&info->rotate_lo,&bufPtr,dir);
-    getInt(&info->rotate_hi,&bufPtr,dir);
-    getInt(&info->distestwidth,&bufPtr,dir);
+    getInt((short*)&info->system,&bufPtr,dir);
+    getInt((short*)&info->release,&bufPtr,dir);
+    getInt((short*)&info->flag3d,&bufPtr,dir);
+    getInt((short*)&info->transparent[0],&bufPtr,dir);
+    getInt((short*)&info->transparent[1],&bufPtr,dir);
+    getInt((short*)&info->ambient,&bufPtr,dir);
+    getInt((short*)&info->haze,&bufPtr,dir);
+    getInt((short*)&info->randomize,&bufPtr,dir);
+    getInt((short*)&info->rotate_lo,&bufPtr,dir);
+    getInt((short*)&info->rotate_hi,&bufPtr,dir);
+    getInt((short*)&info->distestwidth,&bufPtr,dir);
     getDouble(&info->dparm3,&bufPtr,dir);
     getDouble(&info->dparm4,&bufPtr,dir);
-    getInt(&info->fillcolor,&bufPtr,dir);
+    getInt((short*)&info->fillcolor,&bufPtr,dir);
     getDouble(&info->mxmaxfp,&bufPtr,dir);
     getDouble(&info->mxminfp,&bufPtr,dir);
     getDouble(&info->mymaxfp,&bufPtr,dir);
     getDouble(&info->myminfp,&bufPtr,dir);
-    getInt(&info->zdots,&bufPtr,dir);
+    getInt((short*)&info->zdots,&bufPtr,dir);
     getFloat(&info->originfp,&bufPtr,dir);
     getFloat(&info->depthfp,&bufPtr,dir);
     getFloat(&info->heightfp,&bufPtr,dir);
     getFloat(&info->widthfp,&bufPtr,dir);
     getFloat(&info->distfp,&bufPtr,dir);
     getFloat(&info->eyesfp,&bufPtr,dir);
-    getInt(&info->orbittype,&bufPtr,dir);
-    getInt(&info->juli3Dmode,&bufPtr,dir);
-    getInt(&info->maxfn,&bufPtr,dir);
-    getInt(&info->inversejulia,&bufPtr,dir);
+    getInt((short*)&info->orbittype,&bufPtr,dir);
+    getInt((short*)&info->juli3Dmode,&bufPtr,dir);
+    getInt((short*)&info->maxfn,&bufPtr,dir);
+    getInt((short*)&info->inversejulia,&bufPtr,dir);
     getDouble(&info->dparm5,&bufPtr,dir);
     getDouble(&info->dparm6,&bufPtr,dir);
     getDouble(&info->dparm7,&bufPtr,dir);
@@ -637,29 +641,29 @@ decode_fractal_info(info,dir)
     getDouble(&info->dparm9,&bufPtr,dir);
     getDouble(&info->dparm10,&bufPtr,dir);
     getLong(&info->bailout,&bufPtr,dir);  
-    getInt(&info->bailoutest,&bufPtr,dir);
+    getInt((short*)&info->bailoutest,&bufPtr,dir);
     getLong(&info->iterations,&bufPtr,dir);
-    getInt(&info->bf_math,&bufPtr,dir);
-    getInt(&info->bflength,&bufPtr,dir);
-    getInt(&info->yadjust,&bufPtr,dir); 
-    getInt(&info->old_demm_colors,&bufPtr,dir);
+    getInt((short*)&info->bf_math,&bufPtr,dir);
+    getInt((short*)&info->bflength,&bufPtr,dir);
+    getInt((short*)&info->yadjust,&bufPtr,dir);
+    getInt((short*)&info->old_demm_colors,&bufPtr,dir);
     getLong(&info->logmap,&bufPtr,dir);
     getLong(&info->distest,&bufPtr,dir);
     getDouble(&info->dinvert[0],&bufPtr,dir);
     getDouble(&info->dinvert[1],&bufPtr,dir);
     getDouble(&info->dinvert[2],&bufPtr,dir);
-    getInt(&info->logcalc,&bufPtr,dir);
-    getInt(&info->stoppass,&bufPtr,dir);
-    getInt(&info->quick_calc,&bufPtr,dir);
+    getInt((short*)&info->logcalc,&bufPtr,dir);
+    getInt((short*)&info->stoppass,&bufPtr,dir);
+    getInt((short*)&info->quick_calc,&bufPtr,dir);
     getDouble(&info->closeprox,&bufPtr,dir);
-    getInt(&info->nobof,&bufPtr,dir);
+    getInt((short*)&info->nobof,&bufPtr,dir);
     getLong(&info->orbit_interval,&bufPtr,dir);
-    getInt(&info->orbit_delay,&bufPtr,dir);
+    getInt((short*)&info->orbit_delay,&bufPtr,dir);
     getDouble(&info->math_tol[0],&bufPtr,dir);
     getDouble(&info->math_tol[1],&bufPtr,dir);
 
     for (i=0;i<(sizeof(info->future)/sizeof(short));i++) {
-        getInt(&info->future[i],&bufPtr,dir);
+        getInt((short*)&info->future[i],&bufPtr,dir);
     }   
     if (bufPtr-buf != FRACTAL_INFO_SIZE) {
 	printf("Warning: loadfile miscount on fractal_info structure.\n");
@@ -677,10 +681,7 @@ decode_fractal_info(info,dir)
  * This routine gets a char out of the buffer.
  * It updates the buffer pointer accordingly.
  */
-static void getChar(dst,src,dir)
-    unsigned char *dst;
-    unsigned char **src;
-    int dir;
+static void getChar(unsigned char *dst, unsigned char **src, int dir)
 {
     if (dir==1) {
 	*dst = **src;
@@ -694,10 +695,7 @@ static void getChar(dst,src,dir)
  * This routine gets an int out of the buffer.
  * It updates the buffer pointer accordingly.
  */
-static void getInt(dst,src,dir)
-    short *dst;
-    unsigned char **src;
-    int dir;
+static void getInt(short *dst, unsigned char **src, int dir)
 {
     if (dir==1) {
 	*dst = (*src)[0] + ((((char *)(*src))[1])<<8);
@@ -712,10 +710,7 @@ static void getInt(dst,src,dir)
  * This routine gets a long out of the buffer.
  * It updates the buffer pointer accordingly.
  */
-static void getLong(dst,src,dir)
-    long *dst;
-    unsigned char **src;
-    int dir;
+static void getLong(long *dst, unsigned char **src, int dir)
 {
     if (dir==1) {
 	*dst = ((unsigned long)((*src)[0])) +
@@ -753,10 +748,7 @@ static void getLong(dst,src,dir)
  * buffer;
  * It updates the buffer pointer accordingly.
  */
-static void getDouble(dst,src,dir)
-    double *dst;
-    unsigned char **src;
-    int dir;
+static void getDouble(double *dst, unsigned char **src, int dir)
 {
     int e;
     double f;
@@ -828,10 +820,7 @@ static void getDouble(dst,src,dir)
  * This routine gets a float out of the buffer.
  * It updates the buffer pointer accordingly.
  */
-static void getFloat(dst,src,dir)
-    float *dst;
-    unsigned char **src;
-    int dir;
+static void getFloat(float *dst, unsigned char **src, int dir)
 {
     int e;
     double f;
@@ -910,7 +899,7 @@ fix_ranges(ranges,num,dir)
 	bcopy((char *)ranges, (char *)buf, num*sizeof(int));
     }
     for (i=0;i<num;i++) {
-	getInt(&ranges[i],&bufPtr,dir);
+	getInt((short*)&ranges[i],&bufPtr,dir);
     }
     free((char *)buf);
 }
@@ -934,29 +923,29 @@ decode_evolver_info(info,dir)
 	bcopy((char *)info,(char *)buf,sizeof(struct evolution_info));
     }
 
-    getInt(&info->evolving,&bufPtr,dir);
-    getInt(&info->gridsz,&bufPtr,dir);
-    getInt(&info->this_gen_rseed,&bufPtr,dir);
+    getInt((short*)&info->evolving,&bufPtr,dir);
+    getInt((short*)&info->gridsz,&bufPtr,dir);
+    getInt((short*)&info->this_gen_rseed,&bufPtr,dir);
     getDouble(&info->fiddlefactor,&bufPtr,dir);
     getDouble(&info->paramrangex,&bufPtr,dir);
     getDouble(&info->paramrangey,&bufPtr,dir);
     getDouble(&info->opx,&bufPtr,dir);
     getDouble(&info->opy,&bufPtr,dir);
-    getInt(&info->odpx,&bufPtr,dir);
-    getInt(&info->odpy,&bufPtr,dir);
-    getInt(&info->px,&bufPtr,dir);
-    getInt(&info->py,&bufPtr,dir);
-    getInt(&info->sxoffs,&bufPtr,dir);
-    getInt(&info->syoffs,&bufPtr,dir);
-    getInt(&info->xdots,&bufPtr,dir);
-    getInt(&info->ydots,&bufPtr,dir);
+    getInt((short*)&info->odpx,&bufPtr,dir);
+    getInt((short*)&info->odpy,&bufPtr,dir);
+    getInt((short*)&info->px,&bufPtr,dir);
+    getInt((short*)&info->py,&bufPtr,dir);
+    getInt((short*)&info->sxoffs,&bufPtr,dir);
+    getInt((short*)&info->syoffs,&bufPtr,dir);
+    getInt((short*)&info->xdots,&bufPtr,dir);
+    getInt((short*)&info->ydots,&bufPtr,dir);
     for (i=0;i<NUMGENES;i++) {
-        getInt(&info->mutate[i],&bufPtr,dir);
+        getInt((short*)&info->mutate[i],&bufPtr,dir);
     }
-    getInt(&info->ecount,&bufPtr,dir);
+    getInt((short*)&info->ecount,&bufPtr,dir);
 
     for (i=0;i<(sizeof(info->future)/sizeof(short));i++) {
-        getInt(&info->future[i],&bufPtr,dir);
+        getInt((short*)&info->future[i],&bufPtr,dir);
     }   
     if (bufPtr-buf != EVOLVER_INFO_SIZE) {
 	printf("Warning: loadfile miscount on evolution_info structure.\n");
@@ -995,12 +984,12 @@ decode_orbits_info(info,dir)
     getDouble(&info->oymax,&bufPtr,dir);
     getDouble(&info->ox3rd,&bufPtr,dir);
     getDouble(&info->oy3rd,&bufPtr,dir);
-    getInt(&info->keep_scrn_coords,&bufPtr,dir);
+    getInt((short*)&info->keep_scrn_coords,&bufPtr,dir);
     getChar(&info->drawmode,&bufPtr,dir);
     getChar(&info->dummy,&bufPtr,dir);
 
     for (i=0;i<(sizeof(info->future)/sizeof(short));i++) {
-        getInt(&info->future[i],&bufPtr,dir);
+        getInt((short*)&info->future[i],&bufPtr,dir);
     }   
     if (bufPtr-buf != ORBITS_INFO_SIZE) {
 	printf("Warning: loadfile miscount on orbits_info structure.\n");
diff --git a/unix/unixscr.c b/unix/unixscr.c
index 1808ccf..21d8070 100644
--- a/unix/unixscr.c
+++ b/unix/unixscr.c
@@ -91,13 +91,13 @@ extern struct videoinfo videotable[];
 
 extern unsigned char dacbox[256][3];
 
-extern void drawbox();
+extern void drawbox(int);
 
 extern int text_type;
 extern int helpmode;
 extern int rotate_hi;
 
-extern void fpe_handler();
+extern void fpe_handler(int signum);
 
 extern WINDOW *curwin;
 extern int screenctr;
@@ -1089,9 +1089,7 @@ xcmapstuff()
  *----------------------------------------------------------------------
  */
 void
-writevideoline(y,x,lastx,pixels)
-int x,y,lastx;
-BYTE *pixels;
+writevideoline(int x, int y, int lastx, BYTE *pixels)
 {
     int width;
     int i;
@@ -1840,7 +1838,7 @@ handleesc()
 }
 
 extern int editpal_cursor;
-extern void Cursor_SetPos();
+extern void Cursor_SetPos (int x, int y);
 
 int XZoomWaiting = 0;
 static int ctl_mode = 0;
diff --git a/unix/video.c b/unix/video.c
index bd5166c..9c44797 100644
--- a/unix/video.c
+++ b/unix/video.c
@@ -32,8 +32,8 @@ int goodmode = 0;		/* if non-zero, OK to read/write pixels */
 void (*dotwrite) (int, int, int);
 				/* write-a-dot routine */
 int (*dotread) (int, int);	/* read-a-dot routine */
-void (*linewrite) ();		/* write-a-line routine */
-void (*lineread) ();		/* read-a-line routine */
+void (*linewrite) (int x, int y, int lastx, BYTE *pixels);		/* write-a-line routine */
+void (*lineread) (int x, int y, int lastx, BYTE *pixels);		/* read-a-line routine */
 int andcolor = 0;		/* "and" value used for color selection */
 int diskflag = 0;		/* disk video active flag */
 
@@ -145,8 +145,8 @@ setnullvideo (void)
   dotread = nullread;
 }
 
-void normalineread ();
-void normaline ();
+void normalineread (int x, int y, int lastx, BYTE *pixels);
+void normaline (int x, int y, int lastx, BYTE *pixels);
 
 void
 putprompt (void)
@@ -656,9 +656,7 @@ adapter_detect (void)
 */
 
 void
-normaline (y, x, lastx, pixels)
-     int x, y, lastx;
-     BYTE *pixels;
+normaline (int x, int y, int lastx, BYTE *pixels)
 {
   int i, width;
   width = lastx - x + 1;
@@ -669,9 +667,7 @@ normaline (y, x, lastx, pixels)
 }
 
 void
-normalineread (y, x, lastx, pixels)
-     int x, y, lastx;
-     BYTE *pixels;
+normalineread (int x, int y, int lastx, BYTE *pixels)
 {
   int i, width;
   width = lastx - x + 1;

Attachment: signature.asc
Description: PGP signature


Reply to: