aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2012-06-24 16:14:39 -0700
committerPaul Eggert2012-06-24 16:14:39 -0700
commit885d1d74a769b8d97ecb0b67fecdc810aaad9b93 (patch)
tree0858d10b84a13f0411157c319b303c3d352703fa /src
parentd188e26b1a235acbd679e3ad2f41cf7d2729ccba (diff)
downloademacs-885d1d74a769b8d97ecb0b67fecdc810aaad9b93.tar.gz
emacs-885d1d74a769b8d97ecb0b67fecdc810aaad9b93.zip
* xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
instead of truncating it to 63 (admittedly a generous limit).
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/xterm.c8
2 files changed, 8 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 66ca8a3940f..7878a4d6f68 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
12012-06-24 Paul Eggert <eggert@cs.ucla.edu> 12012-06-24 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
4 instead of truncating it to 63 (admittedly a generous limit).
5
3 * process.c: Fix spelling and caps in comments. 6 * process.c: Fix spelling and caps in comments.
4 7
52012-06-24 Dan Nicolaescu <dann@ics.uci.edu> 82012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
diff --git a/src/xterm.c b/src/xterm.c
index 9587a47f9bb..f398e4dbb20 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10375,14 +10375,16 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
10375 const int total_atom_count = 1 + atom_count; 10375 const int total_atom_count = 1 + atom_count;
10376 Atom *atoms_return = xmalloc (sizeof (Atom) * total_atom_count); 10376 Atom *atoms_return = xmalloc (sizeof (Atom) * total_atom_count);
10377 char **atom_names = xmalloc (sizeof (char *) * total_atom_count); 10377 char **atom_names = xmalloc (sizeof (char *) * total_atom_count);
10378 char xsettings_atom_name[64]; 10378 static char const xsettings_fmt[] = "_XSETTINGS_S%d";
10379 char xsettings_atom_name[sizeof xsettings_fmt - 2
10380 + INT_STRLEN_BOUND (int)];
10379 10381
10380 for (i = 0; i < atom_count; i++) 10382 for (i = 0; i < atom_count; i++)
10381 atom_names[i] = (char *) atom_refs[i].name; 10383 atom_names[i] = (char *) atom_refs[i].name;
10382 10384
10383 /* Build _XSETTINGS_SN atom name */ 10385 /* Build _XSETTINGS_SN atom name */
10384 snprintf (xsettings_atom_name, sizeof (xsettings_atom_name), 10386 sprintf (xsettings_atom_name, xsettings_fmt,
10385 "_XSETTINGS_S%d", XScreenNumberOfScreen (dpyinfo->screen)); 10387 XScreenNumberOfScreen (dpyinfo->screen));
10386 atom_names[i] = xsettings_atom_name; 10388 atom_names[i] = xsettings_atom_name;
10387 10389
10388 XInternAtoms (dpyinfo->display, atom_names, total_atom_count, 10390 XInternAtoms (dpyinfo->display, atom_names, total_atom_count,