Patchwork D1028: mpatch: reformat function prototypes with clang-format

login
register
mail settings
Submitter phabricator
Date Oct. 17, 2017, 1:46 a.m.
Message ID <af39066d015a4f23c31cba36961060b9@localhost.localdomain>
Download mbox | patch
Permalink /patch/25043/
State Not Applicable
Headers show

Comments

phabricator - Oct. 17, 2017, 1:46 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGbd177139e635: mpatch: reformat function prototypes with clang-format (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1028?vs=2823&id=2856

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

AFFECTED FILES
  mercurial/mpatch.c
  mercurial/mpatch.h

CHANGE DETAILS




To: durin42, #hg-reviewers, pulkit, yuja
Cc: ryanmce, yuja, mercurial-devel

Patch

diff --git a/mercurial/mpatch.h b/mercurial/mpatch.h
--- a/mercurial/mpatch.h
+++ b/mercurial/mpatch.h
@@ -14,13 +14,13 @@ 
 	struct mpatch_frag *base, *head, *tail;
 };
 
-int mpatch_decode(const char *bin, ssize_t len, struct mpatch_flist** res);
+int mpatch_decode(const char *bin, ssize_t len, struct mpatch_flist **res);
 ssize_t mpatch_calcsize(ssize_t len, struct mpatch_flist *l);
 void mpatch_lfree(struct mpatch_flist *a);
 int mpatch_apply(char *buf, const char *orig, ssize_t len,
-	struct mpatch_flist *l);
-struct mpatch_flist *mpatch_fold(void *bins,
-	struct mpatch_flist* (*get_next_item)(void*, ssize_t),
-	ssize_t start, ssize_t end);
+                 struct mpatch_flist *l);
+struct mpatch_flist *
+mpatch_fold(void *bins, struct mpatch_flist *(*get_next_item)(void *, ssize_t),
+            ssize_t start, ssize_t end);
 
 #endif
diff --git a/mercurial/mpatch.c b/mercurial/mpatch.c
--- a/mercurial/mpatch.c
+++ b/mercurial/mpatch.c
@@ -64,7 +64,7 @@ 
    for changes in offset. the last hunk may be split if necessary.
 */
 static int gather(struct mpatch_flist *dest, struct mpatch_flist *src, int cut,
-	int offset)
+                  int offset)
 {
 	struct mpatch_frag *d = dest->tail, *s = src->head;
 	int postend, c, l;
@@ -145,7 +145,7 @@ 
 /* combine hunk lists a and b, while adjusting b for offset changes in a/
    this deletes a and b and returns the resultant list. */
 static struct mpatch_flist *combine(struct mpatch_flist *a,
-	struct mpatch_flist *b)
+                                    struct mpatch_flist *b)
 {
 	struct mpatch_flist *c = NULL;
 	struct mpatch_frag *bh, *ct;
@@ -239,7 +239,7 @@ 
 }
 
 int mpatch_apply(char *buf, const char *orig, ssize_t len,
-	struct mpatch_flist *l)
+                 struct mpatch_flist *l)
 {
 	struct mpatch_frag *f = l->head;
 	int last = 0;
@@ -261,9 +261,9 @@ 
 }
 
 /* recursively generate a patch of all bins between start and end */
-struct mpatch_flist *mpatch_fold(void *bins,
-	struct mpatch_flist* (*get_next_item)(void*, ssize_t),
-	ssize_t start, ssize_t end)
+struct mpatch_flist *
+mpatch_fold(void *bins, struct mpatch_flist *(*get_next_item)(void *, ssize_t),
+            ssize_t start, ssize_t end)
 {
 	ssize_t len;