Skip to content

Commit d277919

Browse files
committed
* Source/x11/scale.c,
* Source/x11/xutil.c: Update function declaration to modern C.
1 parent e59d923 commit d277919

File tree

3 files changed

+15
-18
lines changed

3 files changed

+15
-18
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2025-05-21 Fred Kiefer <[email protected]>
2+
3+
* Source/x11/scale.c,
4+
* Source/x11/xutil.c: Update function declaration to modern C.
5+
16
2025-02-11 Richard Frith-Macdonald <[email protected]>
27

38
* ANNOUNCE:

Source/x11/scale.c

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,7 @@ RScaleImage(RImage *src, unsigned new_width, unsigned new_height)
244244
#define filter_support (1.0)
245245

246246
static double
247-
filter(t)
248-
double t;
247+
filter(double t)
249248
{
250249
/* f(t) = 2|t|^3 - 3|t|^2 + 1, -1 <= t <= 1 */
251250
if(t < 0.0) t = -t;
@@ -256,8 +255,7 @@ double t;
256255
#define box_support (0.5)
257256

258257
static double
259-
box_filter(t)
260-
double t;
258+
box_filter(double t)
261259
{
262260
if((t > -0.5) && (t <= 0.5)) return(1.0);
263261
return(0.0);
@@ -266,8 +264,7 @@ double t;
266264
#define triangle_support (1.0)
267265

268266
static double
269-
triangle_filter(t)
270-
double t;
267+
triangle_filter(double t)
271268
{
272269
if(t < 0.0) t = -t;
273270
if(t < 1.0) return(1.0 - t);
@@ -277,8 +274,7 @@ double t;
277274
#define bell_support (1.5)
278275

279276
static double
280-
bell_filter(t) /* box (*) box (*) box */
281-
double t;
277+
bell_filter(double t) /* box (*) box (*) box */
282278
{
283279
if(t < 0) t = -t;
284280
if(t < .5) return(.75 - (t * t));
@@ -292,8 +288,7 @@ double t;
292288
#define B_spline_support (2.0)
293289

294290
static double
295-
B_spline_filter(t) /* box (*) box (*) box (*) box */
296-
double t;
291+
B_spline_filter(double t) /* box (*) box (*) box (*) box */
297292
{
298293
double tt;
299294

@@ -309,8 +304,7 @@ double t;
309304
}
310305

311306
static double
312-
sinc(x)
313-
double x;
307+
sinc(double x)
314308
{
315309
x *= PI;
316310
if(x != 0) return(sin(x) / x);
@@ -320,8 +314,7 @@ double x;
320314
#define Lanczos3_support (3.0)
321315

322316
static double
323-
Lanczos3_filter(t)
324-
double t;
317+
Lanczos3_filter(double t)
325318
{
326319
if(t < 0) t = -t;
327320
if(t < 3.0) return(sinc(t) * sinc(t/3.0));
@@ -334,8 +327,7 @@ double t;
334327
#define C (1.0 / 3.0)
335328

336329
static double
337-
Mitchell_filter(t)
338-
double t;
330+
Mitchell_filter(double t)
339331
{
340332
double tt;
341333

@@ -356,7 +348,7 @@ double t;
356348
return(0.0);
357349
}
358350

359-
static double (*filterf)() = Mitchell_filter;
351+
static double (*filterf)(double) = Mitchell_filter;
360352
static double fwidth = Mitchell_support;
361353

362354
void

Source/x11/xutil.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
static int shmError;
4444

45-
static int (*oldErrorHandler)();
45+
static int (*oldErrorHandler)(Display*, XErrorEvent*);
4646

4747
static int
4848
errorHandler(Display *dpy, XErrorEvent *err)

0 commit comments

Comments
 (0)