3 /*******************************************************************************/
4 /* Copyright (c) 2001-2013 by Tensilica Inc. ALL RIGHTS RESERVED. */
5 /* These coded instructions, statements, and computer programs are the */
6 /* copyrighted works and confidential proprietary information of Tensilica Inc.*/
7 /* They may not be modified, copied, reproduced, distributed, or disclosed to */
8 /* third parties in any manner, medium, or form, in whole or in part, without */
9 /* the prior written consent of Tensilica Inc. */
10 /*******************************************************************************/
21 extern int xt_putchar(int c);
22 extern int xt_puts(const char * s);
23 extern void xt_putn(unsigned n);
24 extern int xt_atoi(const char * s);
25 extern int xt_printf(const char *fmt, ...);
26 extern int xt_sprintf(char * buf, const char * fmt, ...);
28 typedef int xt_output_fn(int *, int, const void *, int);
29 extern xt_output_fn * xt_set_output_fn(xt_output_fn * fn);
33 // Only defined if building library
35 typedef void (xt_outbuf_fn)(void *, char *, int);
37 extern int xt_vprintf(xt_outbuf_fn * out, void * outarg, const char * fmt, va_list ap);
41 // Only defined if building application and overriding
43 #ifndef XTUTIL_NO_OVERRIDE
45 #define putchar xt_putchar
49 #define printf xt_printf
50 #define sprintf xt_sprintf
52 #endif // XTUTIL_NO_OVERRIDE