projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update i2c cfg file.
[bertos.git]
/
bertos
/
mware
/
formatwr.c
diff --git
a/bertos/mware/formatwr.c
b/bertos/mware/formatwr.c
index 5b2323d84a87eb432869fa0c48272099ebb799d9..c0a82298c53a565b80ef02c665dde3c4fe174090 100644
(file)
--- a/
bertos/mware/formatwr.c
+++ b/
bertos/mware/formatwr.c
@@
-30,7
+30,6
@@
*
* -->
*
*
* -->
*
- * \version $Id$
*
* \brief Basic "printf", "sprintf" and "fprintf" formatter.
*
*
* \brief Basic "printf", "sprintf" and "fprintf" formatter.
*
@@
-106,7
+105,6
@@
/* Maximum precision for floating point values */
typedef long double max_float_t;
/* Maximum precision for floating point values */
typedef long double max_float_t;
- #warning FIXME: be sure to fix buffer size below
#if CONFIG_FRMWRI_BUFSIZE
#define FRMWRI_BUFSIZE CONFIG_FRMWRI_BUFSIZE
#else
#if CONFIG_FRMWRI_BUFSIZE
#define FRMWRI_BUFSIZE CONFIG_FRMWRI_BUFSIZE
#else
@@
-114,7
+112,7
@@
* space for: sign + all 38 digits + '.' + 6 decimal digits (default)
* Use a high value to avoid unexpected buffer overflows.
*/
* space for: sign + all 38 digits + '.' + 6 decimal digits (default)
* Use a high value to avoid unexpected buffer overflows.
*/
- #define FRMWRI_BUFSIZE 1
00
+ #define FRMWRI_BUFSIZE 1
34
#endif
#else
#if CONFIG_FRMWRI_BUFSIZE
#endif
#else
#if CONFIG_FRMWRI_BUFSIZE
@@
-506,14
+504,21
@@
NEXT_FLAG:
{
case 'l':
case 'L':
{
case 'l':
case 'L':
+ #if SIZEOF_SIZE_T == SIZEOF_LONG
case 'z':
flags.l_L_modifier = true;
case 'z':
flags.l_L_modifier = true;
+ #elif SIZEOF_SIZE_T == SIZEOF_INT
+ flags.l_L_modifier = true;
+ case 'z':
+ #endif
format++;
break;
format++;
break;
+
case 'h':
flags.h_modifier = true;
format++;
break;
case 'h':
flags.h_modifier = true;
format++;
break;
+
}
/*
}
/*
@@
-854,10
+859,13
@@
FLOATING_CONVERSION:
switch (PGM_READ_CHAR(format))
{
case 'l':
switch (PGM_READ_CHAR(format))
{
case 'l':
+ #if SIZEOF_SIZE_T == SIZEOF_LONG
case 'z':
case 'z':
- /* for the 'z' modifier, we make this assumption */
- STATIC_ASSERT(sizeof(size_t) == sizeof(long));
l_modifier = true;
l_modifier = true;
+ #elif SIZEOF_SIZE_T == SIZEOF_INT
+ l_modifier = true;
+ case 'z':
+ #endif
format++;
break;
format++;
break;