summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-08-01 01:07:12 +0100
committerIan Lynagh <igloo@earth.li>2011-08-01 01:07:12 +0100
commit96ebe2fa43b9ee98cd82d31760c57db0fea18495 (patch)
tree93e6995b75c08c84f2e7fc908ec3634cd64b0e92
parentb4a01788a1a833de64cba041c796fa35e0275220 (diff)
downloadhaskell-96ebe2fa43b9ee98cd82d31760c57db0fea18495.tar.gz
Remove some antiquated C constructs
Fixes validate on amd64/Linux with: SRC_CC_OPTS += -Wmissing-parameter-type SRC_CC_OPTS += -Wold-style-declaration SRC_CC_OPTS += -Wold-style-definition
-rw-r--r--compiler/ghci/keepCAFsForGHCi.c4
-rw-r--r--rts/hooks/OnExit.c2
-rw-r--r--rts/posix/OSThreads.c6
-rw-r--r--utils/hp2ps/AreaBelow.c2
-rw-r--r--utils/hp2ps/AuxFile.c12
-rw-r--r--utils/hp2ps/Axes.c18
-rw-r--r--utils/hp2ps/Curves.c25
-rw-r--r--utils/hp2ps/Deviation.c5
-rw-r--r--utils/hp2ps/Dimensions.c7
-rw-r--r--utils/hp2ps/Error.c3
-rw-r--r--utils/hp2ps/HpFile.c40
-rw-r--r--utils/hp2ps/Key.c5
-rw-r--r--utils/hp2ps/Main.c13
-rw-r--r--utils/hp2ps/Marks.c5
-rw-r--r--utils/hp2ps/PsFile.c35
-rw-r--r--utils/hp2ps/Reorder.c9
-rw-r--r--utils/hp2ps/Scale.c4
-rw-r--r--utils/hp2ps/Shade.c16
-rw-r--r--utils/hp2ps/TopTwenty.c2
-rw-r--r--utils/hp2ps/TraceElement.c2
-rw-r--r--utils/hp2ps/Utilities.c26
-rw-r--r--utils/unlit/unlit.c6
22 files changed, 93 insertions, 154 deletions
diff --git a/compiler/ghci/keepCAFsForGHCi.c b/compiler/ghci/keepCAFsForGHCi.c
index f125d4c4d0..805088e753 100644
--- a/compiler/ghci/keepCAFsForGHCi.c
+++ b/compiler/ghci/keepCAFsForGHCi.c
@@ -7,9 +7,9 @@
// files.
#ifdef DYNAMIC
-static void keepCAFsForGHCi() __attribute__((constructor));
+static void keepCAFsForGHCi(void) __attribute__((constructor));
-static void keepCAFsForGHCi()
+static void keepCAFsForGHCi(void)
{
keepCAFs = 1;
}
diff --git a/rts/hooks/OnExit.c b/rts/hooks/OnExit.c
index e8019c046b..30764acba2 100644
--- a/rts/hooks/OnExit.c
+++ b/rts/hooks/OnExit.c
@@ -15,6 +15,6 @@
*/
void
-OnExitHook ()
+OnExitHook (void)
{
}
diff --git a/rts/posix/OSThreads.c b/rts/posix/OSThreads.c
index 29cb23eb6d..cc3baeb1bb 100644
--- a/rts/posix/OSThreads.c
+++ b/rts/posix/OSThreads.c
@@ -101,14 +101,14 @@ waitCondition ( Condition* pCond, Mutex* pMut )
}
void
-yieldThread()
+yieldThread(void)
{
sched_yield();
return;
}
void
-shutdownThread()
+shutdownThread(void)
{
pthread_exit(NULL);
}
@@ -123,7 +123,7 @@ createOSThread (OSThreadId* pId, OSThreadProc *startProc, void *param)
}
OSThreadId
-osThreadId()
+osThreadId(void)
{
return pthread_self();
}
diff --git a/utils/hp2ps/AreaBelow.c b/utils/hp2ps/AreaBelow.c
index ec80e1ed48..0ce2077772 100644
--- a/utils/hp2ps/AreaBelow.c
+++ b/utils/hp2ps/AreaBelow.c
@@ -15,7 +15,7 @@
*/
floatish
-AreaBelow()
+AreaBelow(void)
{
intish i;
intish j;
diff --git a/utils/hp2ps/AuxFile.c b/utils/hp2ps/AuxFile.c
index 9998d3fc13..39add0fcde 100644
--- a/utils/hp2ps/AuxFile.c
+++ b/utils/hp2ps/AuxFile.c
@@ -15,8 +15,7 @@ static void GetAuxLine PROTO((FILE *)); /* forward */
static void GetAuxTok PROTO((FILE *)); /* forward */
void
-GetAuxFile(auxfp)
- FILE* auxfp;
+GetAuxFile(FILE *auxfp)
{
ch = ' ';
endfile = 0;
@@ -39,8 +38,7 @@ GetAuxFile(auxfp)
*/
static void
-GetAuxLine(auxfp)
- FILE* auxfp;
+GetAuxLine(FILE *auxfp)
{
switch (thetok) {
case X_RANGE_TOK:
@@ -108,8 +106,7 @@ GetAuxLine(auxfp)
* in the case of identifiers it is assigned to "theident".
*/
-static void GetAuxTok(auxfp)
-FILE* auxfp;
+static void GetAuxTok(FILE *auxfp)
{
while (isspace(ch)) { /* skip whitespace */
@@ -147,8 +144,7 @@ FILE* auxfp;
}
void
-PutAuxFile(auxfp)
- FILE* auxfp;
+PutAuxFile(FILE *auxfp)
{
int i;
diff --git a/utils/hp2ps/Axes.c b/utils/hp2ps/Axes.c
index a2641cd676..4c2e4f5e95 100644
--- a/utils/hp2ps/Axes.c
+++ b/utils/hp2ps/Axes.c
@@ -21,15 +21,14 @@ static void YAxisMark PROTO((floatish, floatish, mkb)); /* forward */
static floatish Round PROTO((floatish)); /* forward */
void
-Axes()
+Axes(void)
{
XAxis();
YAxis();
}
static void
-XAxisMark(x, num)
- floatish x; floatish num;
+XAxisMark(floatish x, floatish num)
{
/* calibration mark */
fprintf(psfp, "%f %f moveto\n", xpage(x), ypage(0.0));
@@ -54,7 +53,7 @@ extern floatish xrange;
extern char *sampleunitstring;
static void
-XAxis()
+XAxis(void)
{
floatish increment, i;
floatish t, x;
@@ -93,8 +92,7 @@ XAxis()
}
static void
-YAxisMark(y, num, unit)
- floatish y; floatish num; mkb unit;
+YAxisMark(floatish y, floatish num, mkb unit)
{
/* calibration mark */
fprintf(psfp, "%f %f moveto\n", xpage(0.0), ypage(y));
@@ -141,7 +139,7 @@ extern floatish yrange;
extern char *valueunitstring;
static void
-YAxis()
+YAxis(void)
{
floatish increment, i;
floatish t, y;
@@ -200,8 +198,7 @@ YAxis()
static floatish OneTwoFive PROTO((floatish)); /* forward */
static floatish
-Round(y)
- floatish y;
+Round(floatish y)
{
int i;
@@ -228,8 +225,7 @@ Round(y)
*/
static floatish
-OneTwoFive(y)
- floatish y;
+OneTwoFive(floatish y)
{
if (y > 4.0) {
return (5.0);
diff --git a/utils/hp2ps/Curves.c b/utils/hp2ps/Curves.c
index ec05c98336..03952743f2 100644
--- a/utils/hp2ps/Curves.c
+++ b/utils/hp2ps/Curves.c
@@ -20,7 +20,7 @@ static void ShadeCurve
PROTO((floatish *x, floatish *y, floatish *py, floatish shade));
void
-Curves()
+Curves(void)
{
intish i;
@@ -35,8 +35,7 @@ Curves()
*/
static void
-Curve(e)
- struct entry* e;
+Curve(struct entry *e)
{
struct chunk* ch;
int j;
@@ -61,8 +60,7 @@ static void SaveCurve PROTO((floatish *, floatish *)); /* forward */
*/
floatish
-xpage(x)
- floatish x;
+xpage(floatish x)
{
return (x + graphx0);
}
@@ -74,8 +72,7 @@ xpage(x)
*/
floatish
-ypage(y)
- floatish y;
+ypage(floatish y)
{
return (y + graphy0);
}
@@ -87,8 +84,7 @@ ypage(y)
*/
static void
-ShadeCurve(x, y, py, shade)
- floatish *x; floatish *y; floatish *py; floatish shade;
+ShadeCurve(floatish *x, floatish *y, floatish *py, floatish shade)
{
fprintf(psfp, "%f %f moveto\n", xpage(x[0]), ypage(py[0]));
PlotCurveLeftToRight(x, py);
@@ -111,8 +107,7 @@ ShadeCurve(x, y, py, shade)
}
static void
-PlotCurveLeftToRight(x,y)
- floatish *x; floatish *y;
+PlotCurveLeftToRight(floatish *x, floatish *y)
{
intish i;
@@ -122,8 +117,7 @@ PlotCurveLeftToRight(x,y)
}
static void
-PlotCurveRightToLeft(x,y)
- floatish *x; floatish *y;
+PlotCurveRightToLeft(floatish *x, floatish *y)
{
intish i;
@@ -137,8 +131,7 @@ PlotCurveRightToLeft(x,y)
*/
static void
-SaveCurve(y, py)
- floatish *y; floatish* py;
+SaveCurve(floatish *y, floatish *py)
{
intish i;
@@ -150,7 +143,7 @@ SaveCurve(y, py)
extern floatish xrange;
void
-CurvesInit()
+CurvesInit(void)
{
intish i;
diff --git a/utils/hp2ps/Deviation.c b/utils/hp2ps/Deviation.c
index ecf7faba16..fe1be70fcf 100644
--- a/utils/hp2ps/Deviation.c
+++ b/utils/hp2ps/Deviation.c
@@ -18,7 +18,7 @@
*/
void
-Deviation()
+Deviation(void)
{
intish i;
intish j;
@@ -96,8 +96,7 @@ Deviation()
}
void
-Identorder(iflag)
- int iflag; /* a funny three-way flag ? WDP 95/03 */
+Identorder(int iflag) /* iflag is a funny three-way flag ? WDP 95/03 */
{
int i;
int j;
diff --git a/utils/hp2ps/Dimensions.c b/utils/hp2ps/Dimensions.c
index 878dd4efe2..a13ca33617 100644
--- a/utils/hp2ps/Dimensions.c
+++ b/utils/hp2ps/Dimensions.c
@@ -31,7 +31,7 @@ floatish graphwidth;
static floatish KeyWidth PROTO((void)); /* forward */
void
-Dimensions()
+Dimensions(void)
{
boolish keyOnGraph;
@@ -63,7 +63,7 @@ Dimensions()
*/
static floatish
-KeyWidth()
+KeyWidth(void)
{
intish i;
floatish c;
@@ -193,8 +193,7 @@ floatish fonttab[] = {
#define FUDGE (2.834646 * 0.6)
floatish
-StringSize(s)
- char* s;
+StringSize(char *s)
{
floatish r;
diff --git a/utils/hp2ps/Error.c b/utils/hp2ps/Error.c
index 68f88d8c91..346e267eb1 100644
--- a/utils/hp2ps/Error.c
+++ b/utils/hp2ps/Error.c
@@ -37,8 +37,7 @@ Disaster(const char *fmt, ...)
}
void
-Usage(str)
- const char *str;
+Usage(const char *str)
{
if (str) printf("error: %s\n", str);
printf("usage: %s -b -d -ef -g -i -p -mn -p -s -tf -y [file[.hp]]\n", programname);
diff --git a/utils/hp2ps/HpFile.c b/utils/hp2ps/HpFile.c
index 787a268229..86cbfb2049 100644
--- a/utils/hp2ps/HpFile.c
+++ b/utils/hp2ps/HpFile.c
@@ -66,8 +66,7 @@ floatish *markmap; /* sample marks */
*/
void
-GetHpFile(infp)
- FILE *infp;
+GetHpFile(FILE *infp)
{
nsamples = 0;
nmarks = 0;
@@ -117,8 +116,7 @@ GetHpFile(infp)
*/
static void
-GetHpLine(infp)
- FILE* infp;
+GetHpLine(FILE *infp)
{
static intish nmarkmax = 0, nsamplemax = 0;
@@ -246,8 +244,7 @@ GetHpLine(infp)
char *
-TokenToString(t)
- token t;
+TokenToString(token t)
{
switch (t) {
case EOF_TOK: return "EOF";
@@ -280,8 +277,7 @@ TokenToString(t)
*/
static void
-GetHpTok(infp)
- FILE* infp;
+GetHpTok(FILE *infp)
{
while (isspace(ch)) { /* skip whitespace */
@@ -339,8 +335,7 @@ GetHpTok(infp)
static char numberstring[ NUMBER_LENGTH - 1 ];
token
-GetNumber(infp)
- FILE* infp;
+GetNumber(FILE *infp)
{
int i;
int containsdot;
@@ -374,8 +369,7 @@ GetNumber(infp)
*/
void
-GetIdent(infp)
- FILE *infp;
+GetIdent(FILE *infp)
{
unsigned int i;
char idbuffer[5000];
@@ -400,8 +394,7 @@ GetIdent(infp)
*/
void
-GetString(infp)
- FILE *infp;
+GetString(FILE *infp)
{
unsigned int i;
char *stringbuffer;
@@ -436,8 +429,7 @@ GetString(infp)
}
boolish
-IsIdChar(ch)
- int ch;
+IsIdChar(int ch)
{
return (!isspace(ch));
}
@@ -454,8 +446,7 @@ IsIdChar(ch)
static struct entry* hashtable[ N_HASH ];
static intish
-Hash(s)
- char *s;
+Hash(char *s)
{
int r;
@@ -474,7 +465,7 @@ Hash(s)
*/
static struct chunk*
-MakeChunk()
+MakeChunk(void)
{
struct chunk* ch;
struct datapoint* d;
@@ -496,8 +487,7 @@ MakeChunk()
*/
struct entry *
-MakeEntry(name)
- char *name;
+MakeEntry(char *name)
{
struct entry* e;
@@ -513,8 +503,7 @@ MakeEntry(name)
*/
static struct entry *
-GetEntry(name)
- char* name;
+GetEntry(char *name)
{
intish h;
struct entry* e;
@@ -544,8 +533,7 @@ GetEntry(name)
*/
void
-StoreSample(en, bucket, value)
- struct entry* en; intish bucket; floatish value;
+StoreSample(struct entry *en, intish bucket, floatish value)
{
struct chunk* chk;
@@ -575,7 +563,7 @@ struct entry** identtable;
*/
static void
-MakeIdentTable()
+MakeIdentTable(void)
{
intish i;
intish j;
diff --git a/utils/hp2ps/Key.c b/utils/hp2ps/Key.c
index 314a682dd6..5fa76ab6d7 100644
--- a/utils/hp2ps/Key.c
+++ b/utils/hp2ps/Key.c
@@ -12,7 +12,7 @@
static void KeyEntry PROTO((floatish, char *, floatish));
-void Key()
+void Key(void)
{
intish i;
floatish c;
@@ -39,8 +39,7 @@ void Key()
static void
-KeyEntry(centreline, name, colour)
- floatish centreline; char* name; floatish colour;
+KeyEntry(floatish centreline, char *name, floatish colour)
{
floatish namebase;
floatish keyboxbase;
diff --git a/utils/hp2ps/Main.c b/utils/hp2ps/Main.c
index 947ff46731..1c21d2b2cb 100644
--- a/utils/hp2ps/Main.c
+++ b/utils/hp2ps/Main.c
@@ -63,9 +63,7 @@ intish nidents;
floatish THRESHOLD_PERCENT = DEFAULT_THRESHOLD;
int TWENTY = DEFAULT_TWENTY;
-int main(argc, argv)
-int argc;
-char* argv[];
+int main(int argc, char *argv[])
{
programname = copystring(Basename(argv[0]));
@@ -195,8 +193,7 @@ typedef enum {POINTS, INCHES, MILLIMETRES} pim;
static pim Units PROTO((char *)); /* forward */
static floatish
-WidthInPoints(wstr)
- char *wstr;
+WidthInPoints(char *wstr)
{
floatish result;
@@ -221,8 +218,7 @@ WidthInPoints(wstr)
static pim
-Units(wstr)
- char* wstr;
+Units(char *wstr)
{
int i;
@@ -240,8 +236,7 @@ int i;
}
static FILE *
-Fp(rootname, filename, suffix, mode)
- char* rootname; char** filename; char* suffix; char* mode;
+Fp(char *rootname, char **filename, char *suffix, char *mode)
{
*filename = copystring2(rootname, suffix);
diff --git a/utils/hp2ps/Marks.c b/utils/hp2ps/Marks.c
index 8d6f924e17..feb341ee03 100644
--- a/utils/hp2ps/Marks.c
+++ b/utils/hp2ps/Marks.c
@@ -10,7 +10,7 @@
static void Caret PROTO((floatish, floatish, floatish));
void
-Marks()
+Marks(void)
{
intish i;
floatish m;
@@ -27,8 +27,7 @@ Marks()
*/
static void
-Caret(x,y,d)
- floatish x; floatish y; floatish d;
+Caret(floatish x, floatish y, floatish d)
{
fprintf(psfp, "%f %f moveto\n", x - d, y);
fprintf(psfp, "%f %f rlineto\n", d, -d);
diff --git a/utils/hp2ps/PsFile.c b/utils/hp2ps/PsFile.c
index 1324da6f08..6013a073e4 100644
--- a/utils/hp2ps/PsFile.c
+++ b/utils/hp2ps/PsFile.c
@@ -21,7 +21,7 @@ static void TitleOutlineBox PROTO((void)); /* forward */
static void BigTitleText PROTO((void)); /* forward */
static void TitleText PROTO((void)); /* forward */
-static void DoTitleAndBox()
+static void DoTitleAndBox(void)
{
BorderOutlineBox();
@@ -37,14 +37,14 @@ static void DoTitleAndBox()
static void Landscape PROTO((void)); /* forward */
static void Portrait PROTO((void)); /* forward */
-void NextPage() {
+void NextPage(void) {
fprintf(psfp, "showpage\n");
if (gflag) Portrait(); else Landscape();
DoTitleAndBox();
}
void
-PutPsFile()
+PutPsFile(void)
{
Prologue();
Variables();
@@ -75,7 +75,7 @@ static void EPSFSpecialComments PROTO((floatish)); /* forward */
static void Scaling PROTO((floatish)); /* forward */
static void
-Prologue()
+Prologue(void)
{
if (eflag) {
floatish epsfscale = epsfwidth / (floatish) borderwidth;
@@ -91,7 +91,7 @@ extern char *jobstring;
extern char *datestring;
static void
-StandardSpecialComments()
+StandardSpecialComments(void)
{
fprintf(psfp, "%%!PS-Adobe-2.0\n");
fprintf(psfp, "%%%%Title: %s\n", jobstring);
@@ -101,8 +101,7 @@ StandardSpecialComments()
}
static void
-EPSFSpecialComments(epsfscale)
- floatish epsfscale;
+EPSFSpecialComments(floatish epsfscale)
{
fprintf(psfp, "%%!PS-Adobe-2.0\n");
fprintf(psfp, "%%%%Title: %s\n", jobstring);
@@ -117,7 +116,7 @@ EPSFSpecialComments(epsfscale)
static void
-Landscape()
+Landscape(void)
{
fprintf(psfp, "-90 rotate\n");
fprintf(psfp, "%f %f translate\n", -(borderwidth + (floatish) START_Y),
@@ -125,21 +124,20 @@ Landscape()
}
static void
-Portrait()
+Portrait(void)
{
fprintf(psfp, "%f %f translate\n", (floatish) START_X, (floatish) START_Y);
}
static void
-Scaling(epsfscale)
- floatish epsfscale;
+Scaling(floatish epsfscale)
{
fprintf(psfp, "%f %f scale\n", epsfscale, epsfscale);
}
static void
-Variables()
+Variables(void)
{
fprintf(psfp, "/HE%d /Helvetica findfont %d scalefont def\n",
NORMAL_FONT, NORMAL_FONT);
@@ -150,7 +148,7 @@ Variables()
static void
-BorderOutlineBox()
+BorderOutlineBox(void)
{
fprintf(psfp, "newpath\n");
fprintf(psfp, "0 0 moveto\n");
@@ -163,7 +161,7 @@ BorderOutlineBox()
}
static void
-BigTitleOutlineBox()
+BigTitleOutlineBox(void)
{
fprintf(psfp, "newpath\n");
fprintf(psfp, "%f %f moveto\n", borderspace,
@@ -183,7 +181,7 @@ BigTitleOutlineBox()
static void
-TitleOutlineBox()
+TitleOutlineBox(void)
{
fprintf(psfp, "newpath\n");
fprintf(psfp, "%f %f moveto\n", borderspace,
@@ -199,7 +197,7 @@ TitleOutlineBox()
static void EscapePrint PROTO((char *, int)); /* forward */
static void
-BigTitleText()
+BigTitleText(void)
{
floatish x, y;
@@ -238,7 +236,7 @@ BigTitleText()
static void
-TitleText()
+TitleText(void)
{
floatish x, y;
@@ -283,8 +281,7 @@ TitleText()
*/
static void
-EscapePrint(s,w)
- char* s; int w;
+EscapePrint(char *s, int w)
{
for ( ; *s && w > 0; s++, w--) {
if (*s == '(') { /* escape required */
diff --git a/utils/hp2ps/Reorder.c b/utils/hp2ps/Reorder.c
index afeed52d85..2a7fb98375 100644
--- a/utils/hp2ps/Reorder.c
+++ b/utils/hp2ps/Reorder.c
@@ -20,9 +20,7 @@ static int ordermapindex = 0;
void
-OrderFor(ident, order)
- char* ident;
- int order;
+OrderFor(char *ident, int order)
{
if (! ordermap) {
ordermapmax = (nidents > TWENTY ? nidents : TWENTY) * 2;
@@ -46,8 +44,7 @@ OrderFor(ident, order)
*/
int
-OrderOf(ident)
- char* ident;
+OrderOf(char *ident)
{
int i;
@@ -65,7 +62,7 @@ OrderOf(ident)
*/
void
-Reorder()
+Reorder(void)
{
intish i;
intish j;
diff --git a/utils/hp2ps/Scale.c b/utils/hp2ps/Scale.c
index 32120407b3..a471bde47e 100644
--- a/utils/hp2ps/Scale.c
+++ b/utils/hp2ps/Scale.c
@@ -18,7 +18,7 @@
*/
floatish
-MaxCombinedHeight()
+MaxCombinedHeight(void)
{
intish i;
intish j;
@@ -64,7 +64,7 @@ extern floatish xrange;
extern floatish yrange;
void
-Scale()
+Scale(void)
{
intish i;
intish j;
diff --git a/utils/hp2ps/Shade.c b/utils/hp2ps/Shade.c
index 9e3274bf69..d67faee92f 100644
--- a/utils/hp2ps/Shade.c
+++ b/utils/hp2ps/Shade.c
@@ -22,9 +22,7 @@ static int shademapindex = 0;
*/
void
-ShadeFor(ident, shade)
- char* ident;
- floatish shade;
+ShadeFor(char *ident, floatish shade)
{
if (! shademap) {
shademapmax = (nidents > TWENTY ? nidents : TWENTY) * 2;
@@ -51,8 +49,7 @@ ShadeFor(ident, shade)
static floatish ThinkOfAShade PROTO((void)); /* forward */
floatish
-ShadeOf(ident)
- char* ident;
+ShadeOf(char *ident)
{
int i;
floatish shade;
@@ -93,7 +90,7 @@ static floatish c_shades[ N_COLOUR_SHADES ] = {
};
static floatish
-ThinkOfAShade()
+ThinkOfAShade(void)
{
static int thisshade = -1;
@@ -104,9 +101,7 @@ ThinkOfAShade()
}
static floatish
-extract_colour(shade,factor)
- floatish shade;
- intish factor;
+extract_colour(floatish shade, intish factor)
{
intish i,j;
@@ -116,8 +111,7 @@ extract_colour(shade,factor)
}
void
-SetPSColour(shade)
- floatish shade;
+SetPSColour(floatish shade)
{
if (cflag) {
fprintf(psfp, "%f %f %f setrgbcolor\n",
diff --git a/utils/hp2ps/TopTwenty.c b/utils/hp2ps/TopTwenty.c
index bbb6be4390..b47d55a9cb 100644
--- a/utils/hp2ps/TopTwenty.c
+++ b/utils/hp2ps/TopTwenty.c
@@ -19,7 +19,7 @@
*/
void
-TopTwenty()
+TopTwenty(void)
{
intish i;
intish j;
diff --git a/utils/hp2ps/TraceElement.c b/utils/hp2ps/TraceElement.c
index c14062dced..eec17e839d 100644
--- a/utils/hp2ps/TraceElement.c
+++ b/utils/hp2ps/TraceElement.c
@@ -19,7 +19,7 @@
extern floatish thresholdpercent;
-void TraceElement()
+void TraceElement(void)
{
intish i;
intish j;
diff --git a/utils/hp2ps/Utilities.c b/utils/hp2ps/Utilities.c
index c9fb612f0e..5139144d53 100644
--- a/utils/hp2ps/Utilities.c
+++ b/utils/hp2ps/Utilities.c
@@ -6,8 +6,7 @@
extern void* malloc();
char*
-Basename(name)
- char* name;
+Basename(char *name)
{
char* t;
@@ -24,8 +23,7 @@ Basename(name)
}
void
-DropSuffix(name, suffix)
- char* name; char* suffix;
+DropSuffix(char *name, char *suffix)
{
char* t;
@@ -44,8 +42,7 @@ DropSuffix(name, suffix)
}
FILE*
-OpenFile(s, mode)
- char* s; char* mode;
+OpenFile(char *s, char *mode)
{
FILE* r;
@@ -65,9 +62,7 @@ OpenFile(s, mode)
*/
void
-CommaPrint(fp,n)
- FILE* fp;
- intish n;
+CommaPrint(FILE *fp, intish n)
{
if (n < ONETHOUSAND) {
fprintf(fp, "%d", (int)n);
@@ -78,8 +73,7 @@ CommaPrint(fp,n)
}
void *
-xmalloc(n)
- size_t n;
+xmalloc(size_t n)
{
void *r;
@@ -92,9 +86,7 @@ xmalloc(n)
}
void *
-xrealloc(p, n)
- void *p;
- size_t n;
+xrealloc(void *p, size_t n)
{
void *r;
extern void *realloc();
@@ -108,8 +100,7 @@ xrealloc(p, n)
}
char *
-copystring(s)
- char *s;
+copystring(char *s)
{
char *r;
@@ -119,8 +110,7 @@ copystring(s)
}
char *
-copystring2(s, t)
- char *s, *t;
+copystring2(char *s, char *t)
{
char *r;
diff --git a/utils/unlit/unlit.c b/utils/unlit/unlit.c
index 1269b81463..76877bec15 100644
--- a/utils/unlit/unlit.c
+++ b/utils/unlit/unlit.c
@@ -121,8 +121,7 @@ void myputc(char c, FILE *ostream)
/* As getc, but does TAB expansion */
int
-egetc(istream)
-FILE *istream;
+egetc(FILE *istream)
{
static int spleft = 0;
static int linepos = 0;
@@ -170,8 +169,7 @@ FILE *istream;
* stream.
*/
-line readline(istream,ostream)
-FILE *istream, *ostream; {
+line readline(FILE *istream, FILE *ostream) {
int c, c1;
char buf[100];
int i;