X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=mware%2Fformatwr.c;h=04a50dc8666d587d0cc06d3188c14e8e1f137764;hb=b789df33d4351094e16168425c7f2c20f26965fc;hp=ed52ea291a9a8698fce5ac81a87293a99bd151fc;hpb=0f244fe7278884ce743f51a3215d299b2f1008b8;p=bertos.git diff --git a/mware/formatwr.c b/mware/formatwr.c index ed52ea29..04a50dc8 100755 --- a/mware/formatwr.c +++ b/mware/formatwr.c @@ -53,6 +53,18 @@ /*#* *#* $Log$ + *#* Revision 1.16 2005/07/19 07:25:46 bernie + *#* Use appconfig.h instead of cfg/config.h. + *#* + *#* Revision 1.15 2005/04/11 19:10:28 bernie + *#* Include top-level headers from cfg/ subdir. + *#* + *#* Revision 1.14 2005/03/01 23:26:22 bernie + *#* Use shared hextab. + *#* + *#* Revision 1.13 2005/02/18 12:33:25 bernie + *#* Avoid strlen(). + *#* *#* Revision 1.12 2005/02/16 20:28:03 bernie *#* Add %S formatter. *#* @@ -70,10 +82,10 @@ *#*/ #include "formatwr.h" -#include "pgm.h" -//#include /* progmem macros */ -#include /* CONFIG_ macros */ -#include /* ASSERT */ +#include +#include +#include /* ASSERT */ +#include /* CONFIG_ macros */ #ifndef CONFIG_PRINTF_N_FORMATTER /*! Disable the arcane %n formatter. */ @@ -400,7 +412,7 @@ PGM_FUNC(_formatted_write)(const char * PGM_ATTR format, flags.progmem = false; #endif ptr = buf_pointer = &buf[0]; - hex = "0123456789ABCDEF"; + hex = HEX_tab; /* check for leading '-', '+', ' ','#' or '0' flags */ for (;;) @@ -572,7 +584,7 @@ NEXT_FLAG: precision++; #endif case 'x': - hex = "0123456789abcdef"; + hex = hex_tab; case 'u': case 'p': case 'X': @@ -738,7 +750,7 @@ FLOATING_CONVERSION: default: /* Undefined conversion! */ ptr = buf_pointer = bad_conversion; - ptr += strlen(bad_conversion); + ptr += sizeof(bad_conversion) - 1; break; }