[PATCH] xdiff: Do not consider lines starting by # hunkworthy

Subsystems: the rest

STALE3661d

2 messages, 2 authors, 2016-08-11 · open the first message on its own page

[PATCH] xdiff: Do not consider lines starting by # hunkworthy

From: Petr Baudis <hidden>
Date: 2016-08-11 19:49:16

This will be probably controversial but in my personal experience, the
amount of time this is the right thing to do because of #defines is negligible
compared to amount of time it is wrong, especially because of #ifs and #endifs
in the middle of functions and also because of comments at the line start when
it concerns non-C files.

Signed-off-by: Petr Baudis <redacted>
---

 xdiff/xemit.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/xdiff/xemit.c b/xdiff/xemit.c
index 714c563..4f20075 100644
--- a/xdiff/xemit.c
+++ b/xdiff/xemit.c
@@ -86,8 +86,7 @@ static void xdl_find_func(xdfile_t *xf, 
 		if (len > 0 &&
 		    (isalpha((unsigned char)*rec) || /* identifier? */
 		     *rec == '_' ||	/* also identifier? */
-		     *rec == '(' ||	/* lisp defun? */
-		     *rec == '#')) {	/* #define? */
+		     *rec == '(')) {	/* #define? */
 			if (len > sz)
 				len = sz;

Re: [PATCH] xdiff: Do not consider lines starting by # hunkworthy

From: Jakub Narebski <hidden>
Date: 2016-08-11 20:42:15

Petr Baudis wrote:
-                    *rec == '(' ||     /* lisp defun? */
-                    *rec == '#')) {    /* #define? */
+                    *rec == '(')) {    /* #define? */
                        if (len > sz)
Shouldn't it be:

+                    *rec == '(')) {    /* lisp defun? */
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help