[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About the new frame title
From: |
Eli Zaretskii |
Subject: |
Re: About the new frame title |
Date: |
Sat, 19 Sep 2020 17:39:58 +0300 |
> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Sat, 19 Sep 2020 13:21:25 +0000
> Cc: emacs-devel@gnu.org
>
> We might as well try to fix it up a bit. How does the attached patch
> look?
Thanks, a minor comment below.
> dpyinfo->name_list_element = Fcons (display_name, Qnil);
> if (STRINGP (Vsystem_name))
> {
> - dpyinfo->w32_id_name = xmalloc (SCHARS (Vinvocation_name)
> - + SCHARS (Vsystem_name) + 2);
> - sprintf (dpyinfo->w32_id_name, "%s@%s",
> - SDATA (Vinvocation_name), SDATA (Vsystem_name));
> + dpyinfo->w32_id_name = xmalloc (14 + SCHARS (Vsystem_name));
> + sprintf (dpyinfo->w32_id_name, "GNU Emacs at %s", SDATA
> (Vsystem_name));
Please don't use hard-coded constants, like 14 above, in such cases.
Instead, use sizeof to compute the correct size at compile time from
the string used as format specifier.
(This pertains to xterm.c change as well.)
- About the new frame title, Angelo Graziosi, 2020/09/14
- Re: About the new frame title, Eli Zaretskii, 2020/09/14
- Re: About the new frame title, Angelo Graziosi, 2020/09/14
- Re: About the new frame title, Stefan Kangas, 2020/09/19
- Re: About the new frame title,
Eli Zaretskii <=
- Re: About the new frame title, Stefan Kangas, 2020/09/24
- Re: About the new frame title, Eli Zaretskii, 2020/09/24
- Re: About the new frame title, Angelo Graziosi, 2020/09/25
- Re: About the new frame title, Eli Zaretskii, 2020/09/25
- Re: About the new frame title, Angelo Graziosi, 2020/09/25
- Re: About the new frame title, Eli Zaretskii, 2020/09/25
- Re: About the new frame title, Angelo Graziosi, 2020/09/19
- Re: About the new frame title, Stefan Kangas, 2020/09/24