mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-25 07:28:20 +00:00
* xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
instead of truncating it to 63 (admittedly a generous limit).
This commit is contained in:
parent
d188e26b1a
commit
885d1d74a7
@ -1,5 +1,8 @@
|
||||
2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
|
||||
instead of truncating it to 63 (admittedly a generous limit).
|
||||
|
||||
* process.c: Fix spelling and caps in comments.
|
||||
|
||||
2012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
@ -10375,14 +10375,16 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
|
||||
const int total_atom_count = 1 + atom_count;
|
||||
Atom *atoms_return = xmalloc (sizeof (Atom) * total_atom_count);
|
||||
char **atom_names = xmalloc (sizeof (char *) * total_atom_count);
|
||||
char xsettings_atom_name[64];
|
||||
static char const xsettings_fmt[] = "_XSETTINGS_S%d";
|
||||
char xsettings_atom_name[sizeof xsettings_fmt - 2
|
||||
+ INT_STRLEN_BOUND (int)];
|
||||
|
||||
for (i = 0; i < atom_count; i++)
|
||||
atom_names[i] = (char *) atom_refs[i].name;
|
||||
|
||||
/* Build _XSETTINGS_SN atom name */
|
||||
snprintf (xsettings_atom_name, sizeof (xsettings_atom_name),
|
||||
"_XSETTINGS_S%d", XScreenNumberOfScreen (dpyinfo->screen));
|
||||
sprintf (xsettings_atom_name, xsettings_fmt,
|
||||
XScreenNumberOfScreen (dpyinfo->screen));
|
||||
atom_names[i] = xsettings_atom_name;
|
||||
|
||||
XInternAtoms (dpyinfo->display, atom_names, total_atom_count,
|
||||
|
Loading…
Reference in New Issue
Block a user