yakbase: Basic services for C developmentYakbase is a microlibrary (currently only a few tiny headers!) which provides very, very basic services for C and C++ development. Currently, it only provides two services:
Yak_log provides basic "log a debug message" features using macros and standard printf() formatting conventions. Other macros support adding "levels" of messages or a 32-bit mask, which gives the developer a bit of flexibility. Both yak_contract and yak_log use macros which can be entirely disabled in production code, allowing the developer to throw in a lot of scaffolding and strip it away easily for the final build. While none of this is groundbreaking, I wanted a library that was extremely small and lightweight, and did not find anything immediately that called out to me. Hopefully others will find this as useful as I do. SampleHere's a totally totally facetious sample of code using yak_contract and yak_log:
double mock_square_root( double x ) { REQUIRE( x >= 0 ); YAK_MLOG( MASK_FILE_MATH_C | MASK_LOG_FUNCTION_ENTRY, ( "mock_square_root entered with argument: %f", x ) ); double result = sqrt( x ); ENSURE( result * result = x ); YAK_MLOG( MASK_FILE_MATH_C | MASK_LOG_FUNCTION_EXIT, ( "mock_square_root exited with result: %f", result ) ); return result; }
DownloadablesYakbase is currently not released in any sort of packaged form as it is in wee alpha stages. Feel free to examine the cvs tree at the sourceforge prokect page at http://sourceforge.net/projects/yakbase.
Hosted by SourceforgeThis project is hosted by the kind folks at |