/* See ada-lang.h. */
std::string
-ada_decode (const char *encoded, bool wrap)
+ada_decode (const char *encoded, bool wrap, bool operators)
{
int i;
int len0;
while (i < len0)
{
/* Is this a symbol function? */
- if (at_start_name && encoded[i] == 'O')
+ if (operators && at_start_name && encoded[i] == 'O')
{
int k;
/* Decoded names should never contain any uppercase character.
Double-check this, and abort the decoding if we find one. */
- for (i = 0; i < decoded.length(); ++i)
- if (isupper (decoded[i]) || decoded[i] == ' ')
- goto Suppress;
+ if (operators)
+ {
+ for (i = 0; i < decoded.length(); ++i)
+ if (isupper (decoded[i]) || decoded[i] == ' ')
+ goto Suppress;
+ }
/* If the compiler added a suffix, append it now. */
if (suffix >= 0)
the name does not appear to be GNAT-encoded, then the result
depends on WRAP. If WRAP is true (the default), then the result is
simply wrapped in <...>. If WRAP is false, then the empty string
- will be returned. */
-extern std::string ada_decode (const char *name, bool wrap = true);
+ will be returned. Also, when OPERATORS is false, operator names
+ will not be decoded. */
+extern std::string ada_decode (const char *name, bool wrap = true,
+ bool operators = true);
extern std::vector<struct block_symbol> ada_lookup_symbol_list
(const char *, const struct block *, domain_enum);