Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/libc/include/inttypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@
#define PRIxLEAST16 __UINT_LEAST16_FMTx__
#define PRIXLEAST16 __UINT_LEAST16_FMTX__

#ifdef __INT24_TYPE__
#define PRId24 __INT24_FMTd__
#define PRIi24 __INT24_FMTi__
#define PRIo24 __UINT24_FMTo__
#define PRIu24 __UINT24_FMTu__
#define PRIx24 __UINT24_FMTx__
#define PRIX24 __UINT24_FMTX__
#endif /*__INT24_TYPE_*/

#define PRId32 __INT32_FMTd__
#define PRIi32 __INT32_FMTi__
#define PRIo32 __UINT32_FMTo__
Expand Down Expand Up @@ -126,6 +135,14 @@
#define SCNuLEAST16 __UINT_LEAST16_FMTu__
#define SCNxLEAST16 __UINT_LEAST16_FMTx__

#ifdef __INT24_TYPE__
#define SCNd24 __INT24_FMTd__
#define SCNi24 __INT24_FMTi__
#define SCNo24 __UINT24_FMTo__
#define SCNu24 __UINT24_FMTu__
#define SCNx24 __UINT24_FMTx__
#endif /*__INT24_TYPE_*/

#define SCNd32 __INT32_FMTd__
#define SCNi32 __INT32_FMTi__
#define SCNo32 __UINT32_FMTo__
Expand Down
10 changes: 9 additions & 1 deletion src/libc/include/stdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ int asprintf(char **__restrict p_buffer, const char *__restrict format, ...)
int vasprintf(char **__restrict p_buffer, const char *__restrict format, va_list va)
__attribute__((format(__printf__, 2, 0))) __attribute__((nonnull(1)));

int sscanf(const char *__restrict buffer, const char *__restrict format, ...)
__attribute__((format(__scanf__, 2, 3)));

int vsscanf(const char *__restrict buffer, const char *__restrict format, va_list va)
__attribute__((format(__scanf__, 2, 0)));

void perror(const char *str);

__END_DECLS
Expand All @@ -121,7 +127,7 @@ __END_DECLS
namespace std {
using ::size_t;
using ::FILE;

using ::fopen;
using ::fclose;
using ::fflush;
Expand Down Expand Up @@ -151,6 +157,8 @@ namespace std {
using ::vfprintf;
using ::asprintf;
using ::vasprintf;
using ::sscanf;
using ::vsscanf;
using ::perror;
} /* namespace std */
#endif /* __cplusplus */
Expand Down
Loading
Loading