Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

logging.

  • Loading branch information...
commit 9e3f84fba19563795bfb66f7f37570d82da50a43 1 parent a6de567
Higepon Taro Minowa authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 mona/core/monalibc/stdio/fwrite.c
9 mona/core/monalibc/stdio/fwrite.c
View
@@ -93,6 +93,15 @@ size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream)
_logprintf("monalibc: stream->_extra = %x\n", stream->_extra);
_logprintf("monalibc: stream->_extra->stds = %x\n", stream->_extra->stds);
#endif
+ int i;
+ int j;
+ if (stream->_extra->stds == __STDERR) {
+ for (i = 0; i < nmemb; i++) {
+ for (j = 0; j < size; j++) {
+ _logprintf("%c", ((char*)ptr)[i * size + j]);
+ }
+ }
+ }
if( stream->_extra->stds == __STDOUT
|| stream->_extra->stds == __STDERR )
{
Please sign in to comment.
Something went wrong with that request. Please try again.