aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorKarl Heuer1998-06-20 22:17:48 +0000
committerKarl Heuer1998-06-20 22:17:48 +0000
commit01c752b506dc29fb5532dc56ab581bfecc703875 (patch)
tree98700ed6408868b59e73c3920225f2d10bfc5fa8 /src/xterm.c
parent94487c4e376640bab3281d19b19bbca531ab78ec (diff)
downloademacs-01c752b506dc29fb5532dc56ab581bfecc703875.tar.gz
emacs-01c752b506dc29fb5532dc56ab581bfecc703875.zip
(x_list_fonts): Keep alloca usage simple.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 582eb2fd5fb..868c8688e42 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -6474,10 +6474,12 @@ x_list_fonts (f, pattern, size, maxnames)
6474 { 6474 {
6475 char *name = (char *) XGetAtomName (dpy, (Atom) value); 6475 char *name = (char *) XGetAtomName (dpy, (Atom) value);
6476 int len = strlen (name); 6476 int len = strlen (name);
6477 char *tmp;
6477 6478
6478 num_fonts = 1; 6479 num_fonts = 1;
6479 names = alloca (sizeof (char *)); 6480 names = alloca (sizeof (char *));
6480 names[0] = alloca (len + 1); 6481 /* Some systems only allow alloca assigned to a simple var. */
6482 tmp = alloca (len + 1); names[0] = tmp;
6481 bcopy (name, names[0], len + 1); 6483 bcopy (name, names[0], len + 1);
6482 XFree (name); 6484 XFree (name);
6483 } 6485 }