Mercurial > hg > xemacs-beta
diff src/event-Xt.c @ 267:966663fcf606 r20-5b32
Import from CVS: tag r20-5b32
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:26:29 +0200 |
parents | 727739f917cb |
children | c5d627a313b1 |
line wrap: on
line diff
--- a/src/event-Xt.c Mon Aug 13 10:25:39 2007 +0200 +++ b/src/event-Xt.c Mon Aug 13 10:26:29 2007 +0200 @@ -2044,12 +2044,13 @@ if (w) stderr_out (" %s", w->core.widget_class->core_class.class_name); f = x_any_window_to_frame (get_device_from_display (display), window); - if (f) { - char buf[500]; - sprintf (buf, " \"%s\"", XSTRING_DATA (f->name)); - write_string_to_stdio_stream (stderr, 0, (Bufbyte *) buf, 0, strlen (buf), - FORMAT_TERMINAL); - } + if (f) + { + char *buf = alloca (XSTRING_LENGTH (f->name) + 4); + sprintf (buf, " \"%s\"", XSTRING_DATA (f->name)); + write_string_to_stdio_stream (stderr, 0, (Bufbyte *) buf, 0, + strlen (buf), FORMAT_TERMINAL); + } stderr_out ("\n"); }