From xemacs-m  Tue Feb 25 23:43:33 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id XAA12624
	for <xemacs-beta@xemacs.org>; Tue, 25 Feb 1997 23:43:31 -0600 (CST)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.5/8.8.5) id VAA27253;
	Tue, 25 Feb 1997 21:55:14 -0800
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: Re: [XEmacs-20.1-b1] mule-wnnfns.c and DEC Alpha (OSF)
References: <199702260442.NAA00774@draco.jsk.t.u-tokyo.ac.jp>
X-Url: http://www.miranova.com/%7Esteve/
X-Face: #!T9!#9s-3o8)*uHlX{Ug[xW7E7Wr!*L46-OxqMu\xz23v|R9q}lH?cRS{rCNe^'[`^sr5"
 f8*@r4ipO6Jl!:Ccq<xoV[Qz2u8<8-+Vwf2gzJ44lf_/y9OaQ`@#Q65{U4/TC)i2`~/M&QI$X>p:9I
 OSS'2{-)-4wBnVeg0S\O4Al@)uC[pD|+
X-Attribution: sb
From: Steven L Baur <steve@miranova.com>
In-Reply-To: Hajime Saitou's message of Wed, 26 Feb 97 13:42:51 +0900
Mime-Version: 1.0 (generated by tm-edit 7.105)
Content-Type: text/plain; charset=US-ASCII
Date: 25 Feb 1997 21:55:12 -0800
Message-ID: <m24tf03ydb.fsf@altair.xemacs.org>
Lines: 59
X-Mailer: Gnus v5.4.15/XEmacs 20.1

Hajime Saitou writes:

> I just tried compiling XEmacs-20.1-b1 on a DEC Alpha and had to make
> 2 changes to mule-wnnfns.c for it to compile. I haven't done any
> extensive checking yet.

You have found bogus code. :-(

> First was mule-wnnfns.c line 907

> Changed
> ------------------------------
>   if ((int)(info_buf =  jl_word_info (wnnfns_buf[snum],
> 				      XINT (no), XINT (serial))) <= 0) 
> ------------------------------
> to
> ------------------------------
> #ifdef OSF1
>   if ((long)(info_buf =  jl_word_info (wnnfns_buf[snum],
> 				      XINT (no), XINT (serial))) <= 0) 
> #else
>   if ((int)(info_buf =  jl_word_info (wnnfns_buf[snum],
> 				      XINT (no), XINT (serial))) <= 0) 
> #endif
> ------------------------------

This test is all wrong.  info_buf is type struct wnn_jdata * and you
should *never* test for a pointer being less than 0.  I think this
test should be:

  if ((info_buf =  jl_word_info (wnnfns_buf[snum],
                                      XINT (no), XINT (serial))) != NULL)

Jareth or somebody, you might want to take a deeper look into
jl_word_info if you haven't already.  A cursory look at Wnn 4.2 looks
like it returns garbage and random pointers on error. :-(

> This (I think) is purely cosmetic.

> The second was on mule-wnnfns.c line 2068

> Changed
> -------------------------------
>      yes = call1(Qyes_or_no_p, EQ(str, Qnil));
> -------------------------------

This isn't right either.  The parameter to yes-or-no-p needs to be a
string or nil.  Giving it t will cause it to barf.

As far as I can tell the whole EQ test is bogus so the replacement
should be:
     yes = call1(Qyes_or_no_p, str);



Do these changes work for you?
-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.

