Hi Branden! Here's a patch set for using the gnulib stdcountof-h module, which implements the countof() macro, which was standardized for C2y recently --together with the _Countof operator which it wraps-- (after a proposal of mine; plus a lengthy war for the name).
See also: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3550.pdf#subsubsection.0.6.5.4.5> <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3550.pdf#section.0.7.21> <https://thephd.dev/the-big-array-size-survey-for-c> <https://thephd.dev/the-big-array-size-survey-for-c-results> Have a lovely day! Alex Alejandro Colomar (2): bootstrap.conf: Add stdcountof-h to `gnulib_modules`. src/: Use countof() instead of a sizeof division bootstrap.conf | 1 + src/devices/grolbp/lbp.cpp | 3 ++- src/devices/grolj4/lj4.cpp | 4 ++-- src/libs/libgroff/font.cpp | 4 ++-- src/libs/libgroff/uniglyph.cpp | 6 +++--- src/preproc/eqn/delim.cpp | 9 +++++---- src/preproc/eqn/lex.cpp | 10 ++++++---- src/preproc/eqn/text.cpp | 6 +++--- src/preproc/pic/lex.cpp | 3 ++- src/preproc/preconv/preconv.cpp | 6 +++--- src/preproc/refer/command.cpp | 5 +++-- src/preproc/refer/ref.cpp | 4 +++- src/utils/addftinfo/addftinfo.cpp | 6 +++--- src/utils/hpftodit/hpftodit.cpp | 6 +++--- src/utils/hpftodit/hpuni.cpp | 6 +++--- src/utils/tfmtodit/tfmtodit.cpp | 9 ++++----- 16 files changed, 48 insertions(+), 40 deletions(-) Range-diff against v0: -: --------- > 1: 0887da7bb bootstrap.conf: Add stdcountof-h to `gnulib_modules`. -: --------- > 2: beba4b4d5 src/: Use countof() instead of a sizeof division base-commit: f3a5d098416ecf9164f048c8abef6bc4ae52cbcd -- 2.50.0