ANSIfication (from Ralf Wildenhues)
#include "Main.h"
#include "Defines.h"
#include "Error.h"
#include "Main.h"
#include "Defines.h"
#include "Error.h"
/* own stuff */
#include "AreaBelow.h"
/* own stuff */
#include "AreaBelow.h"
/*
* Return the area enclosed by all of the curves. The algorithm
* used is the same as the trapizoidal rule for integration.
/*
* Return the area enclosed by all of the curves. The algorithm
* used is the same as the trapizoidal rule for integration.
static floatish *py; /* previous y values */
static void Curve PROTO((struct entry *)); /* forward */
static floatish *py; /* previous y values */
static void Curve PROTO((struct entry *)); /* forward */
-static void ShadeCurve(); /* forward */
+static void ShadeCurve
+ PROTO((floatish *x, floatish *y, floatish *py, floatish shade));
#include <string.h>
#include <math.h>
#include "Main.h"
#include <string.h>
#include <math.h>
#include "Main.h"
#include "HpFile.h"
#include "Utilities.h"
#include "HpFile.h"
#include "Utilities.h"
/* own stuff */
#include "Deviation.h"
/* own stuff */
#include "Deviation.h"
#include "Main.h"
#include "Defines.h"
/* own stuff */
#include "Error.h"
#include "Main.h"
#include "Defines.h"
/* own stuff */
#include "Error.h"
-void exit PROTO((int));
-
-Error(a1,a2,a3,a4)
- char* a1; char* a2; char* a3; char* a4;
+Error(const char *fmt, ...)
fflush(stdout);
fprintf(stderr, "%s: ", programname);
fflush(stdout);
fprintf(stderr, "%s: ", programname);
- fprintf(stderr, a1, a2, a3, a4);
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
fprintf(stderr, "\n");
exit(1);
}
/*VARARGS0*/
void
fprintf(stderr, "\n");
exit(1);
}
/*VARARGS0*/
void
-Disaster(a1,a2,a3,a4)
- char* a1; char* a2; char* a3; char* a4;
+Disaster(const char *fmt, ...)
fflush(stdout);
fprintf(stderr, "%s: ", programname);
fflush(stdout);
fprintf(stderr, "%s: ", programname);
- fprintf(stderr, " Disaster! (");
- fprintf(stderr, a1, a2, a3, a4);
+ fprintf(stderr, " Disaster! (");
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
fprintf(stderr, ")\n");
exit(1);
}
void
Usage(str)
fprintf(stderr, ")\n");
exit(1);
}
void
Usage(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);
{
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);
#ifndef ERROR_H
#define ERROR_H
#ifndef ERROR_H
#define ERROR_H
-extern void Error (); /*PROTO((char *, ...)); */
-extern void Disaster (); /* PROTO((char *, ...)); */
-extern void Usage (); /* PROTO((char *)); */
+extern void Error PROTO((const char *, ...));
+extern void Disaster PROTO((const char *, ...));
+extern void Usage PROTO((const char *));
#include "Main.h"
#include "Defines.h"
#include "Dimensions.h"
#include "Main.h"
#include "Defines.h"
#include "Dimensions.h"
floatish
MaxCombinedHeight()
{
floatish
MaxCombinedHeight()
{
#include "Main.h"
#include "Defines.h"
#include "Error.h"
#include "Main.h"
#include "Defines.h"
#include "Error.h"
* band which appears as band 20.
*/
* band which appears as band 20.
*/
#include "Main.h"
#include "Defines.h"
#include "HpFile.h"
#include "Main.h"
#include "Defines.h"
#include "HpFile.h"
* elements'' and they are thrown away.
*/
* elements'' and they are thrown away.
*/
extern floatish thresholdpercent;
void TraceElement()
extern floatish thresholdpercent;
void TraceElement()
void *
xrealloc(p, n)
void *p;
void *
xrealloc(p, n)
void *p;
{
void *r;
extern void *realloc();
{
void *r;
extern void *realloc();
void CommaPrint PROTO((FILE *, intish));
char *copystring PROTO((char *));
char *copystring2 PROTO((char *, char *));
void CommaPrint PROTO((FILE *, intish));
char *copystring PROTO((char *));
char *copystring2 PROTO((char *, char *));
-void *xmalloc PROTO((int));
-void *xrealloc PROTO((void *, int));
+void *xmalloc PROTO((size_t));
+void *xrealloc PROTO((void *, size_t));