update Mon Feb 15 06:37:00 PST 2010
[pkgsrc.git] / inputmethod / kinput2 / patches / patch-ac
1 $NetBSD: patch-ac,v 1.2 2010/02/15 13:41:18 obache Exp $
2
3 Avoid to conflict with getline(3) in IEEE Std 1003.1-2008.
4
5 --- lib/cconv.c.orig    2002-10-03 09:35:28.000000000 +0000
6 +++ lib/cconv.c
7 @@ -790,7 +790,7 @@ static wchar *promptsave(wchar *);
8  static int parseLine(uchar *, uchar **, int);
9  static FILE *openfile(char *);
10  static int doinclude(uchar *, Files *, void (*)());
11 -static uchar *getline(uchar *, int, Files *, void (*)());
12 +static uchar *get_line(uchar *, int, Files *, void (*)());
13  static int readRuleFile(ccRule, char *);
14  static int registMode(ccRule, int, uchar **);
15  static int newMode(ccRule, Files *, _strbufRec *, _funcbufRec *,
16 @@ -1035,8 +1035,8 @@ void (*efunc)();
17         return 0;
18  }
19  
20 -/* getline -- 1\e$B9TFI$_9~$`\e(B (\e$B$=$N:]\e(B include \e$B$N=hM}$r9T$J$&\e(B) */
21 -static uchar *getline(line, linesize, files, efunc)
22 +/* get_line -- 1\e$B9TFI$_9~$`\e(B (\e$B$=$N:]\e(B include \e$B$N=hM}$r9T$J$&\e(B) */
23 +static uchar *get_line(line, linesize, files, efunc)
24  uchar *line;
25  int linesize;
26  Files *files;
27 @@ -1100,7 +1100,7 @@ char *file;
28         rule->nmode = 0;
29         rule->initialmode = -1;
30  
31 -       while (getline(line, sizeof(line), &files, efunc)) {
32 +       while (get_line(line, sizeof(line), &files, efunc)) {
33                 (void)Strcpy(tmp, line);
34                 if ((argc = parseLine(tmp, argv, 20)) == 0)
35                         continue;
36 @@ -1269,7 +1269,7 @@ uchar **av;
37         cdbuf.cdbuf = NULL;
38  
39         /* \e$B%k!<%k$rFI$s$G%9%H%"$9$k\e(B */
40 -       while (getline(line, sizeof(line), files, efunc)) {
41 +       while (get_line(line, sizeof(line), files, efunc)) {
42                 /* '#' \e$B$G;O$^$k9T$O%3%a%s%H\e(B */
43                 if (*line == '\0' || *line == '\n' || *line == '#')
44                         continue;