summaryrefslogtreecommitdiff
path: root/sysutils/sformat/patches/patch-sformat_io_c
blob: 1b3801df4917e8f1e35e97c064e77dcfe4e2dd2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$NetBSD: patch-sformat_io_c,v 1.1 2012/06/16 08:55:55 dholland Exp $

Fix symbol name conflict with POSIX getline().

--- sformat/io.c	Sat Jun 16 04:48:53 2012 -0400
+++ sformat/io.c	Sat Jun 16 04:50:37 2012 -0400
@@ -245,7 +245,7 @@
 		(*prt)(s, *lp, mini, maxi, dp);
 		flush();
 		line[0] = '\0';
-		if (getline(line, 80) == EOF)
+		if (get_line(line, 80) == EOF)
 			exit(EX_BAD);
 
 		linep = skipwhite(line);
@@ -332,7 +332,7 @@
 	printf("%r", form, args);
 	va_end(args);
 	flush();
-	if (getline(okbuf, sizeof(okbuf)) == EOF)
+	if (get_line(okbuf, sizeof(okbuf)) == EOF)
 		exit(EX_BAD);
 	if (okbuf[0] == '?') {
 		printf("Enter 'y', 'Y', 'yes' or 'YES' if you agree with the previous asked question.\n");
@@ -412,7 +412,7 @@
 		printf("%s [%s]:", s, csp->s_name);
 		flush();
 		line[0] = '\0';
-		if (getline(line, 80) == EOF)
+		if (get_line(line, 80) == EOF)
 			exit(EX_BAD);
 
 		linep = skipwhite(line);