Mailing List Archive

Support open source code!


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

cWnn 4.2 little endian bug fixed! (fwd)



  Hi,

  Some of you who use Chinese as well as Japanese will be as 
delighted as I was that cWnn 4.2 is now fixed.

Dennis McMurchy, 
Tojinmachi, Fukuoka


---------- Forwarded message ----------
Date: 11 Oct 1996 19:50:19 -0400
From: David Fox <fox@example.com>
To: mule@example.com
Newgroups: mule
Subject: cWnn 4.2 little endian bug fixed!

After a hellish day I can finally report why cWnn was not working on
my Linux box (and presumably all other i386 and mips machines.)  It
turns out that there is still an endian related bug in the Chinese
server.  I'll spare you all the gory details of my awful experience,
(which included building debugging versions of both cserver and
mule-23-1933 and running them simultaneously from different emacs
processes) and just post the patch.  (I hope there isn't a more
suitable mailing list for this.  If there is, I hope it finds its way
there.)  I'm making an RPM of this for redhat systems and will upload
it to ftp.redhat.com.

diff -ru wnn-servers-4.2/cwnn-4.2/server/readfile.c~ wnn-servers-4.2/cwnn-4.2/server/readfile.c
--- wnn-servers-4.2/cwnn-4.2/server/readfile.c~	Fri Oct 13 11:59:05 1995
+++ wnn-servers-4.2/cwnn-4.2/server/readfile.c	Fri Oct 11 15:10:59 1996
@@ -124,9 +124,6 @@
     case  WNN_FT_DICT_FILE:
 	wf->area = (char *)readdict(fp);
 	if(wf->area == NULL) goto ERROR_RET;
-	if(little_endian()){
-	    revdic((struct JT *)wf->area, 0);
-	}
 	break;
     case WNN_FT_HINDO_FILE:
 	wf->area = (char *)readhindo(fp);
@@ -272,6 +269,11 @@
     }
     jt1->dirty = 0;
     jt1->hdirty = 0;
+
+    if(little_endian()){
+	revdic(jt1, 0);
+    }
+
 #ifdef	CONVERT_by_STROKE
     if (jt1->syurui == BWNN_REV_DICT)  
 	if ((jt1->max_bnode = create_b_index(jt1)) == -1){

The call to create_b_index was being made before the endian-ness was
repaired by revdic, so it saw crazy serial numbers.  Here's another
handy patch to Mark Leisher's wnn-server-4.2 package.  It builds a
libwnn.a to link mule with:

diff -ru wnn-servers-4.2/cwnn-4.2/programs/GNUmakefile~ wnn-servers-4.2/cwnn-4.2/programs/GNUmakefile
--- wnn-servers-4.2/cwnn-4.2/programs/GNUmakefile~	Sun Oct 22 17:10:00 1995
+++ wnn-servers-4.2/cwnn-4.2/programs/GNUmakefile	Fri Oct 11 13:12:34 1996
@@ -49,7 +49,13 @@
              msg.o pwd.o revdic.o server_env.o strings.o sstrings.o \
              yincoding.o py_table.o zy_table.o wnnerrmsg.o
 
-all: $(PROGRAMS)
+LIBWNN.a = hindo.o jl.o js.o msg.o py_table.o strings.o wnnerrmsg.o \
+	   yincoding.o zy_table.o
+
+all: $(PROGRAMS) libwnn.a
+
+libwnn.a: $(LIBWNN.a)
+	ar ruv $@ $(LIBWNN.a)
 
 catod: $(CATOD.o)
 	$(CC) $(CFLAGS) $(SDEFS) $(INCS) -o catod $(CATOD.o)

Now I just need to figure out how to set wnn-server-type to cserver
and not have it changed back to jserver by mule-init.el.
-- 
David Fox	   http://found.cs.nyu.edu/fox		xoF divaD
NYU Media Research Lab   fox@example.com    baL hcraeseR aideM UYN




-----------------------------------------------------------------
a word from the sponsor will appear below
-----------------------------------------------------------------
The TLUG mailing list is proudly sponsored by TWICS - Japan's First
Public-Access Internet System.  Now offering 20,000 yen/year flat
rate Internet access with no time charges.  Full line of corporate
Internet and intranet products are available.   info@example.com
Tel: 03-3351-5977   Fax: 03-3353-6096


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links