summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
db85986)
as octal escapes. Use BOOL_VECTOR_BITS_PER_CHAR instead of BITS_PER_CHAR.
/* Lisp object printing and output streams.
/* Lisp object printing and output streams.
- Copyright (C) 1985, 86, 88, 93, 94, 95, 97, 98, 1999, 2000, 01, 2003
+ Copyright (C) 1985, 86, 88, 93, 94, 95, 97, 98, 1999, 2000, 01, 03, 2004
Free Software Foundation, Inc.
This file is part of GNU Emacs.
Free Software Foundation, Inc.
This file is part of GNU Emacs.
register unsigned char c;
struct gcpro gcpro1;
int size_in_chars
register unsigned char c;
struct gcpro gcpro1;
int size_in_chars
- = (XBOOL_VECTOR (obj)->size + BITS_PER_CHAR - 1) / BITS_PER_CHAR;
+ = ((XBOOL_VECTOR (obj)->size + BOOL_VECTOR_BITS_PER_CHAR - 1)
+ / BOOL_VECTOR_BITS_PER_CHAR);
PRINTCHAR ('\\');
PRINTCHAR ('f');
}
PRINTCHAR ('\\');
PRINTCHAR ('f');
}
+ else if (c > '\177')
+ {
+ /* Use octal escapes to avoid encoding issues. */
+ PRINTCHAR ('\\');
+ PRINTCHAR ('0' + ((c >> 6) & 3));
+ PRINTCHAR ('0' + ((c >> 3) & 7));
+ PRINTCHAR ('0' + (c & 7));
+ }
else
{
if (c == '\"' || c == '\\')
else
{
if (c == '\"' || c == '\\')