diff options
author | Guy Harris <guy@alum.mit.edu> | 2007-05-29 18:59:50 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2007-05-29 18:59:50 +0000 |
commit | 2c1e75d51911c02cbf142602c19405c9ba6050a8 (patch) | |
tree | 972eabf683a1e5c70a46337efd705dc7bb7831ef /doc | |
parent | 5a43799a17572c9a9962dc76fd681a14bb7689de (diff) |
Update to reflect the use of G_GINT64_MODIFIER, rather than PRI[douxX],
with GLib routines and the routines that love them.
svn path=/trunk/; revision=21991
Diffstat (limited to 'doc')
-rw-r--r-- | doc/README.developer | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/doc/README.developer b/doc/README.developer index 8a317cc7c2..3cb73d60fd 100644 --- a/doc/README.developer +++ b/doc/README.developer @@ -126,11 +126,18 @@ unsigned integers. When printing or displaying the values of 64-bit integral data types, don't assume use "%lld", "%llu", "%llx", or "%llo" - not all platforms -support "%ll" for printing 64-bit integral data types. Instead, use -PRId64, PRIu64, PRIx64, and PRIo64, for example +support "%ll" for printing 64-bit integral data types. Instead, for +GLib routines, and routines that use them, such as all the routines in +Wireshark that take format arguments, use G_GINT64_MODIFIER, for example: proto_tree_add_text(tree, tvb, offset, 8, - "Sequence Number: %" PRIu64, sequence_number); + "Sequence Number: %" G_GINT64_MODIFIER "u", + sequence_number); + +When using standard C routines, such as printf and scanf, use +PRId64, PRIu64, PRIx64, PRIX64, and PRIo64, for example: + + printf("Sequence Number: %" PRIu64 "\n", sequence_number); When specifying an integral constant that doesn't fit in 32 bits, don't use "LL" at the end of the constant - not all compilers use "LL" for |