Package: bidiv
Version: 1.5-3
Severity: normal
Tags: patch

Hello,

  bidiv uses fribidi_iso8859_8_to_unicode_c,
  fribidi_unicode_to_iso8859_8 functions which are obsoleted by the new
  functions: fribidi_charset_to_unicode & fribidi_unicode_to_charset.

  The attached patch (originally from Fedora) uses the new functions
  instead, also it patches the Makefile to use pkg-config instead of
  fribidi-config, since new upstream release of fribidi only uses
  pkg-config.

-- System Information:
Debian Release: squeeze/sid
  APT prefers karmic-updates
  APT policy: (500, 'karmic-updates'), (500, 'karmic-security'), (500, 
'karmic-proposed'), (500, 'karmic-backports'), (500, 'karmic')
Architecture: i386 (i686)

Kernel: Linux 2.6.31-18-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- Makefile.orig	2008-02-19 15:21:53.000000000 +0200
+++ Makefile	2008-02-19 15:22:05.000000000 +0200
@@ -4,8 +4,8 @@
 CC_OPT_FLAGS=-O2 -Wall
 
 
-CFLAGS= $(CC_OPT_FLAGS) $(DEFS) `fribidi-config --cflags`
-LDFLAGS=`fribidi-config --libs`
+CFLAGS= $(CC_OPT_FLAGS) $(DEFS) `pkg-config --cflags fribidi`
+LDFLAGS=`pkg-config --libs fribidi`
 
 all: bidiv
 
--- bidiv.c.orig	2008-02-19 15:26:53.000000000 +0200
+++ bidiv.c	2008-02-19 19:17:23.000000000 +0200
@@ -136,8 +136,9 @@
 				*/
 				if(c1<0x80||c1>0xbf){
 					ungetc(c1, fp);
-					unicode_in[len]=
-						fribidi_iso8859_8_to_unicode_c(c);
+					fribidi_charset_to_unicode(
+						FRIBIDI_CHAR_SET_ISO8859_8,
+						&c, 1, &unicode_in[len]);
 				} else
 				unicode_in[len]=((c & 037) << 6) + (c1 & 077);
 				newline=0;
@@ -148,8 +149,9 @@
 				   In the future we will have a language
 				   option, which will control this (as well
 				   as the output encoding). */
-				unicode_in[len]=
-					fribidi_iso8859_8_to_unicode_c(c);
+				fribidi_charset_to_unicode(
+					FRIBIDI_CHAR_SET_ISO8859_8,
+					&c, 1, &unicode_in[len]);
 #else
 				in[len]=c;
 #endif
@@ -201,11 +203,11 @@
 			rtl_line=0;
 
 		if(out_utf8)
-			fribidi_unicode_to_utf8(unicode_out, len,
-					     out);
+			fribidi_unicode_to_charset(FRIBIDI_CHAR_SET_UTF8,
+					unicode_out, len, out);
 		else
-			fribidi_unicode_to_iso8859_8(unicode_out, len,
-						     out);
+			fribidi_unicode_to_charset(FRIBIDI_CHAR_SET_ISO8859_8,
+				unicode_out, len, out);
 		/* if rtl_line (i.e., base_dir is RL), and we didn't fill the
 		   entire width, we need to pad with spaces. Maybe in the
 		   future this should be an option.

Reply via email to