mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-28 04:13:28 +08:00
* language.h (PRINT_LITERAL_FORM): New macro that takes character
and decides if it should be printed in literal form or some other form, based on it's ASCII value and setting of sevenbit_strings. * {c-exp.y, m2-exp.y} (emit_char): Use new PRINT_LITERAL_FORM macro, change indentation style. **** start-sanitize-chill **** * ch-exp.y (chill_printchar): Use new PRINT_LITERAL_FORM macro. * ch-exp.y (chill_printstr): First cut at real function instead of error stub. **** end-sanitize-chill ****
This commit is contained in:
@ -222,6 +222,15 @@ set_language PARAMS ((enum language));
|
||||
#define local_printstr(stream, string, length, force_ellipses) \
|
||||
(current_language->la_printstr(stream, string, length, force_ellipses))
|
||||
|
||||
/* Test a character to decide whether it can be printed in literal form
|
||||
or needs to be printed in another representation. For example,
|
||||
in C the literal form of the character with octal value 141 is 'a'
|
||||
and the "other representation" is '\141'. The "other representation"
|
||||
is program language dependent. */
|
||||
|
||||
#define PRINT_LITERAL_FORM(c) \
|
||||
((c)>=0x20 && ((c)<0x7F || (c)>=0xA0) && (!sevenbit_strings || (c)<0x80))
|
||||
|
||||
/* Return a format string for printf that will print a number in one of
|
||||
the local (language-specific) formats. Result is static and is
|
||||
overwritten by the next call. Takes printf options like "08" or "l"
|
||||
|
Reference in New Issue
Block a user