From 2c7dabf3932e2175694b57f6d563a85a386a63ef Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Sat, 26 Dec 2009 23:55:18 +0000 Subject: [PATCH] - new upstream release --- .cvsignore | 2 +- nano-2.2.0-warnings.patch | 189 -------------------------------------- nano.spec | 9 +- sources | 2 +- 4 files changed, 6 insertions(+), 196 deletions(-) delete mode 100644 nano-2.2.0-warnings.patch diff --git a/.cvsignore b/.cvsignore index 18e387c..d2aa37d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -nano-2.2.0.tar.gz +nano-2.2.1.tar.gz diff --git a/nano-2.2.0-warnings.patch b/nano-2.2.0-warnings.patch deleted file mode 100644 index c7b7419..0000000 --- a/nano-2.2.0-warnings.patch +++ /dev/null @@ -1,189 +0,0 @@ -diff --git a/src/chars.c b/src/chars.c -index beb88ca..1d73b81 100644 ---- a/src/chars.c -+++ b/src/chars.c -@@ -79,6 +79,16 @@ bool is_byte(int c) - return ((unsigned int)c == (unsigned char)c); - } - -+static void mbtowc_reset(void) -+{ -+ IGNORE_CALL_RESULT(mbtowc(NULL, NULL, 0)); -+} -+ -+static void wctomb_reset(void) -+{ -+ IGNORE_CALL_RESULT(wctomb(NULL, 0)); -+} -+ - /* This function is equivalent to isalnum() for multibyte characters. */ - bool is_alnum_mbchar(const char *c) - { -@@ -89,7 +99,7 @@ bool is_alnum_mbchar(const char *c) - wchar_t wc; - - if (mbtowc(&wc, c, MB_CUR_MAX) < 0) { -- int shutup = mbtowc(NULL, NULL, 0); -+ mbtowc_reset(); - wc = bad_wchar; - } - -@@ -109,7 +119,7 @@ bool is_blank_mbchar(const char *c) - wchar_t wc; - - if (mbtowc(&wc, c, MB_CUR_MAX) < 0) { -- int shutup = mbtowc(NULL, NULL, 0); -+ mbtowc_reset(); - wc = bad_wchar; - } - -@@ -156,7 +166,7 @@ bool is_cntrl_mbchar(const char *c) - wchar_t wc; - - if (mbtowc(&wc, c, MB_CUR_MAX) < 0) { -- int shutup = mbtowc(NULL, NULL, 0); -+ mbtowc_reset(); - wc = bad_wchar; - } - -@@ -177,7 +187,7 @@ bool is_punct_mbchar(const char *c) - int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX); - - if (c_mb_len < 0) { -- int shutup = mbtowc(NULL, NULL, 0); -+ mbtowc_reset(); - wc = bad_wchar; - } - -@@ -243,14 +253,14 @@ char *control_mbrep(const char *c, char *crep, int *crep_len) - wchar_t wc; - - if (mbtowc(&wc, c, MB_CUR_MAX) < 0) { -- int shutup = mbtowc(NULL, NULL, 0); -+ mbtowc_reset(); - *crep_len = bad_mbchar_len; - strncpy(crep, bad_mbchar, *crep_len); - } else { - *crep_len = wctomb(crep, control_wrep(wc)); - - if (*crep_len < 0) { -- int shutup = wctomb(NULL, 0); -+ wctomb_reset(); - *crep_len = 0; - } - } -@@ -278,14 +288,14 @@ char *mbrep(const char *c, char *crep, int *crep_len) - - /* Reject invalid Unicode characters. */ - if (mbtowc(&wc, c, MB_CUR_MAX) < 0 || !is_valid_unicode(wc)) { -- int shutup = mbtowc(NULL, NULL, 0); -+ mbtowc_reset(); - *crep_len = bad_mbchar_len; - strncpy(crep, bad_mbchar, *crep_len); - } else { - *crep_len = wctomb(crep, wc); - - if (*crep_len < 0) { -- int shutup = wctomb(NULL, 0); -+ wctomb_reset(); - *crep_len = 0; - } - } -@@ -311,7 +321,7 @@ int mbwidth(const char *c) - int width; - - if (mbtowc(&wc, c, MB_CUR_MAX) < 0) { -- int shutup = mbtowc(NULL, NULL, 0); -+ mbtowc_reset(); - wc = bad_wchar; - } - -@@ -356,7 +366,7 @@ char *make_mbchar(long chr, int *chr_mb_len) - - /* Reject invalid Unicode characters. */ - if (*chr_mb_len < 0 || !is_valid_unicode((wchar_t)chr)) { -- int shutup = wctomb(NULL, 0); -+ wctomb_reset(); - *chr_mb_len = 0; - } - } else { -@@ -388,7 +398,7 @@ int parse_mbchar(const char *buf, char *chr, size_t *col) - /* If buf contains an invalid multibyte character, only - * interpret buf's first byte. */ - if (buf_mb_len < 0) { -- int shutup = mblen(NULL, 0); -+ IGNORE_CALL_RESULT(mblen(NULL, 0)); - buf_mb_len = 1; - } else if (buf_mb_len == 0) - buf_mb_len++; -@@ -545,7 +555,7 @@ int mbstrncasecmp(const char *s1, const char *s2, size_t n) - s1_mb_len = parse_mbchar(s1, s1_mb, NULL); - - if (mbtowc(&ws1, s1_mb, s1_mb_len) < 0) { -- int shutup = mbtowc(NULL, NULL, 0); -+ mbtowc_reset(); - ws1 = (unsigned char)*s1_mb; - bad_s1_mb = TRUE; - } -@@ -553,7 +563,7 @@ int mbstrncasecmp(const char *s1, const char *s2, size_t n) - s2_mb_len = parse_mbchar(s2, s2_mb, NULL); - - if (mbtowc(&ws2, s2_mb, s2_mb_len) < 0) { -- int shutup = mbtowc(NULL, NULL, 0); -+ mbtowc_reset(); - ws2 = (unsigned char)*s2_mb; - bad_s2_mb = TRUE; - } -@@ -781,7 +791,7 @@ char *mbstrchr(const char *s, const char *c) - int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX); - - if (c_mb_len < 0) { -- int shutup = mbtowc(NULL, NULL, 0); -+ mbtowc_reset(); - wc = (unsigned char)*c; - bad_c_mb = TRUE; - } -@@ -790,7 +800,7 @@ char *mbstrchr(const char *s, const char *c) - int s_mb_len = parse_mbchar(s, s_mb, NULL); - - if (mbtowc(&ws, s_mb, s_mb_len) < 0) { -- int shutup = mbtowc(NULL, NULL, 0); -+ mbtowc_reset(); - ws = (unsigned char)*s; - bad_s_mb = TRUE; - } -diff --git a/src/files.c b/src/files.c -index 17eb431..92d6d88 100644 ---- a/src/files.c -+++ b/src/files.c -@@ -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, - * where we were before. We don't check for a chdir() - * error, since we can do nothing if we get one. */ -- shutup = chdir(d_here); -+ IGNORE_CALL_RESULT(chdir(d_here)); - - /* Free d_here, since we're done using it. */ - free(d_here); -diff --git a/src/nano.h b/src/nano.h -index 0cc8f22..2fe383f 100644 ---- a/src/nano.h -+++ b/src/nano.h -@@ -54,6 +54,9 @@ - #include - #endif - -+/* Suppress warnings for __attribute__((warn_unused_result)) */ -+#define IGNORE_CALL_RESULT(call) do { if (call) {} } while(0) -+ - /* Macros for flags. */ - #define FLAGOFF(flag) ((flag) / (sizeof(unsigned) * 8)) - #define FLAGMASK(flag) (1 << ((flag) % (sizeof(unsigned) * 8))) diff --git a/nano.spec b/nano.spec index 0acd221..39b9c76 100644 --- a/nano.spec +++ b/nano.spec @@ -1,13 +1,12 @@ Summary: A small text editor Name: nano -Version: 2.2.0 +Version: 2.2.1 Release: 1%{?dist} License: GPLv3+ Group: Applications/Editors URL: http://www.nano-editor.org Source: http://www.nano-editor.org/dist/v2.2/%{name}-%{version}.tar.gz Source2: nanorc -Patch1: nano-2.2.0-warnings.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: autoconf BuildRequires: gettext-devel @@ -23,9 +22,6 @@ GNU nano is a small and friendly text editor. %prep %setup -q -# applied upstream -%patch1 -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 touch $f.html @@ -83,6 +79,9 @@ rm -rf %{buildroot} %{_datadir}/nano %changelog +* Sun Dec 27 2009 Kamil Dudka - 2.2.1-1 +- new upstream release + * Tue Dec 01 2009 Kamil Dudka - 2.2.0-1 - new upstream release diff --git a/sources b/sources index 553e997..0135484 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b34ea8fac9563b0485f39a065b5893bf nano-2.2.0.tar.gz +12eb7808ab1b8df4d20e87df22c38143 nano-2.2.1.tar.gz