Commit Graph

10 Commits

Author SHA1 Message Date
Arve Hjønnevåg
bf5587d41a [lib][libc] Allow overriding __stdio_FILEs
Change-Id: Id5e62858c4fae72e5c1e1044885720e6ad3d3ab5
2017-05-14 19:11:22 -07:00
Travis Geiselbrecht
c75ca2aa09 [lib][libc] move the io function dispatch into a new handle out of FILE *
Create io_handle_t and have the FILE * simply point to it. This should
help decouple the libc implementation from how the console actually works.
2016-02-07 16:05:46 -08:00
Travis Geiselbrecht
a7496980c0 [lib][stdio] fix the build after -fbuiltin and io changes 2016-02-07 16:05:46 -08:00
Travis Geiselbrecht
15dc85c218 [lib][libc] rearrange the io stack a bit and move code out of lib/debug into libc
Some of the output routines were a bit convoluted, so move the stack of code
dealing with outputting to the console into a new file in libc, io.c.
2016-02-07 16:05:46 -08:00
Travis Geiselbrecht
343a24bcab [lib][libc] simplify the stdio call stack a bit and output via a single write call 2016-02-07 16:05:11 -08:00
Travis Geiselbrecht
a2f02251e5 [lib][libc] mass reformat with space indents
Ran files through ./script/codestyle.space
2015-11-17 14:22:03 -08:00
Dima Zavin
60014a9881 [libc] add fprintf/vfprintf
Change-Id: Ibc0fe656295cb97f8839d6fbae7682a57bc395e1
Signed-off-by: Dima Zavin <dima@android.com>
2013-08-05 10:04:29 -07:00
Dima Zavin
6150422ff5 [lib][stdio] implement a real FILE backing stdio descriptors
Allows different implementations of FILE handling to be provided.
Make lib/debug provide the default implementation for
stdin/stdout/stderr.

Change-Id: Icd9d30ac44884648603e91cfca856912bca1c0d3
Signed-off-by: Dima Zavin <dima@android.com>
2013-08-05 10:04:29 -07:00
Dima Zavin
36c7735533 [libc][stdio] cleanup printf definition and clients
Move implementation to stdio.c to sit next to the other
stdio definitions that use the debug output functions. Keep
the declaration of it, though, in printf.h to sit next to
sprintf, etc.

Don't include printf.h directly in other places, rely on stdio.h
to properly pull in these functions.

Change-Id: I357cb04a5c78185b8fde908193b672326c2ee542
Signed-off-by: Dima Zavin <dima@android.com>
2013-08-05 10:04:29 -07:00
Travis Geiselbrecht
df8b371ed9 [libc] tweak stdio routines to be a bit more standard
change getc/putc/getchar/putchar style routines to take a fake
FILE pointer.
Move log2 to log2_uint to not collide with stdc log2()
2013-05-24 20:48:48 -07:00