diff options
author | Mike Frysinger <vapier@gentoo.org> | 2003-08-18 22:18:03 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2003-08-18 22:18:03 +0000 |
commit | 01bc5c2c3f02ad4a151c9bc5897daa8afd96a39d (patch) | |
tree | 1cc29cf735fce2ce2aa6efb81df01066dfa3060f /app-editors | |
parent | bk bump (diff) | |
download | gentoo-2-01bc5c2c3f02ad4a151c9bc5897daa8afd96a39d.tar.gz gentoo-2-01bc5c2c3f02ad4a151c9bc5897daa8afd96a39d.tar.bz2 gentoo-2-01bc5c2c3f02ad4a151c9bc5897daa8afd96a39d.zip |
tab conversion character, naaaaaaaasty
Diffstat (limited to 'app-editors')
-rw-r--r-- | app-editors/nano/ChangeLog | 3 | ||||
-rw-r--r-- | app-editors/nano/files/1.2.2-tabconvert.patch | 96 | ||||
-rw-r--r-- | app-editors/nano/nano-1.2.2.ebuild | 9 |
3 files changed, 106 insertions, 2 deletions
diff --git a/app-editors/nano/ChangeLog b/app-editors/nano/ChangeLog index b6cbaf03b80e..acb2fc7bf305 100644 --- a/app-editors/nano/ChangeLog +++ b/app-editors/nano/ChangeLog @@ -1,12 +1,13 @@ # ChangeLog for app-editors/nano # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/ChangeLog,v 1.31 2003/08/18 21:11:56 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/ChangeLog,v 1.32 2003/08/18 22:18:03 vapier Exp $ *nano-1.2.2 (18 Aug 2003) 18 Aug 2003; Mike Frysinger <vapier@gentoo.org> : Add back in optional slang support + add in debug support. Also fix symlink so it points at ../../bin/nano rather than /bin/nano. + Also add in a small patch to add support for a 'tab conversion' character. *nano-1.2.1 (25 Apr 2003) diff --git a/app-editors/nano/files/1.2.2-tabconvert.patch b/app-editors/nano/files/1.2.2-tabconvert.patch new file mode 100644 index 000000000000..787c529dec1c --- /dev/null +++ b/app-editors/nano/files/1.2.2-tabconvert.patch @@ -0,0 +1,96 @@ +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/nano-1.2.2.ebuild b/app-editors/nano/nano-1.2.2.ebuild index ddc089faa86f..ddc939522bc4 100644 --- a/app-editors/nano/nano-1.2.2.ebuild +++ b/app-editors/nano/nano-1.2.2.ebuild @@ -1,6 +1,8 @@ # 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.1 2003/08/18 21:11:56 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/nano-1.2.2.ebuild,v 1.2 2003/08/18 22:18:03 vapier Exp $ + +inherit eutils MY_P=${PN}-${PV/_} DESCRIPTION="GNU GPL'd Pico clone with more functionality" @@ -19,6 +21,11 @@ PROVIDE="virtual/editor" S=${WORKDIR}/${MY_P} +src_unpack() { + unpack ${A} + epatch ${FILESDIR}/${PV}-tabconvert.patch +} + src_compile() { use build && myconf="${myconf} --disable-wrapping-as-root" |