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
|
From a64a83210643114b3a892e70ce07ded5bd5de054 Mon Sep 17 00:00:00 2001
From: Joao Eriberto Mota Filho <eriberto@eriberto.pro.br>
Date: Fri, 23 May 2025 11:45:16 -0300
Subject: [PATCH] Fix function definitions to use modern ANSI C prototypes
(#119)
* Fix function definitions to use modern ANSI C prototypes
This commit solves GCC-15 warnings
"old-style function definition [-Wold-style-definition]"
Closes #115
* Update CHANGES
---------
Co-authored-by: Tobias Oetiker <tobi@oetiker.ch>
--- a/src/rateup.c
+++ b/src/rateup.c
@@ -264,18 +264,11 @@ static double expscale(double y, double maxy)
}
static void
-image (file, maxvi, maxvo, maxx, maxy, xscale, yscale, growright, step, bits,
- ytics, yticsf, peak, currdatetimeformat, currdatetimepos)
- char *file;
- long long maxvi, maxvo;
- long maxx;
- long maxy, growright, step, bits;
- double xscale, yscale;
- int ytics; /* number of tics on the y axis */
- double yticsf; /* scale everything on the y axis with this factor */
- int peak;
- char *currdatetimeformat;
- int currdatetimepos;
+image (char *file, long long maxvi, long long maxvo, long maxx, long maxy, double xscale, double yscale,
+ long growright, long step, long bits, int ytics, double yticsf, int peak, char *currdatetimeformat,
+ int currdatetimepos)
+ /* ytics: number of tics on the y axis */
+ /* yticsf: scale everything on the y axis with this factor */
{
FILE *fo;
char file_tmp[10240];
@@ -1156,8 +1149,7 @@ image (file, maxvi, maxvo, maxx, maxy, xscale, yscale, growright, step, bits,
static double
-diff (a, b)
- char *a, *b;
+diff (char *a, char *b)
{
char res[MAXL], *a1, *b1, *r1;
int c, x, m;
@@ -1228,8 +1220,7 @@ diff (a, b)
}
static int
-readhist (file)
- char *file;
+readhist (char *file)
{
FILE *fi;
int x, retcode = 0;
@@ -1380,10 +1371,7 @@ readfile ()
}
static void
-update (in, out, abs_max, absupdate)
- char *in, *out;
- long long abs_max;
- int absupdate;
+update (char *in, char *out, long long abs_max, int absupdate)
{
FILE *fo;
char buf[128], buf1[128], buf2[128];
@@ -1824,9 +1812,7 @@ readparam (char const *file)
}
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int x, argi, used, initarg;
|