FILE *cdbFilePtr = NULL;
char *cdbModuleName = NULL;
+/******************************************************************
+ * spacesToUnderscores - replace all non alpha-numerics with
+ * underscores
+ *
+ *
+ *****************************************************************/
+
+static char *
+spacesToUnderscores (char *dest, const char *src, size_t len)
+{
+ unsigned int i;
+ char *p;
+
+ assert(dest != NULL);
+ assert(src != NULL);
+ assert(len > 0);
+
+ --len;
+ for (p = dest, i = 0; *src != '\0' && i < len; ++src, ++i) {
+ *p++ = (isspace((unsigned char)*src) || (*src == '-')) ? '_' : *src;
+ }
+ *p = '\0';
+
+ return dest;
+}
+
+
/******************************************************************
*
*
sprintf (debugSym, "C$%s$%d$%d$%d",
FileBaseName (ic->filename), pSym->lastLine,
ic->level, ic->block);
+ spacesToUnderscores (debugSym, debugSym, sizeof (debugSym));
emitDebuggerSymbol (debugSym);
}
sprintf (debugSym, "C$%s$%d$%d$%d",
FileBaseName (ic->filename), ic->lineno,
ic->level, ic->block);
+ spacesToUnderscores (debugSym, debugSym, sizeof (debugSym));
emitDebuggerSymbol (debugSym);
return 1;
fprintf (cdbFilePtr, "),");
/* CHECK FOR REGISTER SYMBOL... */
- if(sym->reqv)
+ if (!sym->allocreq && sym->reqv)
{
int a;
symbol *TempSym = OP_SYMBOL (sym->reqv);