zephyr/tests/lib
Nicolas Pitre 33312cfd98 prf.c: remove buffer limitation on field width and string copy
The z_prf() function currently allocates a 200-byte buffer on the
stack to copy strings into, and then perform left/right alignment
and padding. Not only this is a pretty large chunk of stack usage,
but this imposes limitations on field width and string length. Also
the string is copied not only once but _thrice_ making this code
less than optimal.

Let's rework the code to get rid of both the field width limit and
string length limit, as well as the two extra memory copy instances.

While at it, let's fixes printf("%08s", "abcd") which used to
produce "0000abcd".

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-07-14 23:07:44 -04:00
..
base64 cleanup: include/: move base64.h to sys/base64.h 2019-06-27 22:55:49 -04:00
c_lib tests: clib: Make sure ssize_t type is signed 2019-07-09 21:55:05 +03:00
crc tests: crc: convert to regular test case 2019-07-06 00:31:04 +02:00
json tests: json: improve code coverage 2019-07-02 22:56:53 -04:00
mem_alloc tests: mem_alloc: don't set main thread size 2019-07-01 14:30:48 -07:00
rbtree cleanup: include/: move misc/rb.h to sys/rb.h 2019-06-27 22:55:49 -04:00
ringbuffer cleanup: include/: move ring_buffer.h to sys/ring_buffer.h 2019-06-27 22:55:49 -04:00
sprintf prf.c: remove buffer limitation on field width and string copy 2019-07-14 23:07:44 -04:00