summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa <handa@gnu.org>2012-11-18 20:29:06 +0900
committerKenichi Handa <handa@gnu.org>2012-11-18 20:29:06 +0900
commit00dc3ead070e2e8017629f4d60d8366ac00c32cb (patch)
treec1c45713d5f879383ab2cb69e784cefe8f69e31f /src
parent9ba02fc3046a5aeaca7e4d3e207a365f6ce33a93 (diff)
font.c (font_unparse_xlfd): Fix previous change. Keep "const" for the variable "f".
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/font.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ba476cdacba..d7699def9a5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2012-11-18 Kenichi Handa <handa@gnu.org>
+
+ * font.c (font_unparse_xlfd): Fix previous change. Keep "const"
+ for the variable "f".
+
2012-11-13 Kenichi Handa <handa@gnu.org>
* font.c (font_unparse_xlfd): Exclude special characters from the
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
font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
{
char *p;
- char *f[XLFD_REGISTRY_INDEX + 1];
+ const char *f[XLFD_REGISTRY_INDEX + 1];
Lisp_Object val;
int i, j, len;
@@ -1241,13 +1241,13 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
alloc = SBYTES (val) + 1;
if (nbytes <= alloc)
return -1;
- f[j] = alloca (alloc);
+ f[j] = p = alloca (alloc);
/* Copy the name while excluding '-', '?', ',', and '"'. */
for (k = l = 0; k < alloc; k++)
{
c = SREF (val, k);
if (c != '-' && c != '?' && c != ',' && c != '"')
- f[j][l++] = c;
+ p[l++] = c;
}
}
}