mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-02 02:10:46 -08:00
font.c (font_unparse_xlfd): Fix previous change. Keep "const" for the variable "f".
This commit is contained in:
parent
9ba02fc304
commit
00dc3ead07
2 changed files with 8 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue