rpms/nano/devel nanorc, NONE, 1.1 nano-2.0.9-warnings.patch, 1.1, 1.2 nano.spec, 1.30, 1.31
Kamil Dudka
kdudka at fedoraproject.org
Tue Oct 13 11:37:22 UTC 2009
Author: kdudka
Update of /cvs/extras/rpms/nano/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3972
Modified Files:
nano-2.0.9-warnings.patch nano.spec
Added Files:
nanorc
Log Message:
- disable line wrapping by default (#528359)
--- NEW FILE nanorc ---
# This is a system-wide configuration file for the nano editor. Each user can
# save his own configuration to ~/.nanorc
#
# See the nanorc(5) man page for details.
# disable line wrapping by default
set nowrap
nano-2.0.9-warnings.patch:
nano-2.0.9/src/chars.c | 43 ++++++++++++++++++++++++++++---------------
nano-2.0.9/src/files.c | 4 +++-
nano-2.0.9/src/nano.h | 3 +++
src/chars.c | 9 +++------
src/files.c | 4 +---
5 files changed, 38 insertions(+), 25 deletions(-)
Index: nano-2.0.9-warnings.patch
===================================================================
RCS file: /cvs/extras/rpms/nano/devel/nano-2.0.9-warnings.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- nano-2.0.9-warnings.patch 21 Sep 2009 13:50:12 -0000 1.1
+++ nano-2.0.9-warnings.patch 13 Oct 2009 11:37:21 -0000 1.2
@@ -175,3 +175,67 @@ diff -rup nano-2.0.9.orig/src/files.c na
/* Free d_here, since we're done using it. */
free(d_here);
+diff -rup nano-2.0.9.orig/src/chars.c nano-2.0.9/src/chars.c
+--- nano-2.0.9.orig/src/chars.c 2009-09-21 21:23:45.682379298 +0200
++++ nano-2.0.9/src/chars.c 2009-09-21 21:28:50.143093880 +0200
+@@ -81,14 +81,12 @@ bool is_byte(int c)
+
+ static void mbtowc_reset(void)
+ {
+- int rv = mbtowc(NULL, NULL, 0);
+- (void) rv;
++ IGNORE_CALL_RESULT(mbtowc(NULL, NULL, 0));
+ }
+
+ static void wctomb_reset(void)
+ {
+- int rv = wctomb(NULL, 0);
+- (void) rv;
++ IGNORE_CALL_RESULT(wctomb(NULL, 0));
+ }
+
+ /* This function is equivalent to isalnum() for multibyte characters. */
+@@ -400,8 +398,7 @@ int parse_mbchar(const char *buf, char *
+ /* If buf contains an invalid multibyte character, only
+ * interpret buf's first byte. */
+ if (buf_mb_len < 0) {
+- int rv = mblen(NULL, 0);
+- (void) rv;
++ IGNORE_CALL_RESULT(mblen(NULL, 0));
+ buf_mb_len = 1;
+ } else if (buf_mb_len == 0)
+ buf_mb_len++;
+diff -rup nano-2.0.9.orig/src/files.c nano-2.0.9/src/files.c
+--- nano-2.0.9.orig/src/files.c 2009-09-21 21:23:45.683422811 +0200
++++ nano-2.0.9/src/files.c 2009-09-21 21:29:11.684110349 +0200
+@@ -1057,7 +1057,6 @@ char *get_full_path(const char *origpath
+ free(d_there);
+ d_there = NULL;
+ } else {
+- int rv;
+ free(d_there);
+
+ /* Get the full path. */
+@@ -1083,8 +1082,7 @@ char *get_full_path(const char *origpath
+ /* Finally, go back to the path specified in d_here,
+ * where we were before. We don't check for a chdir()
+ * error, since we can do nothing if we get one. */
+- rv = chdir(d_here);
+- (void) rv;
++ IGNORE_CALL_RESULT(chdir(d_here));
+
+ /* Free d_here, since we're done using it. */
+ free(d_here);
+diff -rup nano-2.0.9.orig/src/nano.h nano-2.0.9/src/nano.h
+--- nano-2.0.9.orig/src/nano.h 2008-04-02 05:49:33.000000000 +0200
++++ nano-2.0.9/src/nano.h 2009-09-21 21:27:50.795110162 +0200
+@@ -44,6 +44,9 @@
+ #include <sys/param.h>
+ #endif
+
++/* Suppress warnings for __attribute__((warn_unused_result)) */
++#define IGNORE_CALL_RESULT(call) do { if (call) {} } while(0)
++
+ /* Macros for flags. */
+ #define SET(bit) flags |= bit
+ #define UNSET(bit) flags &= ~bit
Index: nano.spec
===================================================================
RCS file: /cvs/extras/rpms/nano/devel/nano.spec,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -p -r1.30 -r1.31
--- nano.spec 21 Sep 2009 13:50:12 -0000 1.30
+++ nano.spec 13 Oct 2009 11:37:21 -0000 1.31
@@ -1,15 +1,16 @@
-Summary: A small text editor
-Name: nano
-Version: 2.0.9
-Release: 3%{?dist}
-License: GPLv2+
-Group: Applications/Editors
-URL: http://www.nano-editor.org
-Source: http://www.nano-editor.org/dist/v1.3/%{name}-%{version}.tar.gz
-Patch1: nano-2.0.9-warnings.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: ncurses-devel, autoconf, gettext-devel, groff
-Requires(post): /sbin/install-info
+Summary: A small text editor
+Name: nano
+Version: 2.0.9
+Release: 4%{?dist}
+License: GPLv2+
+Group: Applications/Editors
+URL: http://www.nano-editor.org
+Source: http://www.nano-editor.org/dist/v1.3/%{name}-%{version}.tar.gz
+Source2: nanorc
+Patch1: nano-2.0.9-warnings.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: ncurses-devel, autoconf, gettext-devel, groff
+Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
%description
@@ -62,12 +63,17 @@ rm -rf %{buildroot}
%doc doc/faq.html
/bin/*
%{_bindir}/*
+%config(noreplace) %{_sysconfdir}/nanorc
%{_mandir}/man*/*
%lang(fr) %{_mandir}/fr/man*/*
%{_infodir}/nano.info*
%{_datadir}/nano
%changelog
+* Tue Oct 13 2009 Kamil Dudka <kdudka at redhat.com> - 2.0.9-4
+- ship a system-wide configuration file along with the nano package
+- disable line wrapping by default (#528359)
+
* Mon Sep 21 2009 Kamil Dudka <kdudka at redhat.com> - 2.0.9-3
- suppress warnings for __attribute__((warn_unused_result)) (#523951)
More information about the fedora-extras-commits
mailing list