- disable line wrapping by default (#528359)
This commit is contained in:
parent
6e31aec3e6
commit
481dc203af
@ -175,3 +175,67 @@ diff -rup nano-2.0.9.orig/src/files.c nano-2.0.9/src/files.c
|
||||
|
||||
/* 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
|
||||
|
30
nano.spec
30
nano.spec
@ -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@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@redhat.com> - 2.0.9-3
|
||||
- suppress warnings for __attribute__((warn_unused_result)) (#523951)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user