[Mplayer-cvslog] CVS: main cfg-common.h, 1.136, 1.137 subreader.c, 1.138, 1.139 subreader.h, 1.36, 1.37

Sascha Sommer CVS syncmail at mplayerhq.hu
Mon Oct 18 22:41:08 CEST 2004


CVS change done by Sascha Sommer CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv32025

Modified Files:
	cfg-common.h subreader.c subreader.h 
Log Message:
correctly display the commas of most hebrew subtitles on the left side 
of the sentence with fribidi, make the old behaviour optional
patch by Shachar Raindel <shacharr <at> gmail.com>


Index: cfg-common.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-common.h,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -r1.136 -r1.137
--- cfg-common.h	4 Oct 2004 18:34:39 -0000	1.136
+++ cfg-common.h	18 Oct 2004 20:41:05 -0000	1.137
@@ -219,10 +219,14 @@
 	{"fribidi-charset", &fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL},
 	{"flip-hebrew", &flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 	{"noflip-hebrew", &flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+	{"flip-hebrew-commas", &fribidi_flip_commas, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+	{"noflip-hebrew-commas", &fribidi_flip_commas, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 #else 
 	{"fribidi-charset", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 	{"flip-hebrew", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 	{"noflip-hebrew", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+	{"flip-hebrew-commas", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+	{"noflip-hebrew-commas", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif
 #ifdef USE_ICONV
 	{"subcp", &sub_cp, CONF_TYPE_STRING, 0, 0, 0, NULL},

Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -r1.138 -r1.139
--- subreader.c	15 Sep 2004 13:16:52 -0000	1.138
+++ subreader.c	18 Oct 2004 20:41:05 -0000	1.139
@@ -33,6 +33,7 @@
 #include <fribidi/fribidi.h>
 char *fribidi_charset = NULL;
 int flip_hebrew = 1;
+int fribidi_flip_commas = 0;
 #endif
 
 extern char* dvdsub_lang;
@@ -1208,7 +1209,7 @@
       break;
     }
     len = fribidi_charset_to_unicode (char_set_num, ip, len, logical);
-    base = FRIBIDI_TYPE_ON;
+    base = fribidi_flip_commas?FRIBIDI_TYPE_ON:FRIBIDI_TYPE_L;
     log2vis = fribidi_log2vis (logical, len, &base,
 			       /* output */
 			       visual, NULL, NULL, NULL);

Index: subreader.h
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- subreader.h	15 Sep 2004 13:16:52 -0000	1.36
+++ subreader.h	18 Oct 2004 20:41:05 -0000	1.37
@@ -59,6 +59,12 @@
     int sub_errs;
 } sub_data;
 
+#ifdef  USE_FRIBIDI
+extern char *fribidi_charset;
+extern int flip_hebrew;
+extern int fribidi_flip_commas;
+#endif
+
 sub_data* sub_read_file (char *filename, float pts);
 subtitle* subcp_recode1 (subtitle *sub);
 // enca_fd is the file enca uses to determine the codepage.




More information about the MPlayer-cvslog mailing list