avr-libc %.*s workaround

This commit is contained in:
David Kopf 2011-08-03 11:10:26 -04:00
parent 44f4ee9315
commit e953b66f78

View File

@ -67,7 +67,14 @@ shell_default_output(const char *text1, int len1, const char *text2, int len2)
text2 = "";
len2 = 0;
}
printf("%.*s%.*s\r\n", len1, text1, len2, text2);
/* Workaround for absence of "%.*s" format in avr-libc */
#if defined (__AVR__)
printf("%s%s\r\n", text1, text2);
#else
*printf("%.*s%.*s\r\n", len1, text1, len2, text2);
#endif
}
/*---------------------------------------------------------------------------*/
void