Commit f492e365 authored by panne's avatar panne
Browse files

[project @ 2004-06-04 06:51:01 by panne]

ANSIfication (from Ralf Wildenhues)
parent 73f90fb0
#include <stdio.h>
#include <stdlib.h>
#include "Main.h"
#include "Defines.h"
#include "Error.h"
......@@ -8,8 +9,6 @@
/* own stuff */
#include "AreaBelow.h"
extern void free();
/*
* Return the area enclosed by all of the curves. The algorithm
* used is the same as the trapizoidal rule for integration.
......
......@@ -16,7 +16,8 @@ static floatish *y;
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));
void
Curves()
......
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "Main.h"
......@@ -7,8 +8,6 @@
#include "HpFile.h"
#include "Utilities.h"
extern void free();
/* own stuff */
#include "Deviation.h"
......
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include "Main.h"
#include "Defines.h"
/* own stuff */
#include "Error.h"
void exit PROTO((int));
/*VARARGS0*/
void
Error(a1,a2,a3,a4)
char* a1; char* a2; char* a3; char* a4;
Error(const char *fmt, ...)
{
va_list ap;
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
Disaster(a1,a2,a3,a4)
char* a1; char* a2; char* a3; char* a4;
Disaster(const char *fmt, ...)
{
va_list ap;
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)
char *str;
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);
......
#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 *));
#endif /* ERROR_H */
#include <stdio.h>
#include <stdlib.h>
#include "Main.h"
#include "Defines.h"
#include "Dimensions.h"
......@@ -16,8 +17,6 @@
* fit on the page.
*/
extern void free();
floatish
MaxCombinedHeight()
{
......
#include <stdio.h>
#include <stdlib.h>
#include "Main.h"
#include "Defines.h"
#include "Error.h"
......@@ -17,8 +18,6 @@
* band which appears as band 20.
*/
extern void free();
void
TopTwenty()
{
......
#include <stdio.h>
#include <stdlib.h>
#include "Main.h"
#include "Defines.h"
#include "HpFile.h"
......@@ -16,8 +17,6 @@
* elements'' and they are thrown away.
*/
extern void free();
extern floatish thresholdpercent;
void TraceElement()
......
......@@ -79,7 +79,7 @@ CommaPrint(fp,n)
void *
xmalloc(n)
int n;
size_t n;
{
void *r;
......@@ -94,7 +94,7 @@ xmalloc(n)
void *
xrealloc(p, n)
void *p;
int n;
size_t n;
{
void *r;
extern void *realloc();
......
......@@ -7,7 +7,7 @@ FILE* OpenFile 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));
#endif /* UTILITIES_H */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment