GNOME Bugzilla – Bug 563150
G_GU?INT*_MODIFIER/FORMAT docs
Last modified: 2008-12-08 02:12:04 UTC
Glib defines these: #define G_GINT16_MODIFIER #define G_GINT16_FORMAT #define G_GUINT16_FORMAT #define G_GINT32_MODIFIER #define G_GINT32_FORMAT #define G_GUINT32_FORMAT #define G_GINT64_MODIFIER #define G_GINT64_FORMAT #define G_GUINT64_FORMAT #define G_GSIZE_MODIFIER #define G_GSIZE_FORMAT #define G_GSSIZE_FORMAT But these are not linked from gint* docs. I looked for them there, and around docs for g_printf. None helped. Next, the FORMAT docs say they are for scanning and printing, while the MODIFIER docs only say printing. Does it mean they don't work with scanf? That doesn't make much sense as, say, for gint16, printing is automatic and doesn't need any modifier (because int16 is promoted to int), but scanning always needs the right modifier. Currently the docs do not provide any way to correctly read a guint32 from hex. I need this for, say, reading a "U+1234" representation of a gunichar.
Sounds like a good idea to add some cross-references. It may be that only printing is mentioned because we have g_print, but no g_scan.
2008-12-07 Behdad Esfahbod <behdad@gnome.org> Bug 563150 – G_GU?INT*_MODIFIER/FORMAT docs * glib/tmpl/glib-unused.sgml: * glib/tmpl/macros_misc.sgml: * glib/tmpl/types.sgml: Update docs to mention scanning as well as printing. Cross reference these from their respective types.