From a2f2e0e31607020e6df439a7873d41d6533a94d3 Mon Sep 17 00:00:00 2001 From: naddy Date: Sat, 17 Mar 2012 23:01:09 +0000 Subject: [PATCH] getline -> get_line --- japanese/kinput2/Makefile | 4 +-- japanese/kinput2/patches/patch-lib_cconv_c | 41 ++++++++++++++++++---- 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/japanese/kinput2/Makefile b/japanese/kinput2/Makefile index 00868d4e526..380b5dcfb15 100644 --- a/japanese/kinput2/Makefile +++ b/japanese/kinput2/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.27 2011/12/02 14:36:14 espie Exp $ +# $OpenBSD: Makefile,v 1.28 2012/03/17 23:01:09 naddy Exp $ COMMENT-canna= X input method for Japanese, canna support COMMENT-canna-wnn= X input method for Japanese, canna and wnn support @@ -6,7 +6,7 @@ COMMENT-wnn= X input method for Japanese, wnn support DISTNAME= kinput2-v3 PKGNAME= ja-kinput2-3.0 -REVISION= 5 +REVISION= 6 MASTER_SITES= ftp://ftp.sra.co.jp/pub/x11/kinput2/ CATEGORIES= japanese x11 diff --git a/japanese/kinput2/patches/patch-lib_cconv_c b/japanese/kinput2/patches/patch-lib_cconv_c index 932b89fe3dc..8134f2e1a42 100644 --- a/japanese/kinput2/patches/patch-lib_cconv_c +++ b/japanese/kinput2/patches/patch-lib_cconv_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-lib_cconv_c,v 1.1.1.1 2000/04/26 00:43:13 espie Exp $ ---- lib/cconv.c.orig Thu May 27 01:55:25 1999 -+++ lib/cconv.c Wed Apr 26 02:18:48 2000 -@@ -611,7 +611,7 @@ static char *rcsid = "$Id: cconv.c,v 10. +$OpenBSD: patch-lib_cconv_c,v 1.2 2012/03/17 23:01:09 naddy Exp $ +--- lib/cconv.c.orig Wed May 26 17:55:25 1999 ++++ lib/cconv.c Sat Mar 17 16:58:01 2012 +@@ -611,7 +611,7 @@ static char *rcsid = "$Id: cconv.c,v 10.8 1999/05/07 0 #define EPROC2(efunc, format, a) { \ char tmp[1024]; \ @@ -10,6 +10,15 @@ $OpenBSD: patch-lib_cconv_c,v 1.1.1.1 2000/04/26 00:43:13 espie Exp $ eproc(efunc, tmp); } /* キーコードのエンコード方法 */ +@@ -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 *, @@ -965,7 +965,7 @@ char *file; if (q == filename) continue; *q++ = '/'; @@ -30,15 +39,35 @@ $OpenBSD: patch-lib_cconv_c,v 1.1.1.1 2000/04/26 00:43:13 espie Exp $ fp = fopen(filename, "r"); } return fp; -@@ -1078,7 +1078,7 @@ char *file; +@@ -1013,7 +1013,7 @@ void (*efunc)(); + } + + /* getline -- 1行読み込む (その際 include の処理を行なう) */ +-static uchar *getline(line, linesize, files, efunc) ++static uchar *get_line(line, linesize, files, efunc) + uchar *line; + int linesize; + Files *files; +@@ -1077,8 +1077,8 @@ char *file; + rule->nmode = 0; rule->initialmode = -1; - while (getline(line, sizeof(line), &files, efunc)) { +- while (getline(line, sizeof(line), &files, efunc)) { - (void)Strcpy(tmp, line); ++ while (get_line(line, sizeof(line), &files, efunc)) { + (void)strlcpy(tmp, line, sizeof(tmp)); if ((argc = parseLine(tmp, argv, 20)) == 0) continue; +@@ -1246,7 +1246,7 @@ uchar **av; + cdbuf.cdbuf = NULL; + + /* ルールを読んでストアする */ +- while (getline(line, sizeof(line), files, efunc)) { ++ while (get_line(line, sizeof(line), files, efunc)) { + /* '#' で始まる行はコメント */ + if (*line == '\0' || *line == '\n' || *line == '#') + continue; @@ -1302,7 +1302,7 @@ int *funcp; "context" key "result" [function...] */