projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reimplement ser_clearstatus as a macro.
[bertos.git]
/
mware
/
formatwr.c
diff --git
a/mware/formatwr.c
b/mware/formatwr.c
index 8a2e57e1af027e61a51639bd8e1bca650dcbd548..f8df352ee8523394bffa2cdf87b9a55069b7f42f 100755
(executable)
--- a/
mware/formatwr.c
+++ b/
mware/formatwr.c
@@
-1,4
+1,4
@@
-/*
!
+/*
*
* \file
* <!--
* Copyright 2003, 2004, 2005 Develer S.r.l. (http://www.develer.com/)
* \file
* <!--
* Copyright 2003, 2004, 2005 Develer S.r.l. (http://www.develer.com/)
@@
-53,6
+53,12
@@
/*#*
*#* $Log$
/*#*
*#* $Log$
+ *#* Revision 1.19 2006/09/20 13:58:17 marco
+ *#* Added z modifier in string format.
+ *#*
+ *#* Revision 1.18 2006/07/19 12:56:27 bernie
+ *#* Convert to new Doxygen style.
+ *#*
*#* Revision 1.17 2005/11/04 17:43:27 bernie
*#* Fix for LP64 architectures; Add some more tests.
*#*
*#* Revision 1.17 2005/11/04 17:43:27 bernie
*#* Fix for LP64 architectures; Add some more tests.
*#*
@@
-91,12
+97,12
@@
#include <appconfig.h> /* CONFIG_ macros */
#ifndef CONFIG_PRINTF_N_FORMATTER
#include <appconfig.h> /* CONFIG_ macros */
#ifndef CONFIG_PRINTF_N_FORMATTER
- /*
!
Disable the arcane %n formatter. */
+ /*
*
Disable the arcane %n formatter. */
#define CONFIG_PRINTF_N_FORMATTER 0
#endif
#ifndef CONFIG_PRINTF_OCTAL_FORMATTER
#define CONFIG_PRINTF_N_FORMATTER 0
#endif
#ifndef CONFIG_PRINTF_OCTAL_FORMATTER
- /*
!
Disable the %o formatter. */
+ /*
*
Disable the %o formatter. */
#define CONFIG_PRINTF_OCTAL_FORMATTER 0
#endif
#define CONFIG_PRINTF_OCTAL_FORMATTER 0
#endif
@@
-320,7
+326,7
@@
CLEAN_UP:
#endif /* CONFIG_PRINTF > PRINTF_NOFLOAT */
#endif /* CONFIG_PRINTF > PRINTF_NOFLOAT */
-/*
!
+/*
*
* This routine forms the core and entry of the formatter.
*
* The conversion performed conforms to the ANSI specification for "printf".
* This routine forms the core and entry of the formatter.
*
* The conversion performed conforms to the ANSI specification for "printf".
@@
-495,11
+501,12
@@
NEXT_FLAG:
flags.l_L_modifier = false;
flags.h_modifier = false;
flags.l_L_modifier = false;
flags.h_modifier = false;
- /* Optional 'l','L'
r 'h' modifier? */
+ /* Optional 'l','L'
,'z' o
r 'h' modifier? */
switch (PGM_READ_CHAR(format))
{
case 'l':
case 'L':
switch (PGM_READ_CHAR(format))
{
case 'l':
case 'L':
+ case 'z':
flags.l_L_modifier = true;
format++;
break;
flags.l_L_modifier = true;
format++;
break;
@@
-817,7
+824,7
@@
FLOATING_CONVERSION:
#else /* PRINTF_REDUCED starts here */
#if CONFIG_PRINTF > PRINTF_NOMODIFIERS
#else /* PRINTF_REDUCED starts here */
#if CONFIG_PRINTF > PRINTF_NOMODIFIERS
-
char
l_modifier, h_modifier;
+
bool
l_modifier, h_modifier;
unsigned long u_val, div_val;
#else
unsigned int u_val, div_val;
unsigned long u_val, div_val;
#else
unsigned int u_val, div_val;
@@
-843,16
+850,16
@@
FLOATING_CONVERSION:
/*=================================*/
/* Optional 'l' or 'h' modifiers ? */
/*=================================*/
/*=================================*/
/* Optional 'l' or 'h' modifiers ? */
/*=================================*/
- l_modifier = h_modifier =
0
;
+ l_modifier = h_modifier =
false
;
switch (PGM_READ_CHAR(format))
{
case 'l':
switch (PGM_READ_CHAR(format))
{
case 'l':
- l_modifier =
1
;
+ l_modifier =
true
;
format++;
break;
case 'h':
format++;
break;
case 'h':
- h_modifier =
1
;
+ h_modifier =
true
;
format++;
break;
}
format++;
break;
}