88be950540
- Modernize the port and make Clang happy.
38 lines
816 B
C
38 lines
816 B
C
--- hpscat.c.orig 1995-11-23 07:46:12.000000000 -0500
|
|
+++ hpscat.c 2013-06-12 17:10:59.000000000 -0400
|
|
@@ -12,13 +12,14 @@
|
|
bool cheat;
|
|
FILE *fp, *ofp;
|
|
|
|
+static int open_outfile(char *);
|
|
+
|
|
/****************
|
|
main routine
|
|
****************/
|
|
|
|
-main(ac,av)
|
|
- int ac;
|
|
- char *av[];
|
|
+int
|
|
+main(int ac, char *av[])
|
|
{
|
|
int i;
|
|
extern void showfile PROT((char *));
|
|
@@ -53,13 +54,13 @@
|
|
exit(0);
|
|
}
|
|
|
|
-int
|
|
-open_outfile(s) /* returns -1 if can't write */
|
|
- char *s;
|
|
+static int
|
|
+open_outfile(char *s) /* returns -1 if can't write */
|
|
{
|
|
char ans[80], buf[256];
|
|
sprintf(buf,"%s.ps", s);
|
|
- if(ofp=fopen(buf,"r")) { /* file exists */
|
|
+ ofp=fopen(buf,"r");
|
|
+ if(ofp) { /* file exists */
|
|
fclose(ofp);
|
|
fprintf(stderr,"output file %s exists...overwrite? ", buf);
|
|
gets(ans);
|