aboutsummaryrefslogtreecommitdiffstats
path: root/src/font.c
diff options
context:
space:
mode:
authorKenichi Handa2012-11-18 20:29:06 +0900
committerKenichi Handa2012-11-18 20:29:06 +0900
commit00dc3ead070e2e8017629f4d60d8366ac00c32cb (patch)
treec1c45713d5f879383ab2cb69e784cefe8f69e31f /src/font.c
parent9ba02fc3046a5aeaca7e4d3e207a365f6ce33a93 (diff)
downloademacs-00dc3ead070e2e8017629f4d60d8366ac00c32cb.tar.gz
emacs-00dc3ead070e2e8017629f4d60d8366ac00c32cb.zip
font.c (font_unparse_xlfd): Fix previous change. Keep "const" for the variable "f".
Diffstat (limited to 'src/font.c')
-rw-r--r--src/font.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/font.c b/src/font.c
index c57ca3ccec4..f6b6fa026c0 100644
--- a/src/font.c
+++ b/src/font.c
@@ -1185,7 +1185,7 @@ ptrdiff_t
1185font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes) 1185font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
1186{ 1186{
1187 char *p; 1187 char *p;
1188 char *f[XLFD_REGISTRY_INDEX + 1]; 1188 const char *f[XLFD_REGISTRY_INDEX + 1];
1189 Lisp_Object val; 1189 Lisp_Object val;
1190 int i, j, len; 1190 int i, j, len;
1191 1191
@@ -1241,13 +1241,13 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
1241 alloc = SBYTES (val) + 1; 1241 alloc = SBYTES (val) + 1;
1242 if (nbytes <= alloc) 1242 if (nbytes <= alloc)
1243 return -1; 1243 return -1;
1244 f[j] = alloca (alloc); 1244 f[j] = p = alloca (alloc);
1245 /* Copy the name while excluding '-', '?', ',', and '"'. */ 1245 /* Copy the name while excluding '-', '?', ',', and '"'. */
1246 for (k = l = 0; k < alloc; k++) 1246 for (k = l = 0; k < alloc; k++)
1247 { 1247 {
1248 c = SREF (val, k); 1248 c = SREF (val, k);
1249 if (c != '-' && c != '?' && c != ',' && c != '"') 1249 if (c != '-' && c != '?' && c != ',' && c != '"')
1250 f[j][l++] = c; 1250 p[l++] = c;
1251 } 1251 }
1252 } 1252 }
1253 } 1253 }