summaryrefslogtreecommitdiff
path: root/uisimulator/common/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/common/io.c')
-rw-r--r--uisimulator/common/io.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/uisimulator/common/io.c b/uisimulator/common/io.c
index 02542d15e3..1df36d3b34 100644
--- a/uisimulator/common/io.c
+++ b/uisimulator/common/io.c
@@ -608,46 +608,6 @@ void lc_close(void *handle)
608} 608}
609 609
610#endif /* __PCTOOL__ */ 610#endif /* __PCTOOL__ */
611#ifdef WIN32
612static unsigned old_cp;
613
614void debug_exit(void)
615{
616 /* Reset console output codepage */
617 SetConsoleOutputCP(old_cp);
618}
619
620void debug_init(void)
621{
622 old_cp = GetConsoleOutputCP();
623 /* Set console output codepage to UTF8. Only works
624 * correctly when the console uses a truetype font. */
625 SetConsoleOutputCP(65001);
626 atexit(debug_exit);
627}
628#else
629void debug_init(void)
630{
631 /* nothing to be done */
632}
633#endif
634
635void debugf(const char *fmt, ...)
636{
637 va_list ap;
638 va_start( ap, fmt );
639 vfprintf( stderr, fmt, ap );
640 va_end( ap );
641}
642
643void ldebugf(const char* file, int line, const char *fmt, ...)
644{
645 va_list ap;
646 va_start( ap, fmt );
647 fprintf( stderr, "%s:%d ", file, line );
648 vfprintf( stderr, fmt, ap );
649 va_end( ap );
650}
651 611
652/* rockbox off_t may be different from system off_t */ 612/* rockbox off_t may be different from system off_t */
653int sim_ftruncate(int fd, long length) 613int sim_ftruncate(int fd, long length)