unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 6ee844d8ced7fd338126469a8ff32f3addba4ce6 1061 bytes (raw)
name: gnu/packages/patches/nvi-support-C-locale.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
31
 
This patch originates from the Debian project, see https://www.debian.org/

27support_C_locale.dpatch by  <hesso@pool.math.tu-berlin.de>


Allow users to edit 8-bit files even under LC_CTYPE=C.

--- nvi-1.81.6.orig/common/conv.c	2007-11-18 17:41:42.000000000 +0100
+++ nvi-1.81.6/common/conv.c	2009-03-09 16:45:37.812022582 +0100
@@ -322,11 +322,16 @@
     else {
 	setlocale(LC_ALL, "");
 #ifdef USE_WIDECHAR
-	sp->conv.sys2int = cs_char2int;
-	sp->conv.int2sys = cs_int2char;
-	sp->conv.file2int = fe_char2int;
-	sp->conv.int2file = fe_int2char;
-	sp->conv.input2int = ie_char2int;
+	if (!strcmp(LANGCODESET, "ANSI_X3.4-1968")) {
+	    sp->conv.file2int = sp->conv.input2int = sp->conv.sys2int = raw2int;
+	    sp->conv.int2sys = sp->conv.int2file = int2raw;
+	} else {
+	    sp->conv.sys2int = cs_char2int;
+	    sp->conv.int2sys = cs_int2char;
+	    sp->conv.file2int = fe_char2int;
+	    sp->conv.int2file = fe_int2char;
+	    sp->conv.input2int = ie_char2int;
+	}
 #endif
 #ifdef USE_ICONV
 	o_set(sp, O_FILEENCODING, OS_STRDUP, nl_langinfo(CODESET), 0);

debug log:

solving 6ee844d ...
found 6ee844d 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-support-C-locale.patch b/gnu/packages/patches/nvi-support-C-locale.patch
new file mode 100644
index 0000000..6ee844d

1:18: space before tab in indent.
 	setlocale(LC_ALL, "");
1:37: space before tab in indent.
 	o_set(sp, O_FILEENCODING, OS_STRDUP, nl_langinfo(CODESET), 0);
Checking patch gnu/packages/patches/nvi-support-C-locale.patch...
Applied patch gnu/packages/patches/nvi-support-C-locale.patch cleanly.
warning: 2 lines add whitespace errors.

index at:
100644 6ee844d8ced7fd338126469a8ff32f3addba4ce6	gnu/packages/patches/nvi-support-C-locale.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).