unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob dbfc8598b638513b987b754054df5e02239f8e10 926 bytes (raw)
name: gnu/packages/patches/nvi-search-word.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
This patch originates from the Debian project, see https://www.debian.org/

15search_word.dpatch by  Al Viro <viro@ZenIV.linux.org.uk>


Fix {^A} command. (End-of-word was not included in search regexp leading to
false positives.)

--- nvi-1.81.6.orig/vi/v_search.c	2007-11-18 11:41:42.000000000 -0500
+++ nvi-1.81.6/vi/v_search.c	2009-03-05 15:37:37.000000000 -0500
@@ -322,16 +322,17 @@
 v_searchw(SCR *sp, VICMD *vp)
 {
 	size_t blen, len;
+	size_t olen = STRLEN(VIP(sp)->keyw);
 	int rval;
 	CHAR_T *bp, *p;
 
-	len = VIP(sp)->klen + RE_WSTART_LEN + RE_WSTOP_LEN;
+	len = olen + RE_WSTART_LEN + RE_WSTOP_LEN;
 	GET_SPACE_RETW(sp, bp, blen, len);
 	MEMCPY(bp, RE_WSTART, RE_WSTART_LEN); 
 	p = bp + RE_WSTART_LEN;
-	MEMCPY(p, VIP(sp)->keyw, VIP(sp)->klen);
-	p += VIP(sp)->klen;
+	MEMCPY(p, VIP(sp)->keyw, olen);
+	p += olen;
 	MEMCPY(p, RE_WSTOP, RE_WSTOP_LEN); 
 
 	rval = v_search(sp, vp, bp, len, SEARCH_SET, FORWARD);

debug log:

solving dbfc859 ...
found dbfc859 in https://yhetil.org/guix-devel/54BE9C68.9070103@gmail.com/

applying [1/1] https://yhetil.org/guix-devel/54BE9C68.9070103@gmail.com/
diff --git a/gnu/packages/patches/nvi-search-word.patch b/gnu/packages/patches/nvi-search-word.patch
new file mode 100644
index 0000000..dbfc859

1:20: space before tab in indent.
 	size_t blen, len;
1:22: space before tab in indent.
 	int rval;
1:23: space before tab in indent.
 	CHAR_T *bp, *p;
1:24: trailing whitespace.
 
1:27: space before tab in indent.
 	GET_SPACE_RETW(sp, bp, blen, len);
Checking patch gnu/packages/patches/nvi-search-word.patch...
Applied patch gnu/packages/patches/nvi-search-word.patch cleanly.
warning: squelched 5 whitespace errors
warning: 10 lines add whitespace errors.

index at:
100644 dbfc8598b638513b987b754054df5e02239f8e10	gnu/packages/patches/nvi-search-word.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).