View | Details | Raw Unified | Return to bug 238690
Collapse All | Expand All

(-)Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	hpscat
4
PORTNAME=	hpscat
5
PORTVERSION=	1.3.1
5
PORTVERSION=	1.3.1
6
PORTEPOCH=	1
6
PORTEPOCH=	2
7
CATEGORIES=	korean print
7
CATEGORIES=	korean print
8
MASTER_SITES=	http://ftp.kaist.ac.kr/hangul/print/hpscat/ \
8
MASTER_SITES=	http://ftp.kaist.ac.kr/hangul/print/hpscat/ \
9
		ftp://ftp.kaist.ac.kr/hangul/print/hpscat/ \
9
		ftp://ftp.kaist.ac.kr/hangul/print/hpscat/ \
(-)files/patch-hpscat.c (-36 / +9 lines)
Lines 1-38 Link Here
1
--- hpscat.c.orig	1995-11-23 07:46:12.000000000 -0500
1
--- hpscat.c.orig	2019-08-03 11:25:44 UTC
2
+++ hpscat.c	2013-06-12 17:10:59.000000000 -0400
2
+++ hpscat.c
3
@@ -12,13 +12,14 @@
3
@@ -62,7 +62,7 @@ open_outfile(s)    /*  returns -1 if can
4
 bool cheat;
4
     if(ofp=fopen(buf,"r")) { /* file exists */
5
 FILE *fp, *ofp;
6
 
7
+static int open_outfile(char *);
8
+
9
 /****************
10
    main routine
11
  ****************/
12
 
13
-main(ac,av)
14
-  int  ac;
15
-  char *av[];
16
+int
17
+main(int ac, char *av[])
18
 {
19
     int  i;
20
     extern void showfile PROT((char *));
21
@@ -53,13 +54,13 @@
22
     exit(0);
23
 }
24
 
25
-int
26
-open_outfile(s)    /*  returns -1 if can't write */
27
-  char *s;
28
+static int
29
+open_outfile(char *s)    /*  returns -1 if can't write */
30
 {
31
     char ans[80], buf[256];
32
     sprintf(buf,"%s.ps", s);
33
-    if(ofp=fopen(buf,"r")) { /* file exists */
34
+    ofp=fopen(buf,"r");
35
+    if(ofp) { /* file exists */
36
 	fclose(ofp);
5
 	fclose(ofp);
37
 	fprintf(stderr,"output file %s exists...overwrite? ", buf);
6
 	fprintf(stderr,"output file %s exists...overwrite? ", buf);
38
 	gets(ans);
7
-	gets(ans);
8
+	fgets(buf,256,ans);
9
 	if(ans[0]=='y')
10
 	    unlink(buf);
11
 	else 

Return to bug 238690