unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: 44850@debbugs.gnu.org
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
	pieter-l@vanoostrum.org, pieter@vanoostrum.org,
	Alan Third <alan@idiocy.org>
Subject: bug#44850: 27.1; Emacs crash in font handling with font-backend ns
Date: Fri, 27 Nov 2020 18:16:48 +0100	[thread overview]
Message-ID: <9ACDC4D8-9B89-4EC7-BF98-F5E7155CCBA7@acm.org> (raw)
In-Reply-To: <24509.19571.558312.286528@cochabamba.vanoostrum.org>

> I'd prefer to lift the restriction introduced by doprnt.c, instead of replacing that character. It isn't clear to me why this restriction is a good idea, and it doesn't seem like lifting the restriction should be hard.

Yes, the restriction is a bit odd but perhaps there was a good reason. For this application, however, we could just switch from esprintf to sprintf in nsterm.m. (The stated reason for using esprintf was in case the string is longer than 2 GiB but I think we would have bigger problems if a frame title ever becomes that long.)

OK for master? (Also fixed the unsightly 'x' while at it)

--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -7282,7 +7282,7 @@ - (NSSize)windowWillResize: (NSWindow *)sender toSize: (NSSize)frameSize
             old_title = t;
           }
         size_title = xmalloc (strlen (old_title) + 40);
-       esprintf (size_title, "%s  —  (%d x %d)", old_title, cols, rows);
+        sprintf (size_title, "%s  —  (%d × %d)", old_title, cols, rows);
         [window setTitle: [NSString stringWithUTF8String: size_title]];
         [window display];
         xfree (size_title);






  parent reply	other threads:[~2020-11-27 17:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24 18:09 bug#44850: 27.1; Emacs crash in font handling with font-backend ns Pieter van Oostrum
2020-11-25 14:48 ` Pieter van Oostrum
2020-11-26 11:01   ` Lars Ingebrigtsen
2020-11-26 17:26     ` Pieter van Oostrum
2020-11-26 19:23       ` Eli Zaretskii
2020-11-27  8:16         ` Lars Ingebrigtsen
2020-11-27  9:55           ` Alan Third
2020-11-27 10:04             ` Lars Ingebrigtsen
2020-11-27 10:19               ` Alan Third
2020-11-28 14:23                 ` Pieter van Oostrum
2020-11-27 12:23             ` Eli Zaretskii
2020-11-29 18:22   ` Alan Third
2020-11-27 17:16 ` Mattias Engdegård [this message]
2020-11-27 18:44   ` Eli Zaretskii
2020-11-29  9:45   ` Lars Ingebrigtsen

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=9ACDC4D8-9B89-4EC7-BF98-F5E7155CCBA7@acm.org \
    --to=mattiase@acm.org \
    --cc=44850@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    --cc=larsi@gnus.org \
    --cc=pieter-l@vanoostrum.org \
    --cc=pieter@vanoostrum.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).