if (MT) \
mtext_cat_char ((MT), (C)); \
else \
- putc ((C), stderr); \
+ putc ((C), mdebug__output); \
} while (0);
#define PUTS(MT, STR) \
if (MT) \
MTEXT_CAT_ASCII ((MT), (STR)); \
else \
- fputs ((STR), stderr); \
+ fputs ((STR), mdebug__output); \
} while (0)
unsigned char *end = data + mtext__char_to_byte (this_mt, stop);
while (beg < end)
- putc (*beg, stderr), beg++;
+ putc (*beg, mdebug__output), beg++;
}
if (stop == to)
break;
M17N_OBJECT_UNREF (this_mt);
}
else
- fprintf (stderr, "%s", str);
+ fprintf (mdebug__output, "%s", str);
}
else
{
@brief Dump a property list.
The mdebug_dump_plist () function prints a property list $PLIST in
- a human readable way to the stderr. $INDENT specifies how many
- columns to indent the lines but the first one.
+ 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 $PLIST. */
/***ja
@brief ¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤ò¥À¥ó¥×¤¹¤ë.
- ´Ø¿ô mdebug_dump_plist () ¤Ï¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È $PLIST ¤ò stderr
- ¤Ë¿Í´Ö¤Ë²ÄÆɤʷÁ¤Ç°õºþ¤¹¤ë¡£ $INDENT ¤Ï£²¹ÔÌܰʹߤΥ¤¥ó¥Ç¥ó¥È¤ò»ØÄꤹ¤ë¡£
+ ´Ø¿ô mdebug_dump_plist () ¤Ï¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È $PLIST ¤òɸ½à¥¨¥é¡¼½Ð
+ ÎϤ⤷¤¯¤Ï´Ä¶ÊÑ¿ô MDEBUG_DUMP_FONT ¤Ç»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤Ë¿Í´Ö¤Ë²Ä
+ ÆɤʷÁ¤Ç°õºþ¤¹¤ë¡£ $INDENT ¤Ï£²¹ÔÌܰʹߤΥ¤¥ó¥Ç¥ó¥È¤ò»ØÄꤹ¤ë¡£
@return
¤³¤Î´Ø¿ô¤Ï $PLIST ¤òÊÖ¤¹¡£ */
memset (prefix, 32, indent);
prefix[indent] = 0;
- fprintf (stderr, "(");
+ fprintf (mdebug__output, "(");
MPLIST_DO (pl, plist)
{
if (pl != plist)
- fprintf (stderr, "\n%s ", prefix);
+ fprintf (mdebug__output, "\n%s ", prefix);
write_element (NULL, pl, indent + 1);
}
- fprintf (stderr, ")");
+ fprintf (mdebug__output, ")");
return plist;
}