durin42 updated this revision to Diff 5749.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2182?vs=5492&id=5749

REVISION DETAIL
  https://phab.mercurial-scm.org/D2182

AFFECTED FILES
  contrib/clang-format-blacklist
  mercurial/cext/base85.c

CHANGE DETAILS

diff --git a/mercurial/cext/base85.c b/mercurial/cext/base85.c
--- a/mercurial/cext/base85.c
+++ b/mercurial/cext/base85.c
@@ -14,8 +14,9 @@
 
 #include "util.h"
 
-static const char b85chars[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-       "abcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~";
+static const char b85chars[] =
+    "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+    "abcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~";
 static char b85dec[256];
 
 static void b85prep(void)
@@ -105,25 +106,25 @@
                        c = b85dec[(int)*text++] - 1;
                        if (c < 0)
                                return PyErr_Format(
-                                       PyExc_ValueError,
-                                       "bad base85 character at position %d",
-                                       (int)i);
+                                   PyExc_ValueError,
+                                   "bad base85 character at position %d",
+                                   (int)i);
                        acc = acc * 85 + c;
                }
                if (i++ < len) {
                        c = b85dec[(int)*text++] - 1;
                        if (c < 0)
                                return PyErr_Format(
-                                       PyExc_ValueError,
-                                       "bad base85 character at position %d",
-                                       (int)i);
+                                   PyExc_ValueError,
+                                   "bad base85 character at position %d",
+                                   (int)i);
                        /* overflow detection: 0xffffffff == "|NsC0",
                         * "|NsC" == 0x03030303 */
                        if (acc > 0x03030303 || (acc *= 85) > 0xffffffff - c)
                                return PyErr_Format(
-                                       PyExc_ValueError,
-                                       "bad base85 sequence at position %d",
-                                       (int)i);
+                                   PyExc_ValueError,
+                                   "bad base85 sequence at position %d",
+                                   (int)i);
                        acc += c;
                }
 
@@ -145,23 +146,19 @@
 static char base85_doc[] = "Base85 Data Encoding";
 
 static PyMethodDef methods[] = {
-       {"b85encode", b85encode, METH_VARARGS,
-        "Encode text in base85.\n\n"
-        "If the second parameter is true, pad the result to a multiple of "
-        "five characters.\n"},
-       {"b85decode", b85decode, METH_VARARGS, "Decode base85 text.\n"},
-       {NULL, NULL}
+    {"b85encode", b85encode, METH_VARARGS,
+     "Encode text in base85.\n\n"
+     "If the second parameter is true, pad the result to a multiple of "
+     "five characters.\n"},
+    {"b85decode", b85decode, METH_VARARGS, "Decode base85 text.\n"},
+    {NULL, NULL},
 };
 
 static const int version = 1;
 
 #ifdef IS_PY3K
 static struct PyModuleDef base85_module = {
-       PyModuleDef_HEAD_INIT,
-       "base85",
-       base85_doc,
-       -1,
-       methods
+    PyModuleDef_HEAD_INIT, "base85", base85_doc, -1, methods,
 };
 
 PyMODINIT_FUNC PyInit_base85(void)
diff --git a/contrib/clang-format-blacklist b/contrib/clang-format-blacklist
--- a/contrib/clang-format-blacklist
+++ b/contrib/clang-format-blacklist
@@ -1,6 +1,5 @@
 # Files that just need to be migrated to the formatter.
 # Do not add new files here!
-mercurial/cext/base85.c
 mercurial/cext/dirs.c
 mercurial/cext/manifest.c
 mercurial/cext/mpatch.c



To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to