aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/adadecode.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/adadecode.c')
-rw-r--r--gcc/ada/adadecode.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/gcc/ada/adadecode.c b/gcc/ada/adadecode.c
index 86216fc..43f14f1 100644
--- a/gcc/ada/adadecode.c
+++ b/gcc/ada/adadecode.c
@@ -29,14 +29,26 @@
* *
****************************************************************************/
-#ifdef IN_GCC
+
+#if defined(IN_RTS)
+#include "tconfig.h"
+#include "tsystem.h"
+#elif defined(IN_GCC)
#include "config.h"
#include "system.h"
-#else
+#endif
+
#include <string.h>
#include <stdio.h>
#include <ctype.h>
+
+#include "adaint.h"
+
+#ifndef ISDIGIT
#define ISDIGIT(c) isdigit(c)
+#endif
+
+#ifndef PARMS
#define PARMS(ARGS) ARGS
#endif
@@ -237,6 +249,21 @@ __gnat_decode (const char *coded_name, char *ada_name, int verbose)
}
}
+ /* Check for nested subprogram ending in .nnnn and strip suffix. */
+ {
+ int last = strlen (ada_name) - 1;
+
+ while (ISDIGIT (ada_name[last]) && last > 0)
+ {
+ last--;
+ }
+
+ if (ada_name[last] == '.')
+ {
+ ada_name[last] = (char) 0;
+ }
+ }
+
/* Change all "__" to ".". */
{
int len = strlen (ada_name);