[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#22897: dvi2tty can not show japanese characters



Package: dvi2tty
Version: 5.1-9

My Debian system is Debian-2.0(hamm) and kernel-2.0.33.
I am a japanese and a Debian user. I found the following:

In dvi2tty.c, it is written like
 *               Included patch form Hideki ISOZAKI (isozaki@ntt-20.ntt.jp)
 *               to allow japanese fonts generated by NTT JTeX (March 1992).
and dvi2tty prints Usage
 -J       Allow processing of japanese fonts

But when I test "dvi2tty -J" with a dvi file generated by NTT JTeX
containing japanese characters, it lacks japanese characters.
So I worked a little and found that in some places, it needs to change
from "char" to "int" to handle japanese correctly.
I am not a programmer so it is not sure but it works well with my test.

I put the patch in this mail, so I wish you apply it.
Thanks in advance.

 **************************
 Atsuhito Kohda
 Dep. Math., Tokushima Univ.
 kohda@pm.tokushima-u.ac.jp

-----------------------------------------------------
diff -u dvistuff.c.orig dvistuff.c
--- dvistuff.c.orig	Wed May 27 12:25:49 1998
+++ dvistuff.c	Wed May 27 12:24:59 1998
@@ -84,7 +84,7 @@
     int             charactercount;     /* pos of last char on line          */
     struct lineptr *prev;               /* preceding line                    */
     struct lineptr *next;               /* succeeding line                   */
-    char            text[LINELEN+1];    /* leftmargin...rightmargin          */
+    int             text[LINELEN+1];    /* leftmargin...rightmargin          */
 } linetype;
 
 typedef struct _font {
@@ -186,7 +186,7 @@
 void            dochar          (char ch);
 void            symchar         (char ch);
 void            normchar        (char ch);
-void            outchar         (char ch);
+void            outchar         (int ch);
 void            putcharacter    (long charnr);
 void            setchar         (long charnr);
 void            fontdef         (int x);
@@ -552,7 +552,7 @@
 void printpage(void)
 {
     register int  i, j;
-    register char ch;
+    register int  ch;
 
     if (sptr != 0)
         fprintf(stderr, "dvi2tty: warning - stack not empty at eop.\n");
@@ -1008,7 +1008,7 @@
  *            SHOULD BE MOVED OUT.
  */
 
-void outchar(char ch)
+void outchar(int ch)
 {
     register int i, j;
 


--
To UNSUBSCRIBE, email to debian-qa-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: