[eblook/f13/master] Update to 1.6.1-9.
Daiki Ueno
ueno at fedoraproject.org
Tue Aug 17 08:25:34 UTC 2010
commit bd7f99939078fe63b1055c3ddb8988833ef0f3b0
Author: Daiki Ueno <ueno at unixuser.org>
Date: Tue Aug 17 17:26:31 2010 +0900
Update to 1.6.1-9.
eblook-size_t.patch | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++
eblook.spec | 7 ++-
2 files changed, 152 insertions(+), 1 deletions(-)
---
diff --git a/eblook-size_t.patch b/eblook-size_t.patch
new file mode 100644
index 0000000..6081e39
--- /dev/null
+++ b/eblook-size_t.patch
@@ -0,0 +1,146 @@
+diff -u ../eblook-1.6.1.orig/codeconv.c ../eblook-1.6.1/codeconv.c
+--- ../eblook-1.6.1.orig/codeconv.c 2003-03-08 23:29:47.000000000 +0900
++++ ../eblook-1.6.1/codeconv.c 2010-08-15 08:33:21.218750000 +0900
+@@ -564,7 +564,7 @@
+ char *
+ xfgets(str, size, fp)
+ char *str;
+- int size;
++ size_t size;
+ FILE *fp;
+ {
+ char *ibuf, *ibuf0;
+@@ -595,7 +595,7 @@
+ ibuf[ilen]=0;
+ ilen=strlen(ibuf);
+
+- status = current_to_euc(&ibuf,&ilen,&str,(size_t *)&size);
++ status = current_to_euc(&ibuf,&ilen,&str,&size);
+ str0[size0-size]=0;
+ #ifndef HAVE_ALLOCA
+ free(ibuf0);
+@@ -652,7 +652,6 @@
+ char **in_buf, **out_buf;
+ size_t *in_len,*out_len;
+ {
+- static int output_left = -1;
+ int c1, c2;
+ size_t count = 0;
+
+@@ -661,6 +660,7 @@
+ size_t ret;
+ if (cur_to_euc == (iconv_t) -1)
+ return CODECONV_ERROR;
++ iconv(cur_to_euc,NULL,NULL,NULL,NULL);
+ ret = iconv(cur_to_euc,in_buf,in_len,out_buf,out_len);
+ if (ret != ((size_t)-1))
+ ret = iconv(cur_to_euc, NULL, in_len, out_buf, out_len);
+@@ -675,17 +675,6 @@
+ }
+ #endif /* HAVE_ICONV */
+
+- if (output_left >= 0) {
+- if (*out_len > 0) {
+- *((*in_buf)++) = output_left;
+- (*out_len)--;
+- count++;
+- output_left = -1;
+- } else {
+- /* Output Buffer Overflow */
+- return CODECONV_BUFFER_OVERFLOW;
+- }
+- }
+ if (conv_mode == IO_SJIS) {
+ while(*in_len>0) {
+ if (*out_len<=0) break;
+@@ -724,10 +713,8 @@
+ *((*out_buf)++) = c1 | 0x80;
+ (*out_len)--;
+ count++;
+- if (*out_len <= 0) {
+- output_left = c2;
++ if (*out_len <= 0)
+ return CODECONV_BUFFER_OVERFLOW;
+- }
+ *((*out_buf)++) = c2;
+ (*out_len)--;
+ count++;
+@@ -761,7 +748,6 @@
+ char **in_buf, **out_buf;
+ size_t *in_len,*out_len;
+ {
+- static int output_left = -1;
+ int c1, c2;
+ size_t count = 0;
+
+@@ -770,6 +756,7 @@
+ size_t ret;
+ if (euc_to_cur == (iconv_t) -1)
+ return CODECONV_ERROR;
++ iconv(euc_to_cur,NULL,NULL,NULL,NULL);
+ ret = iconv(euc_to_cur,in_buf,in_len,out_buf,out_len);
+ if (ret != ((size_t)-1))
+ ret = iconv(euc_to_cur,NULL,in_len,out_buf,out_len);
+@@ -784,17 +771,6 @@
+ }
+ #endif /* HAVE_ICONV */
+
+- if (output_left >= 0) {
+- if (*out_len > 0) {
+- *((*in_buf)++) = output_left;
+- (*out_len)--;
+- count++;
+- output_left = -1;
+- } else {
+- /* Output Buffer Overflow */
+- return CODECONV_BUFFER_OVERFLOW;
+- }
+- }
+ if (conv_mode == IO_SJIS) {
+ while(*in_len>0) {
+ if (*out_len<=0) break;
+@@ -829,10 +805,8 @@
+ *((*out_buf)++) = c1;
+ (*out_len)--;
+ count++;
+- if (*out_len <= 0) {
+- output_left = c2;
++ if (*out_len <= 0)
+ return CODECONV_BUFFER_OVERFLOW;
+- }
+ *((*out_buf)++) = c2;
+ (*out_len)--;
+ count++;
+diff -u ../eblook-1.6.1.orig/codeconv.h ../eblook-1.6.1/codeconv.h
+--- ../eblook-1.6.1.orig/codeconv.h 2003-03-08 23:29:47.000000000 +0900
++++ ../eblook-1.6.1/codeconv.h 2010-08-14 18:44:09.390625000 +0900
+@@ -50,7 +50,7 @@
+ extern int xprintf PROTO((const char *fmt, ...));
+ extern int xfputs PROTO((const char *str, FILE *fp));
+ extern int xputs PROTO((const char *str));
+-extern char *xfgets PROTO((char *str, int size, FILE *fp));
++extern char *xfgets PROTO((char *str, size_t size, FILE *fp));
+
+ extern char *euc_to_jis PROTO((char *jis, const char *euc, int len));
+ extern char *jis_to_euc PROTO((char *euc, const char *jis, int len));
+diff -u ../eblook-1.6.1.orig/eblook.c ../eblook-1.6.1/eblook.c
+--- ../eblook-1.6.1.orig/eblook.c 2004-06-18 01:09:01.000000000 +0900
++++ ../eblook-1.6.1/eblook.c 2010-08-14 18:50:40.406250000 +0900
+@@ -133,7 +133,7 @@
+ int pclose_pager (FILE *);
+ #endif
+
+-char *read_command (char *, int, FILE *);
++char *read_command (char *, size_t, FILE *);
+ int excute_command (char *);
+ int parse_command_line (char *, char *[]);
+ #ifdef USE_READLINE
+@@ -650,7 +650,7 @@
+ char *
+ read_command (command_line, size, stream)
+ char *command_line;
+- int size;
++ size_t size;
+ FILE *stream;
+ {
+ char *p;
diff --git a/eblook.spec b/eblook.spec
index 6d0d0f4..3b986d8 100644
--- a/eblook.spec
+++ b/eblook.spec
@@ -1,6 +1,6 @@
Name: eblook
Version: 1.6.1
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: Command-line EB and EPWING dictionary search program
Group: Applications/Text
@@ -8,6 +8,7 @@ License: GPLv2+
URL: http://openlab.ring.gr.jp/edict/eblook/
Source0: http://openlab.ring.gr.jp/edict/eblook/dist/%{name}-%{version}.tar.gz
Patch0: eblook-strcpy.patch
+Patch1: eblook-size_t.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: eb-devel
@@ -19,6 +20,7 @@ Command-line EB and EPWING dictionary search program.
%prep
%setup -q
%patch0 -p1
+%patch1 -p2
for i in NEWS README; do
iconv -f ISO-2022-JP -t UTF-8 $i > ${i}.UTF-8
mv ${i}.UTF-8 $i
@@ -66,6 +68,9 @@ fi
%changelog
+* Tue Aug 17 2010 Daiki Ueno <dueno at redhat.com> - 1.6.1-9
+- apply a patch for size_t and int confusion, provided by Kazuhiro Ito.
+
* Fri Apr 16 2010 Daiki Ueno <dueno at redhat.com> - 1.6.1-8
- don't use tabs in this spec.
- change the encoding of Japanese docs to UTF-8.
More information about the scm-commits
mailing list