Wrap columnar tables in "clang-format off/on"

These tables have aligned comments, so we don't want clang-format to
mess with them.
This commit is contained in:
Nick Mathewson
2020-02-06 14:54:04 -05:00
parent 06a6130666
commit 99a5aecbc7
10 changed files with 32 additions and 0 deletions
+6
View File
@@ -21,6 +21,7 @@
/** Table to map the names of memory units to the number of bytes they
* contain. */
// clang-format off
const struct unit_table_t memory_units[] = {
{ "", 1 },
{ "b", 1<< 0 },
@@ -65,9 +66,11 @@ const struct unit_table_t memory_units[] = {
{ "tbit", UINT64_C(1)<<37 },
{ NULL, 0 },
};
// clang-format on
/** Table to map the names of time units to the number of seconds they
* contain. */
// clang-format off
const struct unit_table_t time_units[] = {
{ "", 1 },
{ "second", 1 },
@@ -84,9 +87,11 @@ const struct unit_table_t time_units[] = {
{ "months", 2629728, },
{ NULL, 0 },
};
// clang-format on
/** Table to map the names of time units to the number of milliseconds
* they contain. */
// clang-format off
const struct unit_table_t time_msec_units[] = {
{ "", 1 },
{ "msec", 1 },
@@ -104,6 +109,7 @@ const struct unit_table_t time_msec_units[] = {
{ "weeks", 7*24*60*60*1000 },
{ NULL, 0 },
};
// clang-format on
/** Parse a string <b>val</b> containing a number, zero or more
* spaces, and an optional unit string. If the unit appears in the
+2
View File
@@ -61,6 +61,7 @@ get_uname,(void))
*/
/* Windows Server 2019 is indistinguishable from Windows Server 2016
* using GetVersionEx().
// clang-format off
{ 10, 0, NULL, "Windows Server 2019" }, */
{ 10, 0, "Windows 10", "Windows Server 2016" },
{ 6, 3, "Windows 8.1", "Windows Server 2012 R2" },
@@ -73,6 +74,7 @@ get_uname,(void))
{ 5, 0, "Windows 2000 Professional", "Windows 2000 Server" },
/* Earlier versions are not supported by GetVersionEx(). */
{ 0, 0, NULL, NULL }
// clang-format on
};
memset(&info, 0, sizeof(info));
info.dwOSVersionInfoSize = sizeof(info);