From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: oslsachem Newsgroups: gmane.emacs.bugs Subject: bug#8562: Emacs 23.1 and later don't work in windows 98 Date: Tue, 31 May 2011 20:16:00 +0200 Message-ID: References: <83d3k88k6o.fsf@gnu.org> <83wri4kpwb.fsf@gnu.org> <83d3j9e2pn.fsf@gnu.org> <8339k3esws.fsf@gnu.org> <83wrhed91s.fsf@gnu.org> <838vtscbeu.fsf@gnu.org> <83vcwvc1eq.fsf@gnu.org> <83vcwsf2ra.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1306867119 17267 80.91.229.12 (31 May 2011 18:38:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 31 May 2011 18:38:39 +0000 (UTC) Cc: 8562@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 31 20:38:33 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QRTpo-00045r-M7 for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 May 2011 20:38:32 +0200 Original-Received: from localhost ([::1]:40080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRTpn-0003LE-LU for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 May 2011 14:38:31 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:40437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRTV3-00065D-T0 for bug-gnu-emacs@gnu.org; Tue, 31 May 2011 14:17:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRTV2-0006Po-D2 for bug-gnu-emacs@gnu.org; Tue, 31 May 2011 14:17:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRTV1-0006Pb-Vj for bug-gnu-emacs@gnu.org; Tue, 31 May 2011 14:17:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QRTV0-0006Sy-AH; Tue, 31 May 2011 14:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: oslsachem Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 May 2011 18:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8562 X-GNU-PR-Package: emacs,w32 X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 8562-submit@debbugs.gnu.org id=B8562.130686577124793 (code B ref 8562); Tue, 31 May 2011 18:17:02 +0000 Original-Received: (at 8562) by debbugs.gnu.org; 31 May 2011 18:16:11 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QRTUB-0006Rq-57 for submit@debbugs.gnu.org; Tue, 31 May 2011 14:16:11 -0400 Original-Received: from mail-wy0-f172.google.com ([74.125.82.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QRTU8-0006Ra-6y for 8562@debbugs.gnu.org; Tue, 31 May 2011 14:16:09 -0400 Original-Received: by wyb29 with SMTP id 29so3637435wyb.3 for <8562@debbugs.gnu.org>; Tue, 31 May 2011 11:16:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=7PrciaoYlhrepqmtb27J4AUI9znAwm1RA5QdTA7uKoY=; b=Ov82wkhS2UUUwh9BFjItXAV0uXIOecnT/DVpQ5qBp4MzQKKUSIznzLPebRuJy49AvU +6fFH/K3YPGChZPyHFqxNIbyv8IEsMajzcYCcKPMYF9fwR8tuejv2C1cwsauYEVI3PJy KkxJ1ntN0L1uvICXoyH2oF+RMzxECi4PAdcW4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Yz/fep0oDPAW5UUHPJTrMBokWVwx/0tyiSM1svR61F/iF0edvPeRtDeKbE557W8/2w T+iawd5QpjfI5ZWQfKiYoQZeJ0e8WUC4pnMXXXi/SklpeLTJSL87vc812MMb0KFB6GVr ObVav3hvb4A/qnTUC8ecXMgOPk5WzlDlLUeLI= Original-Received: by 10.216.240.12 with SMTP id d12mr2354378wer.8.1306865762297; Tue, 31 May 2011 11:16:02 -0700 (PDT) Original-Received: by 10.216.22.136 with HTTP; Tue, 31 May 2011 11:16:00 -0700 (PDT) In-Reply-To: <83vcwsf2ra.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 31 May 2011 14:17:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:46847 Archived-At: > The safest place is the same directory where you have emacs.exe. =A0But > doing what you did is also OK. I tried putting the unicows.dll there too and adding that directory to the path but I still got the same error (120) > The difference here is that your sample program dynamically loads > unicows.dll: > >> Breakpoint 1, WinMain (hInstance=3D0x400000, hPrevInstance=3D0x0, >> =A0 =A0 lpCmdLine=3D0x81631ea2 "", nCmdShow=3D10) at sample.c:139 >> 139 =A0 =A0 hm_unicows =3D LoadLibrary("unicows.dll"); > > whereas Emacs doesn't, AFAICT. I haven't found any reference to the word unicows in the source files. I suspect Emacs is not aware of the availability of the MSLU library for windows 98, by reading this comment (which I found while searching for the word unicode) from w32font.c:510 ---------------------------------------------------------------------------= ------------------------------------------------------ if (GetTextExtentPoint32W (dc, wcode, nglyphs, &size)) { total_width =3D size.cx; } /* On 95/98/ME, only some unicode functions are available, so fallback on doing a dummy draw to find the total width. */ if (!total_width) { RECT rect; rect.top =3D 0; rect.bottom =3D font->height; rect.left =3D 0; rect.r= ight =3D 1; DrawTextW (dc, wcode, nglyphs, &rect, DT_CALCRECT | DT_NOPREFIX | DT_SINGLELINE); total_width =3D rect.right; } ---------------------------------------------------------------------------= ------------------------------------------------------- DrawTextW is a unicode function which is available (from User32.dll) http://www.speedyshare.com/files/28740563/BrowsingUser32.png But GetTextExtentPoint32W is a unicode function which is available too (from unicows.dll) http://www.speedyshare.com/files/28740564/BrowsingUnicows.png > =A0Could you try loading that DLL in > Emacs, by adding just the single line as the one above to some > function that is run early during the startup, e.g. in globals_of_w32? > (There's no need to go to extra lengths such as calling > GetOutlineTextMetricsW and GetTextMetricsW through function pointers.) > Then recompile Emacs and see if that solves the problem. I see the same error (120) http://www.speedyshare.com/files/28740565/Emacs-23.3GDBglobals.txt Greetings, Osl