#define SCNd16 "d" 

decimal scanf format for int16_t