Aggiornato il comment block dei log RCS
[bertos.git] / mware / formatwr.h
1 /*!
2  * \file
3  * <!--
4  * Copyright 2003, 2004 Develer S.r.l. (http://www.develer.com/)
5  * This file is part of DevLib - See devlib/README for information.
6  * -->
7  *
8  * \version $Id$
9  *
10  * \brief Basic "printf", "sprintf" and "fprintf" formatter.
11  */
12
13 /*#*
14  *#* $Log$
15  *#* Revision 1.5  2004/08/25 14:12:09  rasky
16  *#* Aggiornato il comment block dei log RCS
17  *#*
18  *#* Revision 1.4  2004/08/04 15:53:47  rasky
19  *#* Nuove opzioni di configurazione per formatted_write e ridotto maggiormente l'utilizzo dellos tack
20  *#*
21  *#* Revision 1.3  2004/07/29 22:57:09  bernie
22  *#* Add values for new-style CONFIG_PRINTF option.
23  *#*
24  *#* Revision 1.2  2004/06/03 11:27:09  bernie
25  *#* Add dual-license information.
26  *#*
27  *#* Revision 1.1  2004/05/23 15:43:16  bernie
28  *#* Import mware modules.
29  *#*
30  *#*/
31 #ifndef MWARE_FORMATWR_H
32 #define MWARE_FORMATWR_H
33
34 #include <stdarg.h>
35 #include <config.h>
36
37 /*!
38  * \name _formatted_write() configuration
39  * \{
40  */
41 #define PRINTF_DISABLED    0
42 #define PRINTF_NOMODIFIERS 1
43 #define PRINTF_REDUCED     2
44 #define PRINTF_NOFLOAT     3
45 #define PRINTF_FULL        4
46 /* \} */
47
48 #ifndef CONFIG_PRINTF_RETURN_COUNT
49         /*! Enable/disable _formatted_write return value */
50         #define CONFIG_PRINTF_RETURN_COUNT 1
51 #endif
52
53 int
54 _formatted_write(
55         const char *format,
56         void put_char_func(char c, void *user_data),
57         void *user_data,
58         va_list ap);
59
60 #ifdef __AVR__
61         #include <avr/pgmspace.h>
62         int _formatted_write_P(
63                 const char * PROGMEM format,
64                 void put_char_func(char c, void *user_data),
65                 void *user_data,
66                 va_list ap);
67 #endif /* __AVR__ */
68
69 #endif /* MWARE_FORMATWR_H */
70