#ifndef STDOUT_H #define STDOUT_H #include #include #ifdef STDOUT_put_string void stdout_put_string(void (*putc)(const char c), const char* s); #endif #ifdef STDOUT_put_uint static const unsigned int _devisor_two[] = { /// 2147483648, 1073741824, 536870912, 268435456, 134217728, 67108864, /// 33554432, 16777216, 8388608, 4194304, 2097152, 1048576, 524288, 262144, /// 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1 }; static const unsigned int _devisor_ten[] = { /// 1000000000, 100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10, 1 }; void stdout_put_uint(void (*putc)(const char c), int n); #endif #ifdef STDOUT_put_binary void stdout_put_binary(void (*putc)( const char c), const unsigned char data); #endif #ifdef STDOUT_reverse_bits char stdout_reverse_bits(const unsigned char v); #endif #ifdef STDOUT_putf #include extern void dec_put_char(const char); void stdout_putf(void (*putc)( const char c), const char* format, ...); #endif #endif