summaryrefslogtreecommitdiff
path: root/inputmethod/kinput2/patches/patch-ac
blob: bc0e2bcf5a14d074e0ce2d8cb3283fc89cc5cc25 (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
34
35
36
37
38
39
40
41
42
43
44
$NetBSD: patch-ac,v 1.1 2010/01/09 11:50:36 obache Exp $

Avoid to conflict with getline(3) in IEEE Std 1003.1-2008.

--- lib/cconv.c.orig	1999-05-26 23:55:25.000000000 +0000
+++ lib/cconv.c
@@ -767,7 +767,7 @@ static wchar *promptsave(wchar *);
 static int parseLine(uchar *, uchar **, int);
 static FILE *openfile(char *);
 static int doinclude(uchar *, Files *, void (*)());
-static uchar *getline(uchar *, int, Files *, void (*)());
+static uchar *get_line(uchar *, int, Files *, void (*)());
 static int readRuleFile(ccRule, char *);
 static int registMode(ccRule, int, uchar **);
 static int newMode(ccRule, Files *, _strbufRec *, _funcbufRec *,
@@ -1012,8 +1012,8 @@ void (*efunc)();
 	return 0;
 }
 
-/* getline -- 1$B9TFI$_9~$`(B ($B$=$N:](B include $B$N=hM}$r9T$J$&(B) */
-static uchar *getline(line, linesize, files, efunc)
+/* get_line -- 1$B9TFI$_9~$`(B ($B$=$N:](B include $B$N=hM}$r9T$J$&(B) */
+static uchar *get_line(line, linesize, files, efunc)
 uchar *line;
 int linesize;
 Files *files;
@@ -1077,7 +1077,7 @@ char *file;
 	rule->nmode = 0;
 	rule->initialmode = -1;
 
-	while (getline(line, sizeof(line), &files, efunc)) {
+	while (get_line(line, sizeof(line), &files, efunc)) {
 		(void)Strcpy(tmp, line);
 		if ((argc = parseLine(tmp, argv, 20)) == 0)
 			continue;
@@ -1246,7 +1246,7 @@ uchar **av;
 	cdbuf.cdbuf = NULL;
 
 	/* $B%k!<%k$rFI$s$G%9%H%"$9$k(B */
-	while (getline(line, sizeof(line), files, efunc)) {
+	while (get_line(line, sizeof(line), files, efunc)) {
 		/* '#' $B$G;O$^$k9T$O%3%a%s%H(B */
 		if (*line == '\0' || *line == '\n' || *line == '#')
 			continue;