- new upstream release

This commit is contained in:
Kamil Dudka 2009-12-01 13:11:47 +00:00
parent abaf0e0893
commit 8e49530030
4 changed files with 42 additions and 31 deletions

View File

@ -1 +1 @@
nano-2.0.9.tar.gz nano-2.2.0.tar.gz

View File

@ -1,5 +1,5 @@
diff --git a/src/chars.c b/src/chars.c diff --git a/src/chars.c b/src/chars.c
index 0061621..14c1267 100644 index beb88ca..1d73b81 100644
--- a/src/chars.c --- a/src/chars.c
+++ b/src/chars.c +++ b/src/chars.c
@@ -79,6 +79,16 @@ bool is_byte(int c) @@ -79,6 +79,16 @@ bool is_byte(int c)
@ -23,7 +23,7 @@ index 0061621..14c1267 100644
wchar_t wc; wchar_t wc;
if (mbtowc(&wc, c, MB_CUR_MAX) < 0) { if (mbtowc(&wc, c, MB_CUR_MAX) < 0) {
- mbtowc(NULL, NULL, 0); - int shutup = mbtowc(NULL, NULL, 0);
+ mbtowc_reset(); + mbtowc_reset();
wc = bad_wchar; wc = bad_wchar;
} }
@ -32,7 +32,7 @@ index 0061621..14c1267 100644
wchar_t wc; wchar_t wc;
if (mbtowc(&wc, c, MB_CUR_MAX) < 0) { if (mbtowc(&wc, c, MB_CUR_MAX) < 0) {
- mbtowc(NULL, NULL, 0); - int shutup = mbtowc(NULL, NULL, 0);
+ mbtowc_reset(); + mbtowc_reset();
wc = bad_wchar; wc = bad_wchar;
} }
@ -41,7 +41,7 @@ index 0061621..14c1267 100644
wchar_t wc; wchar_t wc;
if (mbtowc(&wc, c, MB_CUR_MAX) < 0) { if (mbtowc(&wc, c, MB_CUR_MAX) < 0) {
- mbtowc(NULL, NULL, 0); - int shutup = mbtowc(NULL, NULL, 0);
+ mbtowc_reset(); + mbtowc_reset();
wc = bad_wchar; wc = bad_wchar;
} }
@ -50,7 +50,7 @@ index 0061621..14c1267 100644
int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX); int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX);
if (c_mb_len < 0) { if (c_mb_len < 0) {
- mbtowc(NULL, NULL, 0); - int shutup = mbtowc(NULL, NULL, 0);
+ mbtowc_reset(); + mbtowc_reset();
wc = bad_wchar; wc = bad_wchar;
} }
@ -59,7 +59,7 @@ index 0061621..14c1267 100644
wchar_t wc; wchar_t wc;
if (mbtowc(&wc, c, MB_CUR_MAX) < 0) { if (mbtowc(&wc, c, MB_CUR_MAX) < 0) {
- mbtowc(NULL, NULL, 0); - int shutup = mbtowc(NULL, NULL, 0);
+ mbtowc_reset(); + mbtowc_reset();
*crep_len = bad_mbchar_len; *crep_len = bad_mbchar_len;
strncpy(crep, bad_mbchar, *crep_len); strncpy(crep, bad_mbchar, *crep_len);
@ -67,7 +67,7 @@ index 0061621..14c1267 100644
*crep_len = wctomb(crep, control_wrep(wc)); *crep_len = wctomb(crep, control_wrep(wc));
if (*crep_len < 0) { if (*crep_len < 0) {
- wctomb(NULL, 0); - int shutup = wctomb(NULL, 0);
+ wctomb_reset(); + wctomb_reset();
*crep_len = 0; *crep_len = 0;
} }
@ -76,7 +76,7 @@ index 0061621..14c1267 100644
/* Reject invalid Unicode characters. */ /* Reject invalid Unicode characters. */
if (mbtowc(&wc, c, MB_CUR_MAX) < 0 || !is_valid_unicode(wc)) { if (mbtowc(&wc, c, MB_CUR_MAX) < 0 || !is_valid_unicode(wc)) {
- mbtowc(NULL, NULL, 0); - int shutup = mbtowc(NULL, NULL, 0);
+ mbtowc_reset(); + mbtowc_reset();
*crep_len = bad_mbchar_len; *crep_len = bad_mbchar_len;
strncpy(crep, bad_mbchar, *crep_len); strncpy(crep, bad_mbchar, *crep_len);
@ -84,7 +84,7 @@ index 0061621..14c1267 100644
*crep_len = wctomb(crep, wc); *crep_len = wctomb(crep, wc);
if (*crep_len < 0) { if (*crep_len < 0) {
- wctomb(NULL, 0); - int shutup = wctomb(NULL, 0);
+ wctomb_reset(); + wctomb_reset();
*crep_len = 0; *crep_len = 0;
} }
@ -93,7 +93,7 @@ index 0061621..14c1267 100644
int width; int width;
if (mbtowc(&wc, c, MB_CUR_MAX) < 0) { if (mbtowc(&wc, c, MB_CUR_MAX) < 0) {
- mbtowc(NULL, NULL, 0); - int shutup = mbtowc(NULL, NULL, 0);
+ mbtowc_reset(); + mbtowc_reset();
wc = bad_wchar; wc = bad_wchar;
} }
@ -102,7 +102,7 @@ index 0061621..14c1267 100644
/* Reject invalid Unicode characters. */ /* Reject invalid Unicode characters. */
if (*chr_mb_len < 0 || !is_valid_unicode((wchar_t)chr)) { if (*chr_mb_len < 0 || !is_valid_unicode((wchar_t)chr)) {
- wctomb(NULL, 0); - int shutup = wctomb(NULL, 0);
+ wctomb_reset(); + wctomb_reset();
*chr_mb_len = 0; *chr_mb_len = 0;
} }
@ -111,7 +111,7 @@ index 0061621..14c1267 100644
/* If buf contains an invalid multibyte character, only /* If buf contains an invalid multibyte character, only
* interpret buf's first byte. */ * interpret buf's first byte. */
if (buf_mb_len < 0) { if (buf_mb_len < 0) {
- mblen(NULL, 0); - int shutup = mblen(NULL, 0);
+ IGNORE_CALL_RESULT(mblen(NULL, 0)); + IGNORE_CALL_RESULT(mblen(NULL, 0));
buf_mb_len = 1; buf_mb_len = 1;
} else if (buf_mb_len == 0) } else if (buf_mb_len == 0)
@ -120,7 +120,7 @@ index 0061621..14c1267 100644
s1_mb_len = parse_mbchar(s1, s1_mb, NULL); s1_mb_len = parse_mbchar(s1, s1_mb, NULL);
if (mbtowc(&ws1, s1_mb, s1_mb_len) < 0) { if (mbtowc(&ws1, s1_mb, s1_mb_len) < 0) {
- mbtowc(NULL, NULL, 0); - int shutup = mbtowc(NULL, NULL, 0);
+ mbtowc_reset(); + mbtowc_reset();
ws1 = (unsigned char)*s1_mb; ws1 = (unsigned char)*s1_mb;
bad_s1_mb = TRUE; bad_s1_mb = TRUE;
@ -129,7 +129,7 @@ index 0061621..14c1267 100644
s2_mb_len = parse_mbchar(s2, s2_mb, NULL); s2_mb_len = parse_mbchar(s2, s2_mb, NULL);
if (mbtowc(&ws2, s2_mb, s2_mb_len) < 0) { if (mbtowc(&ws2, s2_mb, s2_mb_len) < 0) {
- mbtowc(NULL, NULL, 0); - int shutup = mbtowc(NULL, NULL, 0);
+ mbtowc_reset(); + mbtowc_reset();
ws2 = (unsigned char)*s2_mb; ws2 = (unsigned char)*s2_mb;
bad_s2_mb = TRUE; bad_s2_mb = TRUE;
@ -138,7 +138,7 @@ index 0061621..14c1267 100644
int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX); int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX);
if (c_mb_len < 0) { if (c_mb_len < 0) {
- mbtowc(NULL, NULL, 0); - int shutup = mbtowc(NULL, NULL, 0);
+ mbtowc_reset(); + mbtowc_reset();
wc = (unsigned char)*c; wc = (unsigned char)*c;
bad_c_mb = TRUE; bad_c_mb = TRUE;
@ -147,35 +147,43 @@ index 0061621..14c1267 100644
int s_mb_len = parse_mbchar(s, s_mb, NULL); int s_mb_len = parse_mbchar(s, s_mb, NULL);
if (mbtowc(&ws, s_mb, s_mb_len) < 0) { if (mbtowc(&ws, s_mb, s_mb_len) < 0) {
- mbtowc(NULL, NULL, 0); - int shutup = mbtowc(NULL, NULL, 0);
+ mbtowc_reset(); + mbtowc_reset();
ws = (unsigned char)*s; ws = (unsigned char)*s;
bad_s_mb = TRUE; bad_s_mb = TRUE;
} }
diff --git a/src/files.c b/src/files.c diff --git a/src/files.c b/src/files.c
index 9840ec7..923b787 100644 index 17eb431..92d6d88 100644
--- a/src/files.c --- a/src/files.c
+++ b/src/files.c +++ b/src/files.c
@@ -1082,7 +1082,7 @@ char *get_full_path(const char *origpath) @@ -1092,7 +1092,6 @@ char *get_full_path(const char *origpath)
char *d_here, *d_there, *d_there_file = NULL;
const char *last_slash;
bool path_only;
- int shutup;
if (origpath == NULL)
return NULL;
@@ -1191,7 +1190,7 @@ char *get_full_path(const char *origpath)
/* Finally, go back to the path specified in d_here, /* Finally, go back to the path specified in d_here,
* where we were before. We don't check for a chdir() * where we were before. We don't check for a chdir()
* error, since we can do nothing if we get one. */ * error, since we can do nothing if we get one. */
- chdir(d_here); - shutup = chdir(d_here);
+ IGNORE_CALL_RESULT(chdir(d_here)); + IGNORE_CALL_RESULT(chdir(d_here));
/* Free d_here, since we're done using it. */ /* Free d_here, since we're done using it. */
free(d_here); free(d_here);
diff --git a/src/nano.h b/src/nano.h diff --git a/src/nano.h b/src/nano.h
index 195f548..2f1796b 100644 index 0cc8f22..2fe383f 100644
--- a/src/nano.h --- a/src/nano.h
+++ b/src/nano.h +++ b/src/nano.h
@@ -44,6 +44,9 @@ @@ -54,6 +54,9 @@
#include <sys/param.h> #include <stdarg.h>
#endif #endif
+/* Suppress warnings for __attribute__((warn_unused_result)) */ +/* Suppress warnings for __attribute__((warn_unused_result)) */
+#define IGNORE_CALL_RESULT(call) do { if (call) {} } while(0) +#define IGNORE_CALL_RESULT(call) do { if (call) {} } while(0)
+ +
/* Macros for flags. */ /* Macros for flags. */
#define SET(bit) flags |= bit #define FLAGOFF(flag) ((flag) / (sizeof(unsigned) * 8))
#define UNSET(bit) flags &= ~bit #define FLAGMASK(flag) (1 << ((flag) % (sizeof(unsigned) * 8)))

View File

@ -1,13 +1,13 @@
Summary: A small text editor Summary: A small text editor
Name: nano Name: nano
Version: 2.0.9 Version: 2.2.0
Release: 7%{?dist} Release: 1%{?dist}
License: GPLv3+ License: GPLv3+
Group: Applications/Editors Group: Applications/Editors
URL: http://www.nano-editor.org URL: http://www.nano-editor.org
Source: http://www.nano-editor.org/dist/v2.0/%{name}-%{version}.tar.gz Source: http://www.nano-editor.org/dist/v2.2/%{name}-%{version}.tar.gz
Source2: nanorc Source2: nanorc
Patch1: nano-2.0.9-warnings.patch Patch1: nano-2.2.0-warnings.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: gettext-devel BuildRequires: gettext-devel
@ -29,7 +29,7 @@ for f in doc/man/fr/{nano.1,nanorc.5,rnano.1} ; do
done done
%build %build
%configure --enable-all --bindir=/bin %configure --bindir=/bin
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
@ -80,6 +80,9 @@ rm -rf %{buildroot}
%{_datadir}/nano %{_datadir}/nano
%changelog %changelog
* Tue Dec 01 2009 Kamil Dudka <kdudka@redhat.com> - 2.2.0-1
- new upstream release
* Wed Nov 25 2009 Kamil Dudka <kdudka@redhat.com> - 2.0.9-7 * Wed Nov 25 2009 Kamil Dudka <kdudka@redhat.com> - 2.0.9-7
- sanitize specfile according to Fedora Packaging Guidelines - sanitize specfile according to Fedora Packaging Guidelines

View File

@ -1 +1 @@
2be94dc43fb60fff4626a2401a977220 nano-2.0.9.tar.gz b34ea8fac9563b0485f39a065b5893bf nano-2.2.0.tar.gz