|
|
@ -229,12 +229,13 @@ void PrintStringsToBuffer(uint8_t *dst_buf, uint32_t *dst_buf_offset_ptr, uint32
|
|
|
|
const uint8_t *src_buf, const uint32_t src_buf_len)
|
|
|
|
const uint8_t *src_buf, const uint32_t src_buf_len)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32_t ch = 0;
|
|
|
|
uint32_t ch = 0;
|
|
|
|
for (ch = 0; ch < src_buf_len; ch++) {
|
|
|
|
for (ch = 0; ch < src_buf_len && *dst_buf_offset_ptr < dst_buf_size;
|
|
|
|
PrintBufferData((char *)dst_buf, dst_buf_offset_ptr, dst_buf_size,
|
|
|
|
ch++, (*dst_buf_offset_ptr)++) {
|
|
|
|
"%c",
|
|
|
|
if (isprint((uint8_t)src_buf[ch]) || src_buf[ch] == '\n' || src_buf[ch] == '\r') {
|
|
|
|
(isprint((uint8_t)src_buf[ch]) ||
|
|
|
|
dst_buf[*dst_buf_offset_ptr] = src_buf[ch];
|
|
|
|
src_buf[ch] == '\n' ||
|
|
|
|
} else {
|
|
|
|
src_buf[ch] == '\r') ? (uint8_t)src_buf[ch] : '.');
|
|
|
|
dst_buf[*dst_buf_offset_ptr] = '.';
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
dst_buf[dst_buf_size - 1] = 0;
|
|
|
|
dst_buf[dst_buf_size - 1] = 0;
|
|
|
|
|
|
|
|
|
|
|
|