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>
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,