1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-15 04:15:26 +03:00
This commit is contained in:
Bertrand Songis 2016-02-01 20:30:52 +01:00
parent 7d0f5a9d9b
commit fda4cac1ed
16 changed files with 106 additions and 84 deletions

View file

@ -145,7 +145,7 @@ char * strcat_zchar(char * dest, const char * name, uint8_t size, const char * d
#endif
#endif
char * strAppendNumber(char * dest, unsigned int value, uint8_t digits, uint8_t radix)
char * strAppendUnsigned(char * dest, uint32_t value, uint8_t digits, uint8_t radix)
{
if (digits == 0) {
unsigned int tmp = value;
@ -165,6 +165,15 @@ char * strAppendNumber(char * dest, unsigned int value, uint8_t digits, uint8_t
return &dest[digits];
}
char * strAppendSigned(char * dest, int32_t value, uint8_t digits, uint8_t radix)
{
if (value < 0) {
*dest++ = '-';
value = -value;
}
return strAppendUnsigned(dest, (uint32_t)value, digits, radix);
}
#if defined(CPUARM) || defined(SDCARD)
char * strAppend(char * dest, const char * source, int len)
{