You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/10 08:06:29 UTC
[incubator-nuttx] branch master updated: lib_libvsprintf.c:
Implement "t" modifier for printf
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new f307d99 lib_libvsprintf.c: Implement "t" modifier for printf
f307d99 is described below
commit f307d999e66a2fd3e8da4e647ad7b94021301431
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 10 15:31:01 2020 +0900
lib_libvsprintf.c: Implement "t" modifier for printf
Introduced by C99 for ptrdiff_t.
---
libs/libc/stdio/lib_libvsprintf.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libs/libc/stdio/lib_libvsprintf.c b/libs/libc/stdio/lib_libvsprintf.c
index 6f38a0d..7f147cf 100644
--- a/libs/libc/stdio/lib_libvsprintf.c
+++ b/libs/libc/stdio/lib_libvsprintf.c
@@ -375,7 +375,9 @@ static int vsprintf_internal(FAR struct lib_outstream_s *stream,
}
}
- if (c == 'z')
+ /* Note: On Nuttx, ptrdiff_t == intptr_t == ssize_t. */
+
+ if (c == 'z' || c == 't')
{
switch (sizeof(size_t))
{