From 85315f2cc85a0c44055cd94c1b7de8cfe11b46e1 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 15 Mar 2010 16:11:19 +0000 Subject: Ito is updated and is more posix compliant. --- src/formatter.cpp | 4 ++++ src/ito.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/formatter.cpp b/src/formatter.cpp index 27925b0..7ebe256 100644 --- a/src/formatter.cpp +++ b/src/formatter.cpp @@ -239,7 +239,11 @@ Bu::Formatter &Bu::operator<<( Bu::Formatter &f, Bu::Formatter::Special s ) { case Formatter::nl: { +#ifdef WIN32 + f.write("\r\n", 2 ); +#else f.write("\n", 1 ); +#endif char ci = f.getIndentChar(); for( int j = 0; j < f.getIndent(); j++ ) f.write( &ci, 1 ); diff --git a/src/ito.cpp b/src/ito.cpp index c922fd0..dba1a87 100644 --- a/src/ito.cpp +++ b/src/ito.cpp @@ -25,14 +25,16 @@ bool Bu::Ito::start() bool Bu::Ito::stop() { - pthread_exit( &ptHandle ); + pthread_cancel( ptHandle ); return true; } void *Bu::Ito::threadRunner( void *pThread ) { - return ((Ito *)pThread)->run(); + void *pRet = ((Ito *)pThread)->run(); + pthread_exit( pRet ); + return pRet; } bool Bu::Ito::join() -- cgit v1.2.3