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: display-mm-height for MacOS? Date: Tue, 23 Mar 2004 09:51:09 +0900 Organization: Faculty of Science, Chiba University Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1080003551 31529 80.91.224.253 (23 Mar 2004 00:59:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 23 Mar 2004 00:59:11 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Mar 23 01:58:54 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 1B5aFq-0001Vk-00 for ; Tue, 23 Mar 2004 01:58:54 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B5aFq-0007Lc-00 for ; Tue, 23 Mar 2004 01:58:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B5a9q-00053M-EL for emacs-devel@quimby.gnus.org; Mon, 22 Mar 2004 19:52:42 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B5a9f-0004zQ-UJ for emacs-devel@gnu.org; Mon, 22 Mar 2004 19:52:31 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B5a94-0004rL-Nz for emacs-devel@gnu.org; Mon, 22 Mar 2004 19:52:25 -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.30) id 1B5a8Y-0004kl-6d; Mon, 22 Mar 2004 19:51:22 -0500 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id B1B441A6395; Tue, 23 Mar 2004 09:51:09 +0900 (JST) Original-To: David Kastrup In-Reply-To: User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.3.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 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:20755 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20755 >>>>> On 22 Mar 2004 13:08:11 +0100, David Kastrup said: > On MacOS, it would appear that this results in awfully large images, > so one of the three above stated dimensions would seem to be quite > wrong. Could you try this patch? YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp Index: src/macfns.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/macfns.c,v retrieving revision 1.31 diff -c -r1.31 macfns.c *** src/macfns.c 11 Mar 2004 22:43:18 -0000 1.31 --- src/macfns.c 23 Mar 2004 00:42:32 -0000 *************** *** 3025,3035 **** /* MAC_TODO: this is an approximation, and only of the main display */ struct mac_display_info *dpyinfo = check_x_display_info (display); - short h, v; ! ScreenRes (&h, &v); ! ! return make_number ((int) (v / 72.0 * 25.4)); } DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0, --- 3025,3032 ---- /* MAC_TODO: this is an approximation, and only of the main display */ struct mac_display_info *dpyinfo = check_x_display_info (display); ! return make_number ((int) (dpyinfo->height * 25.4 / dpyinfo->resy)); } DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0, *************** *** 3043,3053 **** /* MAC_TODO: this is an approximation, and only of the main display */ struct mac_display_info *dpyinfo = check_x_display_info (display); - short h, v; - - ScreenRes (&h, &v); ! return make_number ((int) (h / 72.0 * 25.4)); } DEFUN ("x-display-backing-store", Fx_display_backing_store, --- 3040,3047 ---- /* MAC_TODO: this is an approximation, and only of the main display */ struct mac_display_info *dpyinfo = check_x_display_info (display); ! return make_number ((int) (dpyinfo->width * 25.4 / dpyinfo->resx)); } DEFUN ("x-display-backing-store", Fx_display_backing_store,