Restore a few macros that were lost in the way.
[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.4  2004/08/04 15:53:47  rasky
16  * Nuove opzioni di configurazione per formatted_write e ridotto maggiormente l'utilizzo dellos tack
17  *
18  * Revision 1.3  2004/07/29 22:57:09  bernie
19  * Add values for new-style CONFIG_PRINTF option.
20  *
21  * Revision 1.2  2004/06/03 11:27:09  bernie
22  * Add dual-license information.
23  *
24  * Revision 1.1  2004/05/23 15:43:16  bernie
25  * Import mware modules.
26  *
27  */
28 #ifndef MWARE_FORMATWR_H
29 #define MWARE_FORMATWR_H
30
31 #include <stdarg.h>
32 #include <config.h>
33
34 /*!
35  * \name _formatted_write() configuration
36  * \{
37  */
38 #define PRINTF_DISABLED    0
39 #define PRINTF_NOMODIFIERS 1
40 #define PRINTF_REDUCED     2
41 #define PRINTF_NOFLOAT     3
42 #define PRINTF_FULL        4
43 /* \} */
44
45 #ifndef CONFIG_PRINTF_RETURN_COUNT
46         /*! Enable/disable _formatted_write return value */
47         #define CONFIG_PRINTF_RETURN_COUNT 1
48 #endif
49
50 int
51 _formatted_write(
52         const char *format,
53         void put_char_func(char c, void *user_data),
54         void *user_data,
55         va_list ap);
56
57 #ifdef __AVR__
58         #include <avr/pgmspace.h>
59         int _formatted_write_P(
60                 const char * PROGMEM format,
61                 void put_char_func(char c, void *user_data),
62                 void *user_data,
63                 va_list ap);
64 #endif /* __AVR__ */
65
66 #endif /* MWARE_FORMATWR_H */
67