/* symbol.c -- symbol module.
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H15PRO112
symbol_table[i] = NULL;
}
if (mdebug__flags[MDEBUG_FINI])
- fprintf (stderr, "%16s %7d %7d %7d\n", "Symbol",
+ fprintf (mdebug__output, "%16s %7d %7d %7d\n", "Symbol",
num_symbols, freed_symbols, num_symbols - freed_symbols);
num_symbols = 0;
}
/***en
@brief Dump a symbol.
- The mdebug_dump_symbol () function prints symbol $SYMBOL in a human
- readable way to the stderr. $INDENT specifies how many columns to
- indent the lines but the first one.
+ The mdebug_dump_symbol () function prints symbol $SYMBOL in a
+ human readable way to the stderr or to what specified by the
+ environment variable MDEBUG_OUTPUT_FILE. $INDENT specifies how
+ many columns to indent the lines but the first one.
@return
This function returns $SYMBOL.
/***ja
@brief ¥·¥ó¥Ü¥ë¤ò¥À¥ó¥×¤¹¤ë.
- ´Ø¿ô mdebug_dump_symbol () ¤Ï¥·¥ó¥Ü¥ë $symbol ¤ò stderr
- ¤Ë¿Í´Ö¤Ë²ÄÆɤʷÁ¤Ç°õºþ¤¹¤ë¡£ $INDENT ¤Ï£²¹ÔÌܰʹߤΥ¤¥ó¥Ç¥ó¥È¤ò»ØÄꤹ¤ë¡£
+ ´Ø¿ô mdebug_dump_symbol () ¤Ï¥·¥ó¥Ü¥ë $symbol ¤òɸ½à¥¨¥é¡¼½ÐÎϤ⤷
+ ¤¯¤Ï´Ä¶ÊÑ¿ô MDEBUG_DUMP_FONT ¤Ç»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤Ë¿Í´Ö¤Ë²ÄÆɤʷÁ
+ ¤Ç°õºþ¤¹¤ë¡£ $INDENT ¤Ï£²¹ÔÌܰʹߤΥ¤¥ó¥Ç¥ó¥È¤ò»ØÄꤹ¤ë¡£
@return
¤³¤Î´Ø¿ô¤Ï $SYMBOL ¤òÊÖ¤¹¡£
else
plist = &symbol->plist, name = symbol->name;
- fprintf (stderr, "%s%s", prefix, name);
+ fprintf (mdebug__output, "%s%s", prefix, name);
while (plist && MPLIST_KEY (plist) != Mnil)
{
- fprintf (stderr, ":%s", MPLIST_KEY (plist)->name);
+ fprintf (mdebug__output, ":%s", MPLIST_KEY (plist)->name);
plist = MPLIST_NEXT (plist);
}
return symbol;
@brief Dump all symbol names.
The mdebug_dump_all_symbols () function prints names of all
- symbols to the stderr. $INDENT specifies how many columns to
- indent the lines but the first one.
+ symbols to the stderr or to what specified by the environment
+ variable MDEBUG_OUTPUT_FILE. $INDENT specifies how many columns
+ to indent the lines but the first one.
@return
This function returns #Mnil.
/***ja
@brief ¤¹¤Ù¤Æ¤Î¥·¥ó¥Ü¥ë̾¤ò¥À¥ó¥×¤¹¤ë.
- ´Ø¿ô mdebug_dump_all_symbols () ¤Ï¡¢¤¹¤Ù¤Æ¤Î¥·¥ó¥Ü¥ë¤Î̾Á°¤ò
- stderr ¤Ë°õºþ¤¹¤ë¡£ $INDENT ¤Ï£²¹ÔÌܰʹߤΥ¤¥ó¥Ç¥ó¥È¤ò»ØÄꤹ¤ë¡£
+ ´Ø¿ô mdebug_dump_all_symbols () ¤Ï¡¢¤¹¤Ù¤Æ¤Î¥·¥ó¥Ü¥ë¤Î̾Á°¤òɸ½à¥¨
+ ¥é¡¼½ÐÎϤ⤷¤¯¤Ï´Ä¶ÊÑ¿ô MDEBUG_DUMP_FONT ¤Ç»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤Ë°õ
+ ºþ¤¹¤ë¡£ $INDENT ¤Ï£²¹ÔÌܰʹߤΥ¤¥ó¥Ç¥ó¥È¤ò»ØÄꤹ¤ë¡£
@return
¤³¤Î´Ø¿ô¤Ï #Mnil ¤òÊÖ¤¹¡£
memset (prefix, 32, indent);
prefix[indent] = 0;
- fprintf (stderr, "(symbol-list");
+ fprintf (mdebug__output, "(symbol-list");
for (i = n = 0; i < SYMBOL_TABLE_SIZE; i++)
if ((sym = symbol_table[i]))
{
- fprintf (stderr, "\n%s (%4d", prefix, i);
+ fprintf (mdebug__output, "\n%s (%4d", prefix, i);
for (; sym; sym = sym->next, n++)
- fprintf (stderr, " '%s'", sym->name);
- fprintf (stderr, ")");
+ fprintf (mdebug__output, " '%s'", sym->name);
+ fprintf (mdebug__output, ")");
}
- fprintf (stderr, "\n%s (total %d)", prefix, n);
- fprintf (stderr, ")");
+ fprintf (mdebug__output, "\n%s (total %d)", prefix, n);
+ fprintf (mdebug__output, ")");
return Mnil;
}