unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Daniel Koning <dkoning@smu.edu>
To: bug-gnu-emacs@gnu.org
Subject: bug#832: Compiling Emacs.app fails this afternoon. [PATCH]
Date: Thu, 4 Sep 2008 06:23:58 +0000 (UTC)	[thread overview]
Message-ID: <loom.20080904T061209-176@post.gmane.org> (raw)
In-Reply-To: 5f089c510808301100ld667c2eh840fda0990e9f966@mail.gmail.com

Gilbert Harman <harman <at> princeton.edu> writes:

> 
> After ./configure --with-ns....make -j2....nsfont.m: In function
'nsfont_char_width':nsfont.m:481: warning: 'widthOfString:' is deprecated
(declared at /System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:216)
> nsfont.m: In function 'nsfont_open':nsfont.m:726: warning: 'widthOfString:' is
deprecated (declared at
/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:216)nsfont.m: In
function 'nsfont_draw':nsfont.m:907: error: 'struct glyph_string' has no member
named 'gidx'
> nsfont.m:908: error: 'struct glyph_string' has no member named
'gidx'nsfont.m:914: error: 'struct glyph_string' has no member named
'gidx'nsfont.m:1097: error: 'struct glyph_string' has no member named
'gidx'nsfont.m:1103: error: 'struct glyph_string' has no member named 'gidx'
> make[1]: *** [nsfont.o] Error 1make[1]: *** Waiting for unfinished
jobs....make: *** [src] Error 2  Gil(Intel Mac OS X 10.5.4)
> 

This appears to have been caused by nsfont_draw() not having been updated to use
cmp_from instead of gidx.

Here's a patch, which also updates a couple of out-of-date comments:

Index: src/nsfont.m
===================================================================
RCS file: /sources/emacs/emacs/src/nsfont.m,v
retrieving revision 1.11
diff -u -r1.11 nsfont.m
--- src/nsfont.m	21 Aug 2008 02:49:00 -0000	1.11
+++ src/nsfont.m	4 Sep 2008 06:23:03 -0000
@@ -904,14 +904,14 @@
     int hi, lo;
     char isComposite = 0; /* s->first_glyph->type == COMPOSITE_GLYPH; */
     /* FIXME: composition: no vertical displacement is considered. */
-    t+= s->gidx; /* advance into composition */
-    for (i =0; i<s->nchars - s->gidx; i++, t++)
+    t+= s->cmp_from; /* advance into composition */
+    for (i =0; i<s->nchars - s->cmp_from; i++, t++)
       {
         hi = (*t & 0xFF00) >> 8;
         lo = *t & 0x00FF;
         if (isComposite)
           {
-            cwidth = s->cmp->offsets[s->gidx++ * 2] - twidth;
+            cwidth = s->cmp->offsets[s->cmp_from++ * 2] - twidth;
           }
         else
           {
@@ -1094,13 +1094,13 @@
       [col set];
 
     CGContextSetTextPosition (gcontext, r.origin.x, r.origin.y);
-    CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->gidx,
+    CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->cmp_from,
                                     advances, len);
 
     if (face->overstrike)
       {
         CGContextSetTextPosition (gcontext, r.origin.x+0.5, r.origin.y);
-        CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->gidx,
+        CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->cmp_from,
                                         advances, len);
       }
 
Index: src/xdisp.c
===================================================================
RCS file: /sources/emacs/emacs/src/xdisp.c,v
retrieving revision 1.1254
diff -u -r1.1254 xdisp.c
--- src/xdisp.c	31 Aug 2008 08:27:25 -0000	1.1254
+++ src/xdisp.c	4 Sep 2008 06:23:21 -0000
@@ -19532,7 +19532,7 @@
 /* Fill glyph string S with composition components specified by S->cmp.
 
    BASE_FACE is the base face of the composition.
-   S->gidx is the index of the first component for S.
+   S->cmp_from is the index of the first component for S.
 
    OVERLAPS non-zero means S should draw the foreground only, and use
    its physical height for clipping.  See also draw_glyphs.
@@ -19547,7 +19547,7 @@
 {
   int i;
   /* For all glyphs of this composition, starting at the offset
-     S->gidx, until we reach the end of the definition or encounter a
+     S->cmp_from, until we reach the end of the definition or encounter a
      glyph that requires the different face, add it to S.  */
   struct face *face;








  parent reply	other threads:[~2008-09-04  6:23 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <66A91CA5-0AFE-42F4-B27F-3F24BE8626A6@gmail.com>
2008-08-29 18:50 ` bug#823: 23.0.60; uninitialised variable gidx in nsfont.m Peter Dyballa
2008-10-03 18:10   ` bug#823: marked as done (23.0.60; uninitialised variable gidx in nsfont.m) Emacs bug Tracking System
2008-08-29 20:23 ` bug#827: 23.0.60; bootstrap error: nsfont.m Clifford Wulfman
2008-10-03 18:10   ` bug#827: marked as done (23.0.60; bootstrap error: nsfont.m) Emacs bug Tracking System
2008-08-30 17:32 ` bug#831: 23.0.60; error in nsfonts.m Austin Frank
2008-08-30 19:59   ` Glenn Morris
2008-08-31 17:49     ` Austin Frank
     [not found]     ` <mailman.18065.1220206065.18990.bug-gnu-emacs@gnu.org>
2008-09-07 11:26       ` Ted Zlatanov
2008-09-07 20:37         ` bug#381: " Glenn Morris
2008-09-08 10:29           ` Ted Zlatanov
2008-09-08 21:17             ` Glenn Morris
2008-10-03 18:10   ` bug#831: marked as done (23.0.60; error in nsfonts.m) Emacs bug Tracking System
2008-08-30 18:00 ` bug#832: Compiling Emacs.app fails this afternoon Gilbert Harman
2008-09-01 11:30   ` bug#852: [Emacs.app dev]: " Robert Casties
2008-09-02 14:55     ` bug#862: " Dan Villiom Podlaski Christiansen
2008-09-02 17:02       ` bug#866: " Cezar Halmagean
2008-10-03 18:10         ` bug#866: marked as done ([Emacs.app dev]: Compiling Emacs.app fails this afternoon.) Emacs bug Tracking System
2008-10-03 18:10       ` bug#862: " Emacs bug Tracking System
2008-10-03 18:10     ` bug#852: " Emacs bug Tracking System
2008-09-04  6:23   ` Daniel Koning [this message]
2008-10-03 18:10   ` bug#832: marked as done (Compiling " Emacs bug Tracking System
2008-08-30 22:14 ` bug#833: 23.0.60; make bootstrap broken in CVS head Clifford Wulfman
2008-10-03 18:10   ` bug#833: marked as done (23.0.60; make bootstrap broken in CVS head) Emacs bug Tracking System
2008-09-01 20:39 ` bug#855: Build errors Eddie Hillenbrand
2008-10-03 18:10   ` bug#855: marked as done (Build errors ) Emacs bug Tracking System
2008-09-04 15:04 ` bug#887: 23.0.60; glyph_string->gidx removal causes HEAD compilation failure under OS X Sudish Joseph
2008-10-03 18:10   ` bug#887: marked as done (23.0.60; glyph_string->gidx removal causes HEAD compilation failure under OS X) Emacs bug Tracking System
2008-09-06 14:14 ` bug#903: CVS HEAD won't build --with-ns on OSX 10.5 (fails src/nsfont.m) Randal L. Schwartz
2008-10-03 18:10   ` bug#903: marked as done (CVS HEAD won't build --with-ns on OSX 10.5 (fails src/nsfont.m)) Emacs bug Tracking System

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20080904T061209-176@post.gmane.org \
    --to=dkoning@smu.edu \
    --cc=832@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).