new upstream release - 2.3.1
This commit is contained in:
parent
d4b92eee66
commit
71e5b16893
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
nano-2.2.5.tar.gz
|
||||
/nano-2.2.6.tar.gz
|
||||
/nano-2.3.0.tar.gz
|
||||
/nano-2.3.1.tar.gz
|
||||
|
Binary file not shown.
@ -1,118 +0,0 @@
|
||||
From ea296ebe2f027e40457d116c40e687f1724fab90 Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Thu, 3 Mar 2011 12:02:51 +0100
|
||||
Subject: [PATCH] nano-2.3.0 likes to tell me it matched
|
||||
|
||||
From: Mike Frysinger <vapier <at> gentoo.org>
|
||||
Newsgroups: gmane.editors.nano.devel
|
||||
Date: 2011-03-03 09:44:20 GMT (1 hour and 16 minutes ago)
|
||||
|
||||
when i save the attached file, nano writes to stdout (not via ncurses)
|
||||
the string "We matched!"
|
||||
-mike
|
||||
|
||||
--
|
||||
http://thread.gmane.org/gmane.editors.nano.devel/2911
|
||||
---
|
||||
src/color.c | 36 +++++++++++++++---------------------
|
||||
1 files changed, 15 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/src/color.c b/src/color.c
|
||||
index 269cd21..8dfcf23 100644
|
||||
--- a/src/color.c
|
||||
+++ b/src/color.c
|
||||
@@ -31,6 +31,12 @@
|
||||
#include <magic.h>
|
||||
#endif
|
||||
|
||||
+#ifdef DEBUG
|
||||
+# define debug_printf(...) fprintf(stderr, __VA_ARGS__)
|
||||
+#else
|
||||
+# define debug_printf(...)
|
||||
+#endif
|
||||
+
|
||||
#ifdef ENABLE_COLOR
|
||||
|
||||
/* For each syntax list entry, go through the list of colors and assign
|
||||
@@ -100,9 +106,7 @@ void color_init(void)
|
||||
|
||||
init_pair(tmpcolor->pairnum, foreground, background);
|
||||
|
||||
-#ifdef DEBUG
|
||||
- fprintf(stderr, "init_pair(): fg = %hd, bg = %hd\n", tmpcolor->fg, tmpcolor->bg);
|
||||
-#endif
|
||||
+ debug_printf("init_pair(): fg = %hd, bg = %hd\n", tmpcolor->fg, tmpcolor->bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -167,16 +171,14 @@ void color_update(void)
|
||||
#endif /* DEBUG */
|
||||
MAGIC_ERROR);
|
||||
if (m == NULL || magic_load(m, NULL) < 0)
|
||||
- fprintf(stderr, "something went wrong: %s [%s]\n", strerror(errno), openfile->filename);
|
||||
+ debug_printf("something went wrong: %s [%s]\n", strerror(errno), openfile->filename);
|
||||
else {
|
||||
magicstring = magic_file(m,openfile->filename);
|
||||
if (magicstring == NULL) {
|
||||
magicerr = magic_error(m);
|
||||
- fprintf(stderr, "something went wrong: %s [%s]\n", magicerr, openfile->filename);
|
||||
+ debug_printf("something went wrong: %s [%s]\n", magicerr, openfile->filename);
|
||||
}
|
||||
-#ifdef DEBUG
|
||||
- fprintf(stderr, "magic string returned: %s\n", magicstring);
|
||||
-#endif /* DEBUG */
|
||||
+ debug_printf("magic string returned: %s\n", magicstring);
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_LIBMAGIC */
|
||||
@@ -227,9 +229,7 @@ void color_update(void)
|
||||
#ifdef HAVE_LIBMAGIC
|
||||
if (openfile->colorstrings == NULL) {
|
||||
|
||||
-#ifdef DEBUG
|
||||
- fprintf(stderr, "No match using extension, trying libmagic...\n");
|
||||
-#endif /* DEBUG */
|
||||
+ debug_printf("No match using extension, trying libmagic...\n");
|
||||
|
||||
for (tmpsyntax = syntaxes; tmpsyntax != NULL;
|
||||
tmpsyntax = tmpsyntax->next) {
|
||||
@@ -239,12 +239,10 @@ void color_update(void)
|
||||
e->ext = (regex_t *)nmalloc(sizeof(regex_t));
|
||||
regcomp(e->ext, fixbounds(e->ext_regex), REG_EXTENDED);
|
||||
}
|
||||
-#ifdef DEBUG
|
||||
- fprintf(stderr,"Matching regex \"%s\" against \"%s\"\n",e->ext_regex, magicstring);
|
||||
-#endif /* DEBUG */
|
||||
+ debug_printf("Matching regex \"%s\" against \"%s\"\n",e->ext_regex, magicstring);
|
||||
|
||||
if (magicstring && regexec(e->ext, magicstring, 0, NULL, 0) == 0) {
|
||||
- fprintf(stderr,"We matched!\n");
|
||||
+ debug_printf("We matched!\n");
|
||||
openfile->syntax = tmpsyntax;
|
||||
openfile->colorstrings = tmpsyntax->color;
|
||||
break;
|
||||
@@ -259,9 +257,7 @@ void color_update(void)
|
||||
|
||||
/* If we haven't matched anything yet, try the headers */
|
||||
if (openfile->colorstrings == NULL) {
|
||||
-#ifdef DEBUG
|
||||
- fprintf(stderr, "No match for file extensions, looking at headers...\n");
|
||||
-#endif
|
||||
+ debug_printf("No match for file extensions, looking at headers...\n");
|
||||
for (tmpsyntax = syntaxes; tmpsyntax != NULL;
|
||||
tmpsyntax = tmpsyntax->next) {
|
||||
|
||||
@@ -278,9 +274,7 @@ void color_update(void)
|
||||
|
||||
/* Set colorstrings if we matched the extension
|
||||
* regex. */
|
||||
-#ifdef DEBUG
|
||||
- fprintf(stderr, "Comparing header regex \"%s\" to fileage \"%s\"...\n", e->ext_regex, openfile->fileage->data);
|
||||
-#endif
|
||||
+ debug_printf("Comparing header regex \"%s\" to fileage \"%s\"...\n", e->ext_regex, openfile->fileage->data);
|
||||
if (regexec(e->ext, openfile->fileage->data, 0, NULL, 0) == 0) {
|
||||
openfile->syntax = tmpsyntax;
|
||||
openfile->colorstrings = tmpsyntax->color;
|
||||
--
|
||||
1.7.4
|
||||
|
7
nano-2.3.1.tar.gz.asc
Normal file
7
nano-2.3.1.tar.gz.asc
Normal file
@ -0,0 +1,7 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v1.4.10 (GNU/Linux)
|
||||
|
||||
iEYEABECAAYFAk3KFpIACgkQvLNW35EAn6clMACfVnKHIlK4QUTOlEKNRrDEkXUJ
|
||||
i2YAoN4Od7TENKHOXX383Ml//RxN1TvU
|
||||
=z+9f
|
||||
-----END PGP SIGNATURE-----
|
@ -1,6 +1,6 @@
|
||||
Summary: A small text editor
|
||||
Name: nano
|
||||
Version: 2.3.0
|
||||
Version: 2.3.1
|
||||
Release: 1%{?dist}
|
||||
License: GPLv3+
|
||||
Group: Applications/Editors
|
||||
@ -15,9 +15,6 @@ Patch1: 0001-check-stat-s-result-and-avoid-calling-stat-on-a-NULL.patch
|
||||
# http://lists.gnu.org/archive/html/nano-devel/2010-08/msg00005.html
|
||||
Patch2: 0002-use-futimens-if-available-instead-of-utime.patch
|
||||
|
||||
# http://thread.gmane.org/gmane.editors.nano.devel/2911
|
||||
Patch3: nano-2.3.0-color-debug.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: gettext-devel
|
||||
@ -35,7 +32,6 @@ GNU nano is a small and friendly text editor.
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
for f in doc/man/fr/{nano.1,nanorc.5,rnano.1} ; do
|
||||
iconv -f iso-8859-1 -t utf-8 -o $f.tmp $f && mv $f.tmp $f
|
||||
@ -100,6 +96,9 @@ rm -rf %{buildroot}
|
||||
%{_datadir}/nano
|
||||
|
||||
%changelog
|
||||
* Wed May 11 2011 Kamil Dudka <kdudka@redhat.com> - 2.3.1-1
|
||||
- new upstream release
|
||||
|
||||
* Thu Mar 03 2011 Kamil Dudka <kdudka@redhat.com> - 2.3.0-1
|
||||
- new upstream release (#680736)
|
||||
- use hunspell as default spell-checker (#681000)
|
||||
|
Loading…
Reference in New Issue
Block a user