Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
f492e365
Commit
f492e365
authored
Jun 04, 2004
by
panne
Browse files
[project @ 2004-06-04 06:51:01 by panne]
ANSIfication (from Ralf Wildenhues)
parent
73f90fb0
Changes
10
Hide whitespace changes
Inline
Side-by-side
ghc/utils/hp2ps/AreaBelow.c
View file @
f492e365
#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.
...
...
ghc/utils/hp2ps/Curves.c
View file @
f492e365
...
...
@@ -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
()
...
...
ghc/utils/hp2ps/Deviation.c
View file @
f492e365
#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"
...
...
ghc/utils/hp2ps/Error.c
View file @
f492e365
#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
);
...
...
ghc/utils/hp2ps/Error.h
View file @
f492e365
#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 */
ghc/utils/hp2ps/Scale.c
View file @
f492e365
#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
()
{
...
...
ghc/utils/hp2ps/TopTwenty.c
View file @
f492e365
#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
()
{
...
...
ghc/utils/hp2ps/TraceElement.c
View file @
f492e365
#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
()
...
...
ghc/utils/hp2ps/Utilities.c
View file @
f492e365
...
...
@@ -79,7 +79,7 @@ CommaPrint(fp,n)
void
*
xmalloc
(
n
)
in
t
n
;
size_
t
n
;
{
void
*
r
;
...
...
@@ -94,7 +94,7 @@ xmalloc(n)
void
*
xrealloc
(
p
,
n
)
void
*
p
;
in
t
n
;
size_
t
n
;
{
void
*
r
;
extern
void
*
realloc
();
...
...
ghc/utils/hp2ps/Utilities.h
View file @
f492e365
...
...
@@ -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
((
in
t
));
void
*
xrealloc
PROTO
((
void
*
,
in
t
));
void
*
xmalloc
PROTO
((
size_
t
));
void
*
xrealloc
PROTO
((
void
*
,
size_
t
));
#endif
/* UTILITIES_H */
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment