aboutsummaryrefslogtreecommitdiff
path: root/src/inc/stdout.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/inc/stdout.h')
-rwxr-xr-xsrc/inc/stdout.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/inc/stdout.h b/src/inc/stdout.h
new file mode 100755
index 0000000..da7027f
--- /dev/null
+++ b/src/inc/stdout.h
@@ -0,0 +1,41 @@
1#ifndef STDOUT_H
2#define STDOUT_H
3 #include <inttypes.h>
4 #include <limits.h>
5
6 #ifdef STDOUT_put_string
7 void stdout_put_string(void (*putc)(const char c), const char* s);
8 #endif
9
10 #ifdef STDOUT_put_uint
11 static const unsigned int _devisor_two[] =
12 {
13 /// 2147483648, 1073741824, 536870912, 268435456, 134217728, 67108864,
14 /// 33554432, 16777216, 8388608, 4194304, 2097152, 1048576, 524288, 262144,
15 /// 131072, 65536,
16 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64,
17 32, 16, 8, 4, 2, 1
18 };
19 static const unsigned int _devisor_ten[] =
20 {
21 /// 1000000000, 100000000, 10000000, 1000000, 100000,
22 10000, 1000, 100, 10, 1
23 };
24 void stdout_put_uint(void (*putc)(const char c), int n);
25 #endif
26
27 #ifdef STDOUT_put_binary
28 void stdout_put_binary(void (*putc)( const char c), const unsigned char data);
29 #endif
30
31 #ifdef STDOUT_reverse_bits
32 char stdout_reverse_bits(const unsigned char v);
33 #endif
34
35 #ifdef STDOUT_putf
36 #include <stdarg.h>
37 extern void dec_put_char(const char);
38 void stdout_putf(void (*putc)( const char c), const char* format, ...);
39 #endif
40
41#endif
..