summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2003-09-02 23:31:18 +0000
committerMike Frysinger <vapier@gentoo.org>2003-09-02 23:31:18 +0000
commitb62f15bdd47f8bf5d78bd0ad1b1a0924e25a357d (patch)
treebc556568dbe3fc49cd2829aa3162a8fd7df6746c /app-editors
parentversion bump (diff)
downloadgentoo-2-b62f15bdd47f8bf5d78bd0ad1b1a0924e25a357d.tar.gz
gentoo-2-b62f15bdd47f8bf5d78bd0ad1b1a0924e25a357d.tar.bz2
gentoo-2-b62f15bdd47f8bf5d78bd0ad1b1a0924e25a357d.zip
update whitespace converting patch
Diffstat (limited to 'app-editors')
-rw-r--r--app-editors/nano/files/1.2.2-tabconvert.patch96
-rw-r--r--app-editors/nano/files/1.2.2-wsconvert.patch178
-rw-r--r--app-editors/nano/nano-1.2.2.ebuild5
3 files changed, 181 insertions, 98 deletions
diff --git a/app-editors/nano/files/1.2.2-tabconvert.patch b/app-editors/nano/files/1.2.2-tabconvert.patch
deleted file mode 100644
index 787c529dec1c..000000000000
--- a/app-editors/nano/files/1.2.2-tabconvert.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-diff -ur work.orig/nano-1.2.2/global.c work/nano-1.2.2/global.c
---- work.orig/nano-1.2.2/global.c 2003-08-18 17:14:23.929963632 -0400
-+++ work/nano-1.2.2/global.c 2003-08-18 17:31:03.396021696 -0400
-@@ -80,6 +80,7 @@
-
- int tabsize = -1; /* Our internal tabsize variable. The
- default value 8 is set in main(). */
-+int tabconvert = ' ';
-
- char *hblank = NULL; /* A horizontal blank line */
- #ifndef DISABLE_HELP
-diff -ur work.orig/nano-1.2.2/nanorc.sample work/nano-1.2.2/nanorc.sample
---- work.orig/nano-1.2.2/nanorc.sample 2003-08-18 17:14:23.931963328 -0400
-+++ work/nano-1.2.2/nanorc.sample 2003-08-18 17:45:05.901941328 -0400
-@@ -86,6 +86,11 @@
- ## Use this tab size instead of the default; it must be greater than 0
- # set tabsize 8
-
-+## Use this tab char instead of the default space; it can either be the
-+## ascii value of the character you wish to see (refer to ascii(7)) or
-+## it can be a single character. 183 and 186 seem to be 'nice' values.
-+# set tabconvert 32
-+
- ## Save automatically on exit, don't prompt
- # set tempfile
-
-diff -ur work.orig/nano-1.2.2/proto.h work/nano-1.2.2/proto.h
---- work.orig/nano-1.2.2/proto.h 2003-08-18 17:14:23.930963480 -0400
-+++ work/nano-1.2.2/proto.h 2003-08-18 17:39:44.442810544 -0400
-@@ -38,7 +38,7 @@
- #endif
- extern long totsize;
- extern int temp_opt;
--extern int wrap_at, flags, tabsize;
-+extern int wrap_at, flags, tabsize, tabconvert;
- extern int search_last_line;
- extern int search_offscreen;
- extern int currslen;
-diff -ur work.orig/nano-1.2.2/rcfile.c work/nano-1.2.2/rcfile.c
---- work.orig/nano-1.2.2/rcfile.c 2003-08-18 17:14:23.930963480 -0400
-+++ work/nano-1.2.2/rcfile.c 2003-08-18 17:56:59.475461664 -0400
-@@ -82,6 +82,7 @@
- #endif
- {"suspend", SUSPEND},
- {"tabsize", 0},
-+ {"tabconvert", ' '},
- {"tempfile", TEMP_OPT},
- {"view", VIEW_MODE},
- {"historylog", HISTORYLOG},
-@@ -523,6 +524,7 @@
- #endif
- if (set == 1) {
- if (!strcasecmp(rcopts[i].name, "tabsize")
-+ || !strcasecmp(rcopts[i].name, "tabconvert")
- #ifndef DISABLE_OPERATINGDIR
- || !strcasecmp(rcopts[i].name, "operatingdir")
- #endif
-@@ -586,11 +588,21 @@
- * accept 0 while checking other
- * errors. */
- j = (int)strtol(option, &first_error, 10);
-- if (errno == ERANGE || *option == '\0' || *first_error != '\0')
-- rcfile_error(_("requested tab size %d invalid"),
-- j);
-- else
-- tabsize = j;
-+ if (!strcasecmp(rcopts[i].name, "tabconvert")) {
-+ if (errno == ERANGE || *first_error != '\0') {
-+ if (*option == '\0')
-+ rcfile_error(_("requested tab convert is invalid"));
-+ else
-+ tabconvert = option[0];
-+ } else
-+ tabconvert = j;
-+ } else {
-+ if (errno == ERANGE || *option == '\0' || *first_error != '\0')
-+ rcfile_error(_("requested tab size %d invalid"),
-+ j);
-+ else
-+ tabsize = j;
-+ }
- }
- } else
- SET(rcopts[i].flag);
-diff -ur work.orig/nano-1.2.2/winio.c work/nano-1.2.2/winio.c
---- work.orig/nano-1.2.2/winio.c 2003-08-18 17:14:23.930963480 -0400
-+++ work/nano-1.2.2/winio.c 2003-08-18 17:34:23.341625344 -0400
-@@ -1069,7 +1069,7 @@
- for (; *original != '\0'; original++) {
- if (*original == '\t')
- do {
-- converted[pos++] = ' ';
-+ converted[pos++] = tabconvert;
- } while (pos % tabsize);
- else if (is_cntrl_char(*original)) {
- converted[pos++] = '^';
diff --git a/app-editors/nano/files/1.2.2-wsconvert.patch b/app-editors/nano/files/1.2.2-wsconvert.patch
new file mode 100644
index 000000000000..81c1dc9b23a9
--- /dev/null
+++ b/app-editors/nano/files/1.2.2-wsconvert.patch
@@ -0,0 +1,178 @@
+diff -ur work.orig/nano-1.2.2/global.c work/nano-1.2.2/global.c
+--- work.orig/nano-1.2.2/global.c 2003-09-01 18:15:59.000000000 -0400
++++ work/nano-1.2.2/global.c 2003-09-02 08:46:03.000000000 -0400
+@@ -80,6 +80,8 @@
+
+ int tabsize = -1; /* Our internal tabsize variable. The
+ default value 8 is set in main(). */
++int tabconvert = ' ';
++int spaceconvert = ' ';
+
+ char *hblank = NULL; /* A horizontal blank line */
+ #ifndef DISABLE_HELP
+@@ -224,7 +226,7 @@
+ char *toggle_const_msg, *toggle_autoindent_msg, *toggle_suspend_msg,
+ *toggle_nohelp_msg, *toggle_cuttoend_msg,
+ *toggle_noconvert_msg, *toggle_dos_msg, *toggle_mac_msg,
+- *toggle_backup_msg, *toggle_smooth_msg;
++ *toggle_backup_msg, *toggle_smooth_msg;//, *toggle_wsconvert_msg;
+ #if !defined(DISABLE_MOUSE) && defined(NCURSES_MOUSE_VERSION)
+ char *toggle_mouse_msg;
+ #endif
+@@ -256,6 +258,7 @@
+ toggle_mac_msg = _("Writing file in Mac format");
+ toggle_backup_msg = _("Backing up file");
+ toggle_smooth_msg = _("Smooth scrolling");
++// toggle_wsconvert_msg = _("Whitespace converting");
+ #ifdef ENABLE_COLOR
+ toggle_syntax_msg = _("Color syntax highlighting");
+ #endif
+@@ -270,6 +273,7 @@
+ toggle_init_one(TOGGLE_AUTOINDENT_KEY, toggle_autoindent_msg, AUTOINDENT);
+ toggle_init_one(TOGGLE_SUSPEND_KEY, toggle_suspend_msg, SUSPEND);
+ toggle_init_one(TOGGLE_NOHELP_KEY, toggle_nohelp_msg, NO_HELP);
++// toggle_init_one(TOGGLE_WSCONVERT_KEY, toggle_wsconvert_msg, WS_CONVERT);
+ #ifndef DISABLE_WRAPPING
+ toggle_init_one(TOGGLE_WRAP_KEY, toggle_wrap_msg, NO_WRAP);
+ #endif
+diff -ur work.orig/nano-1.2.2/nano.h work/nano-1.2.2/nano.h
+--- work.orig/nano-1.2.2/nano.h 2003-09-01 18:15:59.000000000 -0400
++++ work/nano-1.2.2/nano.h 2003-09-02 09:05:17.000000000 -0400
+@@ -253,6 +253,7 @@
+ #define HISTORY_CHANGED (1<<29)
+ #define HISTORYLOG (1<<30)
+ #define JUSTIFY_MODE (1<<31)
++//#define WS_CONVERT (1<<32)
+
+ /* Control key sequences, changing these would be very very bad */
+
+@@ -404,6 +405,7 @@
+ #define TOGGLE_MAC_KEY NANO_ALT_O
+ #define TOGGLE_SMOOTH_KEY NANO_ALT_S
+ #define TOGGLE_NOCONVERT_KEY NANO_ALT_N
++//#define TOGGLE_WSCONVERT_KEY NANO_ALT_V
+ #define TOGGLE_BACKUP_KEY NANO_ALT_B
+ #define TOGGLE_SYNTAX_KEY NANO_ALT_Y
+ #endif /* !NANO_SMALL */
+diff -ur work.orig/nano-1.2.2/nanorc.sample work/nano-1.2.2/nanorc.sample
+--- work.orig/nano-1.2.2/nanorc.sample 2003-09-01 18:15:59.000000000 -0400
++++ work/nano-1.2.2/nanorc.sample 2003-09-01 18:32:31.000000000 -0400
+@@ -86,6 +86,14 @@
+ ## Use this tab size instead of the default; it must be greater than 0
+ # set tabsize 8
+
++## Use this tab char instead of the default space; it can either be the
++## ascii value of the character you wish to see (refer to ascii(7)) or
++## it can be a single character. 187 seems to be a 'good' value.
++# set tabconvert 32
++## Same as tabconverting above, but applied to spaces.
++## it can be a single character. 183 seems to be a 'good' value.
++# set tabconvert 32
++
+ ## Save automatically on exit, don't prompt
+ # set tempfile
+
+diff -ur work.orig/nano-1.2.2/proto.h work/nano-1.2.2/proto.h
+--- work.orig/nano-1.2.2/proto.h 2003-09-01 18:15:59.000000000 -0400
++++ work/nano-1.2.2/proto.h 2003-09-02 08:42:53.000000000 -0400
+@@ -38,7 +38,7 @@
+ #endif
+ extern long totsize;
+ extern int temp_opt;
+-extern int wrap_at, flags, tabsize;
++extern int wrap_at, flags, tabsize, tabconvert, spaceconvert;
+ extern int search_last_line;
+ extern int search_offscreen;
+ extern int currslen;
+diff -ur work.orig/nano-1.2.2/rcfile.c work/nano-1.2.2/rcfile.c
+--- work.orig/nano-1.2.2/rcfile.c 2003-09-01 18:15:59.000000000 -0400
++++ work/nano-1.2.2/rcfile.c 2003-09-02 08:45:49.000000000 -0400
+@@ -58,6 +58,7 @@
+ #endif
+ #ifndef NANO_SMALL
+ {"noconvert", NO_CONVERT},
++/* {"wsconvert", WS_CONVERT}, */
+ #endif
+ {"nofollow", NOFOLLOW_SYMLINKS},
+ {"nohelp", NO_HELP},
+@@ -82,6 +83,8 @@
+ #endif
+ {"suspend", SUSPEND},
+ {"tabsize", 0},
++ {"tabconvert", ' '},
++ {"spaceconvert", ' '},
+ {"tempfile", TEMP_OPT},
+ {"view", VIEW_MODE},
+ {"historylog", HISTORYLOG},
+@@ -523,6 +526,8 @@
+ #endif
+ if (set == 1) {
+ if (!strcasecmp(rcopts[i].name, "tabsize")
++ || !strcasecmp(rcopts[i].name, "tabconvert")
++ || !strcasecmp(rcopts[i].name, "spaceconvert")
+ #ifndef DISABLE_OPERATINGDIR
+ || !strcasecmp(rcopts[i].name, "operatingdir")
+ #endif
+@@ -586,11 +591,29 @@
+ * accept 0 while checking other
+ * errors. */
+ j = (int)strtol(option, &first_error, 10);
+- if (errno == ERANGE || *option == '\0' || *first_error != '\0')
+- rcfile_error(_("requested tab size %d invalid"),
+- j);
+- else
+- tabsize = j;
++ if (!strcasecmp(rcopts[i].name, "tabconvert")) {
++ if (errno == ERANGE || *first_error != '\0') {
++ if (*option == '\0')
++ rcfile_error(_("requested tab convert is invalid"));
++ else
++ tabconvert = option[0];
++ } else
++ tabconvert = j;
++ } else if (!strcasecmp(rcopts[i].name, "spaceconvert")) {
++ if (errno == ERANGE || *first_error != '\0') {
++ if (*option == '\0')
++ rcfile_error(_("requested space convert is invalid"));
++ else
++ spaceconvert = option[0];
++ } else
++ spaceconvert = j;
++ } else {
++ if (errno == ERANGE || *option == '\0' || *first_error != '\0')
++ rcfile_error(_("requested tab size %d invalid"),
++ j);
++ else
++ tabsize = j;
++ }
+ }
+ } else
+ SET(rcopts[i].flag);
+diff -ur work.orig/nano-1.2.2/winio.c work/nano-1.2.2/winio.c
+--- work.orig/nano-1.2.2/winio.c 2003-09-01 18:15:59.000000000 -0400
++++ work/nano-1.2.2/winio.c 2003-09-02 08:43:56.000000000 -0400
+@@ -1067,11 +1067,11 @@
+
+ pos = 0;
+ for (; *original != '\0'; original++) {
+- if (*original == '\t')
+- do {
++ if (*original == '\t') {
++ converted[pos++] = tabconvert;
++ while (pos % tabsize)
+ converted[pos++] = ' ';
+- } while (pos % tabsize);
+- else if (is_cntrl_char(*original)) {
++ } else if (is_cntrl_char(*original)) {
+ converted[pos++] = '^';
+ if (*original == 127)
+ converted[pos++] = '?';
+@@ -1083,7 +1083,7 @@
+ else
+ converted[pos++] = *original + 64;
+ } else
+- converted[pos++] = *original;
++ converted[pos++] = (*original==' ') ? spaceconvert : *original;
+ }
+ converted[pos] = '\0';
+
diff --git a/app-editors/nano/nano-1.2.2.ebuild b/app-editors/nano/nano-1.2.2.ebuild
index 87345647b3d1..4a938142a791 100644
--- a/app-editors/nano/nano-1.2.2.ebuild
+++ b/app-editors/nano/nano-1.2.2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/nano-1.2.2.ebuild,v 1.5 2003/08/21 06:13:48 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/nano-1.2.2.ebuild,v 1.6 2003/09/02 23:31:17 vapier Exp $
inherit eutils
@@ -23,7 +23,8 @@ S=${WORKDIR}/${MY_P}
src_unpack() {
unpack ${A}
- epatch ${FILESDIR}/${PV}-tabconvert.patch
+ cd ${S}
+ epatch ${FILESDIR}/${PV}-wsconvert.patch
}
src_compile() {