chiark / gitweb /
string-table: add new DUMP_STRING_TABLE() macro
authorLennart Poettering <lennart@poettering.net>
Tue, 22 May 2018 10:06:54 +0000 (12:06 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
commitb670ce104933b9aa240eb06089dae9962cf938e3
treed9d424cf32256e4a8859de4be82280144ea17213
parentf313a958abd17a56a09ae76dff59c75dcfdf233a
string-table: add new DUMP_STRING_TABLE() macro

The macro is inspired by the other string table macros, and takes the
same arguments in the same order and dumps a string table to stdout.
Since it's typesafe it's nice to implement this as macro rather than
regular function.

This new macro is useful for implementing commands such as "systemctl -t
help" and similar, i.e. wherever we want to dump all values of an enum
to stdout.
src/basic/string-table.h