From: SourceForge.net <no...@so...> - 2003-05-19 11:09:23
|
Bugs item #739783, was opened at 2003-05-19 17:25 Message generated for change (Comment added) made by pavel_selivanov You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=739783&group_id=599 Category: Run Time Library Group: None Status: Closed Resolution: Rejected Priority: 5 Submitted By: Selivanov Pavel (pavel_selivanov) Assigned to: Bernhard Held (bernhardheld) Summary: Bad implementation of printf_small, which isn't so small... Initial Comment: Problem with printf_small. Someone've made this (since 2.3.0): #if NICE_LIFO_IMPLEMENTATION_BUT_NOT_PORTABLE if (radix) pval(); #else if (radix) { static char data buffer[12], c; _ltoa (val, buffer, radix); str = buffer; while ((c = *str++) != '\0') putchar (c); } #endif It's pretty, but i51 can have only about 128 bytes of RAM, but that realisation of printf uses at least 12+32... Fix it please in next stamp. Fixed version is in the attachment. Sorry if duplicate message. ---------------------------------------------------------------------- >Comment By: Selivanov Pavel (pavel_selivanov) Date: 2003-05-19 18:09 Message: Logged In: YES user_id=780174 > I've done it, but I surely won't revert it. The reason is given > in the source. You are talking "push ar2" and "pop ar2", but on mcs51 asm listing I don't see that problem. The only thing I've asked, is to use pval for mcs51 port with small model instead of _ltoa. > SDCC supplies enough examples (did you already see > printf_fast()?) to tailor your own printf to your needs. Sure, it doesn't work correct with %02X, e.t.c. ..... As long as printf_fast have the same size/functionality as printf_small, I prefer to use C-based printf (at least I can fix it myself at minutes, instead of hours in printf_fast). ---------------------------------------------------------------------- Comment By: Bernhard Held (bernhardheld) Date: 2003-05-19 17:45 Message: Logged In: YES user_id=203539 I've done it, but I surely won't revert it. The reason is given in the source. SDCC supplies enough examples (did you already see printf_fast()?) to tailor your own printf to your needs. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=739783&group_id=599 |