From: Matthew Fernandez Date: Sun, 21 Aug 2022 02:15:57 +0000 (-0700) Subject: cgraph: Doxygen-ize and further explain 'PRISIZE_T' X-Git-Tag: 6.0.1~29^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=466d1810e2c391a59724db7c6d3dd571089a469f;p=graphviz cgraph: Doxygen-ize and further explain 'PRISIZE_T' --- diff --git a/lib/cgraph/prisize_t.h b/lib/cgraph/prisize_t.h index a19c8ef13..8cf4b25bc 100644 --- a/lib/cgraph/prisize_t.h +++ b/lib/cgraph/prisize_t.h @@ -1,6 +1,19 @@ #pragma once -// `PRIu64`-alike for printing size_t +/// \brief \p PRIu64 alike for printing \p size_t +/// +/// Use this as: +/// +/// \code{.c} +/// size_t value = 42; +/// printf("value is %" PRISIZE_T ".", value); +/// // prints “value is 42.” +/// \endcode +/// +/// Note that leaving a space on either side of \p PRISIZE_T does not seem +/// relevant in C, but if you omit this in C++ it will be interpreted as a +/// user-defined string literal indicator. So it is best to always use a space +/// on either side. #ifdef __MINGW64__ // Microsoft’s Visual C Runtime (msvcrt) ships a printf that does not // understand "%zu". MSVC itself uses a different printf that does not rely on