# HG changeset patch # User Augie Fackler # Date 1518449819 18000 # Node ID 81199632fa42eb97fef20e5cdbb15816a4591766 # Parent 7f8338b87c8809da5ab80b838b30b4e3beabf91c charencode: adjust clang-format enable/disable comments We're pretty close to being able to let clang-format manage most of these files. Differential Revision: https://phab.mercurial-scm.org/D2180 diff -r 7f8338b87c88 -r 81199632fa42 mercurial/cext/charencode.c --- a/mercurial/cext/charencode.c Mon Feb 12 10:31:17 2018 -0500 +++ b/mercurial/cext/charencode.c Mon Feb 12 10:36:59 2018 -0500 @@ -65,7 +65,6 @@ '\x58', '\x59', '\x5a', /* x-z */ '\x7b', '\x7c', '\x7d', '\x7e', '\x7f' }; -/* clang-format on */ /* 1: no escape, 2: \, 6: \u */ static const uint8_t jsonlentable[256] = { @@ -102,6 +101,7 @@ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', }; +/* clang-format on */ /* * Turn a hex-encoded string into binary. diff -r 7f8338b87c88 -r 81199632fa42 mercurial/cext/charencode.h --- a/mercurial/cext/charencode.h Mon Feb 12 10:31:17 2018 -0500 +++ b/mercurial/cext/charencode.h Mon Feb 12 10:36:59 2018 -0500 @@ -25,6 +25,7 @@ PyObject *make_file_foldmap(PyObject *self, PyObject *args); PyObject *jsonescapeu8fast(PyObject *self, PyObject *args); +/* clang-format off */ static const int8_t hextable[256] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -43,6 +44,7 @@ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; +/* clang-format on */ static inline int hexdigit(const char *p, Py_ssize_t off) {