unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrea Corallo <acorallo@gnu.org>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Hard-to-understand line in xfaces.c
Date: Mon, 22 Jul 2024 10:35:18 -0400	[thread overview]
Message-ID: <yp1ttghze8p.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <CADwFkmkA-FyVi3o9zN6Z=A4WEgUVRGQcEGauhaGoLth=6xoRLA@mail.gmail.com> (Stefan Kangas's message of "Mon, 22 Jul 2024 07:20:10 -0700")

Stefan Kangas <stefankangas@gmail.com> writes:

> Could someone explain this line in xfaces.c:7184?
>
>     len -= 0 < len && name[len - 1] == '\n';
>
> It seems rather mysterious to me; for example, does it actually do
> anything?

If len is greater than zero and name[len - 1] is '\n' then is decreasing
len by one.  Only form the line I don't have the context of why is doing
that.

  Andrea



  reply	other threads:[~2024-07-22 14:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-22 14:20 Hard-to-understand line in xfaces.c Stefan Kangas
2024-07-22 14:35 ` Andrea Corallo [this message]
2024-07-22 14:59   ` Eli Zaretskii
2024-07-22 15:55   ` Stefan Kangas
2024-07-22 14:38 ` Pip Cet

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=yp1ttghze8p.fsf@fencepost.gnu.org \
    --to=acorallo@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=stefankangas@gmail.com \
    /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).