diff --git a/inc/inttypes.h b/inc/inttypes.h index 2fa7526..a60e0fc 100644 --- a/inc/inttypes.h +++ b/inc/inttypes.h @@ -169,4 +169,73 @@ #define PRIXPTR _specptr "X" #define PRIXMAX _specmax "X" -// TODO: scan formats for signed and unsigned integers +#define SCNd8 _spec8 "d" +#define SCNd16 _spec16 "d" +#define SCNd32 _spec32 "d" +#define SCNd64 _spec64 "d" +#define SCNdFAST8 _spec8f "d" +#define SCNdFAST16 _spec16f "d" +#define SCNdFAST32 _spec32f "d" +#define SCNdFAST64 _spec64f "d" +#define SCNdLEAST8 _spec8l "d" +#define SCNdLEAST16 _spec16l "d" +#define SCNdLEAST32 _spec32l "d" +#define SCNdLEAST64 _spec64l "d" +#define SCNdPTR _specptr "d" +#define SCNdMAX _specmax "d" +#define SCNi8 _spec8 "i" +#define SCNi16 _spec16 "i" +#define SCNi32 _spec32 "i" +#define SCNi64 _spec64 "i" +#define SCNiFAST8 _spec8f "i" +#define SCNiFAST16 _spec16f "i" +#define SCNiFAST32 _spec32f "i" +#define SCNiFAST64 _spec64f "i" +#define SCNiLEAST8 _spec8l "i" +#define SCNiLEAST16 _spec16l "i" +#define SCNiLEAST32 _spec32l "i" +#define SCNiLEAST64 _spec64l "i" +#define SCNiPTR _specptr "i" +#define SCNiMAX _specmax "i" +#define SCNo8 _spec8 "o" +#define SCNo16 _spec16 "o" +#define SCNo32 _spec16 "o" +#define SCNo64 _spec64 "o" +#define SCNoLEAST8 _spec8l "o" +#define SCNoLEAST16 _spec16l "o" +#define SCNoLEAST32 _spec32l "o" +#define SCNoLEAST64 _spec64l "o" +#define SCNoFAST8 _spec8f "o" +#define SCNoFAST16 _spec16f "o" +#define SCNoFAST32 _spec32f "o" +#define SCNoFAST64 _spec64f "o" +#define SCNoPTR _specptr "o" +#define SCNoMAX _specmax "o" +#define SCNu8 _spec8 "u" +#define SCNu16 _spec16 "u" +#define SCNu32 _spec16 "u" +#define SCNu64 _spec64 "u" +#define SCNuLEAST8 _spec8l "u" +#define SCNuLEAST16 _spec16l "u" +#define SCNuLEAST32 _spec32l "u" +#define SCNuLEAST64 _spec64l "u" +#define SCNuFAST8 _spec8f "u" +#define SCNuFAST16 _spec16f "u" +#define SCNuFAST32 _spec32f "u" +#define SCNuFAST64 _spec64f "u" +#define SCNuPTR _specptr "u" +#define SCNuMAX _specmax "u" +#define SCNx8 _spec8 "x" +#define SCNx16 _spec16 "x" +#define SCNx32 _spec32 "x" +#define SCNx64 _spec64 "x" +#define SCNxLEAST8 _spec8l "x" +#define SCNxLEAST16 _spec16l "x" +#define SCNxLEAST32 _spec32l "x" +#define SCNxLEAST64 _spec64l "x" +#define SCNxFAST8 _spec8f "x" +#define SCNxFAST16 _spec16f "x" +#define SCNxFAST32 _spec32f "x" +#define SCNxFAST64 _spec64f "x" +#define SCNxPTR _specptr "x" +#define SCNxMAX _specmax "x"