#define G_GINT16_FORMAT "hi"


This is the platform dependent conversion specifier for scanning and printing values of type #gint16. It is a string literal, but doesn’t include the percent-sign, such that you can add precision and length modifiers between percent-sign and conversion specifier.

gint16 in;
gint32 out;
sscanf ("42", "%" G_GINT16_FORMAT, &in)
out = in * 1000;
g_print ("%" G_GINT32_FORMAT, out);

This is not necessarily the correct format for printing and scanning
`int16_t` values, even though the in-memory representation is the same.
Standard C macros like `PRId16` and `SCNd16` should be used for `int16_t`.