projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* device/lib/_ltoa.c: 36 bytes less __data mem. This really helps printf_small. 32...
[fw/sdcc]
/
device
/
lib
/
printf_large.c
diff --git
a/device/lib/printf_large.c
b/device/lib/printf_large.c
index cb469b6117e08b3096f323f7310c3898c0d25c7a..f7be3aadd7ba43c0de906922939905e2b1de9af5 100644
(file)
--- a/
device/lib/printf_large.c
+++ b/
device/lib/printf_large.c
@@
-42,6
+42,14
@@
#define NULL_STRING_LENGTH 6
#endif
#define NULL_STRING_LENGTH 6
#endif
+#if defined (SDCC_mcs51) && defined (SDCC_MODEL_SMALL) && !defined (SDCC_STACK_AUTO)
+# define MEM_SPACE_BUF __idata
+# define MEM_SPACE_BUF_PP __idata
+#else
+# define MEM_SPACE_BUF
+# define MEM_SPACE_BUF_PP _AUTOMEM
+#endif
+
/****************************************************************************/
//typedef char * ptr_t;
/****************************************************************************/
//typedef char * ptr_t;
@@
-223,7
+231,7
@@
output_float (float f, unsigned char reqWidth,
signed char reqDecimals,
BOOL left, BOOL zero, BOOL sign, BOOL space)
{
signed char reqDecimals,
BOOL left, BOOL zero, BOOL sign, BOOL space)
{
- xdata char fpBuffer[128];
+
__
xdata char fpBuffer[128];
#endif //SDCC_STACK_AUTO
BOOL negative = 0;
unsigned long integerPart;
#endif //SDCC_STACK_AUTO
BOOL negative = 0;
unsigned long integerPart;
@@
-470,7
+478,7
@@
get_conversion_spec:
}
if (c=='.') {
}
if (c=='.') {
- if (decimals=-1) decimals=0;
+ if (decimals=
=
-1) decimals=0;
else
; // duplicate, ignore
goto get_conversion_spec;
else
; // duplicate, ignore
goto get_conversion_spec;
@@
-657,10
+665,10
@@
get_conversion_spec:
#endif //USE_FLOATS
} else if (radix != 0)
{
#endif //USE_FLOATS
} else if (radix != 0)
{
- // App
e
rently we have to output an integral type
+ // App
a
rently we have to output an integral type
// with radix "radix"
// with radix "radix"
- unsigned char store[6];
- unsigned char
_AUTOMEM
*pstore = &store[5];
+ unsigned char
MEM_SPACE_BUF
store[6];
+ unsigned char
MEM_SPACE_BUF_PP
*pstore = &store[5];
// store value in byte[0] (LSB) ... byte[3] (MSB)
if (char_argument)
// store value in byte[0] (LSB) ... byte[3] (MSB)
if (char_argument)