From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Image support for Carbon Emacs Date: Fri, 16 Jan 2004 14:05:28 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20040116.140528.59464372.mituharu@math.s.chiba-u.ac.jp> References: <20040113.211033.74742347.mituharu@math.s.chiba-u.ac.jp> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1074230985 2014 80.91.224.253 (16 Jan 2004 05:29:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Jan 2004 05:29:45 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Jan 16 06:29:35 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AhMY3-0003k6-00 for ; Fri, 16 Jan 2004 06:29:35 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AhMY1-0000v8-00 for ; Fri, 16 Jan 2004 06:29:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AhMX0-00058b-BW for emacs-devel@quimby.gnus.org; Fri, 16 Jan 2004 00:28:30 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AhMUN-000478-H3 for emacs-devel@gnu.org; Fri, 16 Jan 2004 00:25:47 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AhMBb-0007mO-Q0 for emacs-devel@gnu.org; Fri, 16 Jan 2004 00:06:54 -0500 Original-Received: from [133.82.132.2] (helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AhMAr-0007SH-0W for emacs-devel@gnu.org; Fri, 16 Jan 2004 00:05:37 -0500 Original-Received: from localhost (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 792581A6388; Fri, 16 Jan 2004 14:05:33 +0900 (JST) Original-To: macosx.pb@gmx.de In-Reply-To: X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19194 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19194 >>>>> On Fri, 16 Jan 2004 01:54:29 +0100, Hans-Peter Binder said: > But when I try to view a PBM-File Emacs crashed. Thanks for your experiment and report. I could reproduce the problem in Mac OS X 10.2.8. In pbm_load, neither img->width nor img->height are set before calling image_background, and that caused the crash. I think similar changes are also needed for xfns.c and w32fns.c. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp *** src/macfns.c-20040113 Tue Jan 13 17:38:05 2004 --- src/macfns.c Fri Jan 16 13:03:32 2004 *************** *** 6926,6931 **** --- 6926,6934 ---- free_color_table (); #endif + img->width = width; + img->height = height; + /* Maybe fill in the background field while we have ximg handy. */ if (NILP (image_spec_value (img->spec, QCbackground, NULL))) IMAGE_BACKGROUND (img, f, ximg); *************** *** 6933,6941 **** /* Put the image into a pixmap. */ x_put_x_image (f, ximg, img->pixmap, width, height); x_destroy_x_image (ximg); - - img->width = width; - img->height = height; UNGCPRO; xfree (contents); --- 6936,6941 ----