aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorPaul Eggert2011-08-30 22:50:49 -0700
committerPaul Eggert2011-08-30 22:50:49 -0700
commit61bfeeb79dee6b321cb9f2257aeec9d0c1fa5a2f (patch)
treec30ce4abf653bc333a5f978bdbcc0d87949e3e64 /src/xterm.c
parent0999621ac510fb0e8e949966ec6ab737b7443ab0 (diff)
downloademacs-61bfeeb79dee6b321cb9f2257aeec9d0c1fa5a2f.tar.gz
emacs-61bfeeb79dee6b321cb9f2257aeec9d0c1fa5a2f.zip
Avoid the use of snprintf.
* font.c (APPEND_SNPRINTF): Remove. (font_unparse_xlfd): * xterm.c (x_io_error_quitter): Use esnprintf, not snprintf. That way, we don't have to worry about porting to ancient platforms that lack snprintf. (x_term_init): Use sprintf, not snprintf.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 86393cf411f..72e9f2b2236 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7900,8 +7900,8 @@ x_io_error_quitter (Display *display)
7900{ 7900{
7901 char buf[256]; 7901 char buf[256];
7902 7902
7903 snprintf (buf, sizeof buf, "Connection lost to X server `%s'", 7903 esnprintf (buf, sizeof buf, "Connection lost to X server `%s'",
7904 DisplayString (display)); 7904 DisplayString (display));
7905 x_connection_closed (display, buf); 7905 x_connection_closed (display, buf);
7906 return 0; 7906 return 0;
7907} 7907}
@@ -10278,8 +10278,8 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
10278 atom_names[i] = (char *) atom_refs[i].name; 10278 atom_names[i] = (char *) atom_refs[i].name;
10279 10279
10280 /* Build _XSETTINGS_SN atom name */ 10280 /* Build _XSETTINGS_SN atom name */
10281 snprintf (xsettings_atom_name, sizeof (xsettings_atom_name), 10281 sprintf (xsettings_atom_name,
10282 "_XSETTINGS_S%d", XScreenNumberOfScreen (dpyinfo->screen)); 10282 "_XSETTINGS_S%d", XScreenNumberOfScreen (dpyinfo->screen));
10283 atom_names[i] = xsettings_atom_name; 10283 atom_names[i] = xsettings_atom_name;
10284 10284
10285 XInternAtoms (dpyinfo->display, atom_names, total_atom_count, 10285 XInternAtoms (dpyinfo->display, atom_names, total_atom_count,