File: fribidi_019

package info (click to toggle)
bidiv 1.5-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 220 kB
  • sloc: ansic: 1,205; makefile: 113
file content (59 lines) | stat: -rw-r--r-- 1,760 bytes parent folder | download | duplicates (3)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Description: Fix building with fribidi 1.9
Author: أحمد المحمودي <aelmahmoudy@users.sourceforge.net>
Bug-Debian: http://bugs.debian.org/568130

--- a/Makefile
+++ b/Makefile
@@ -4,8 +4,8 @@ MAN_PATH=$(PREFIX)/share/man
 CC_OPT_FLAGS=-O2 -Wall
 
 
-PKG_CFLAGS= $(CC_OPT_FLAGS) $(DEFS) `fribidi-config --cflags`
-PKG_LDFLAGS=`fribidi-config --libs`
+PKG_CFLAGS= $(CC_OPT_FLAGS) $(DEFS) `pkg-config --cflags fribidi`
+PKG_LDFLAGS=`pkg-config --libs fribidi`
 
 all: bidiv
 
--- a/bidiv.c
+++ b/bidiv.c
@@ -141,8 +141,9 @@ bidiv(FILE *fp)
 				*/
 				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;
@@ -153,8 +154,9 @@ bidiv(FILE *fp)
 				   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
@@ -206,11 +208,11 @@ bidiv(FILE *fp)
 			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.