diff options
author | Fred Fish <fnf@specifix.com> | 1992-11-23 19:57:29 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1992-11-23 19:57:29 +0000 |
commit | 5707ea9fad0ff4b51cc2c913af218c0a0b8278e9 (patch) | |
tree | 56bbdf02b7bfe05c993493734ff173af6175a466 /gdb/language.h | |
parent | f53f0a036d1a9597223ee95a47ecf7a2a019f497 (diff) | |
download | gdb-5707ea9fad0ff4b51cc2c913af218c0a0b8278e9.zip gdb-5707ea9fad0ff4b51cc2c913af218c0a0b8278e9.tar.gz gdb-5707ea9fad0ff4b51cc2c913af218c0a0b8278e9.tar.bz2 |
* 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 ****
Diffstat (limited to 'gdb/language.h')
-rw-r--r-- | gdb/language.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/language.h b/gdb/language.h index 0e240f5..862323a 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -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" |