1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677
|
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;
|