mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-02-06 00:45:22 +08:00
[klibc] add rt_sscanf
cherry-pick from: https://github.com/PetteriAimonen/Baselibc/blob/master/src/vsscanf.c BSD license
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#define __RT_KERRNO_H__
|
||||
|
||||
#include <rtconfig.h>
|
||||
#include <rttypes.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
#ifndef __RT_KSTDIO_H__
|
||||
#define __RT_KSTDIO_H__
|
||||
|
||||
#include <rttypes.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -19,6 +22,8 @@ int rt_vsprintf(char *dest, const char *format, va_list arg_ptr);
|
||||
int rt_vsnprintf(char *buf, rt_size_t size, const char *fmt, va_list args);
|
||||
int rt_sprintf(char *buf, const char *format, ...);
|
||||
int rt_snprintf(char *buf, rt_size_t size, const char *format, ...);
|
||||
int rt_vsscanf(const char *buffer, const char *format, va_list ap);
|
||||
int rt_sscanf(const char *str, const char *format, ...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
#ifndef __RT_KSTRING_H__
|
||||
#define __RT_KSTRING_H__
|
||||
|
||||
#include <rttypes.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -19,6 +21,7 @@ void *rt_memset(void *src, int c, rt_ubase_t n);
|
||||
void *rt_memcpy(void *dest, const void *src, rt_ubase_t n);
|
||||
void *rt_memmove(void *dest, const void *src, rt_size_t n);
|
||||
rt_int32_t rt_memcmp(const void *cs, const void *ct, rt_size_t count);
|
||||
|
||||
char *rt_strdup(const char *s);
|
||||
rt_size_t rt_strnlen(const char *s, rt_ubase_t maxlen);
|
||||
char *rt_strstr(const char *str1, const char *str2);
|
||||
|
||||
Reference in New Issue
Block a user