From 5d16720d21805719ac0aef0853af255bb7ab52c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 11 Sep 2018 09:22:08 +0200 Subject: [PATCH] 2.2.12 bump --- .gitignore | 1 + indent-2.2.11-Allow-64-bit-stat.patch | 102 ----------- ...t-decimal-float-suffix-from-constant.patch | 98 ----------- indent-2.2.11-Fix-compiler-warnings.patch | 66 ------- ...2.11-Fix-copying-overlapping-comment.patch | 51 ------ indent-2.2.11-Fix-nbdfa-and-nbdfe-typo.patch | 31 ---- ...2.2.11-Modernize-texi2html-arguments.patch | 41 ----- ...-non-zero-exit-code-on-tests-failure.patch | 24 --- ...nt-2.2.11-Support-hexadecimal-floats.patch | 166 ------------------ ...-typo-about-enabling-control-comment.patch | 31 ---- ...-ax_cc_for_build.m4-for-CC_FOR_BUILD.patch | 105 +++++++++++ ...dle-else-short-option-and-index-remo.patch | 39 ++-- indent-2.2.9-lcall.patch | 12 -- indent.spec | 113 ++++++------ sources | 2 +- 15 files changed, 188 insertions(+), 694 deletions(-) delete mode 100644 indent-2.2.11-Allow-64-bit-stat.patch delete mode 100644 indent-2.2.11-Do-not-split-decimal-float-suffix-from-constant.patch delete mode 100644 indent-2.2.11-Fix-compiler-warnings.patch delete mode 100644 indent-2.2.11-Fix-copying-overlapping-comment.patch delete mode 100644 indent-2.2.11-Fix-nbdfa-and-nbdfe-typo.patch delete mode 100644 indent-2.2.11-Modernize-texi2html-arguments.patch delete mode 100644 indent-2.2.11-Return-non-zero-exit-code-on-tests-failure.patch delete mode 100644 indent-2.2.11-Support-hexadecimal-floats.patch delete mode 100644 indent-2.2.11-doc-Correct-a-typo-about-enabling-control-comment.patch create mode 100644 indent-2.2.12-Add-m4-ax_cc_for_build.m4-for-CC_FOR_BUILD.patch rename indent-2.2.9-man.patch => indent-2.2.12-doc-Fix-dont-cuddle-else-short-option-and-index-remo.patch (53%) delete mode 100644 indent-2.2.9-lcall.patch diff --git a/.gitignore b/.gitignore index 9fee568..b020f50 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ indent-2.2.11.tar.gz +/indent-2.2.12.tar.xz diff --git a/indent-2.2.11-Allow-64-bit-stat.patch b/indent-2.2.11-Allow-64-bit-stat.patch deleted file mode 100644 index 077222b..0000000 --- a/indent-2.2.11-Allow-64-bit-stat.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 7ef312f8a721b99469ea85e33e973475006c6a7f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Tue, 19 Feb 2013 13:17:12 +0100 -Subject: [PATCH 2/2] Allow 64-bit stat - ---- - src/code_io.c | 38 ++++++++++++++++++++++++++++++++------ - src/indent.h | 2 +- - 2 files changed, 33 insertions(+), 7 deletions(-) - -diff --git a/src/code_io.c b/src/code_io.c -index 8c8fd41..8b93188 100644 ---- a/src/code_io.c -+++ b/src/code_io.c -@@ -50,6 +50,8 @@ - #include - #endif - #include -+#include -+#include - - #ifdef VMS - #include -@@ -246,13 +248,18 @@ extern file_buffer_ty * read_file( - { - static file_buffer_ty fileptr = {NULL}; - -+#if defined(__MSDOS__) || defined(VMS) - /* - * size is required to be unsigned for MSDOS, - * in order to read files larger than 32767 - * bytes in a 16-bit world... - */ - -- unsigned int size; -+ unsigned int size, size_to_read; -+#else -+ ssize_t size; -+ size_t size_to_read; -+#endif - - int namelen = strlen(filename); - int fd = open(filename, O_RDONLY, 0777); -@@ -289,6 +296,10 @@ extern file_buffer_ty * read_file( - } - } - -+ if (file_stats->st_size > SSIZE_MAX) -+ { -+ fatal(_("File %s is too big to read"), filename); -+ } - fileptr.size = file_stats->st_size; - - if (fileptr.data != 0) -@@ -305,11 +316,26 @@ extern file_buffer_ty * read_file( - * newline. */ - } - -- size = INDENT_SYS_READ (fd, fileptr.data, fileptr.size); -- -- if (size == (unsigned int) -1) -- { -- fatal (_("Error reading input file %s"), filename); -+ size_to_read = fileptr.size; -+ while (size_to_read > 0) { -+ size = INDENT_SYS_READ (fd, fileptr.data + fileptr.size - size_to_read, -+ size_to_read); -+ -+ if (size == -+#if defined(__MSDOS__) || defined(VMS) -+ (unsigned int) -+#endif -+ -1) -+ { -+#if !defined(__MSDOS__) && !defined(VMS) -+ if (errno == EINTR) -+ { -+ continue; -+ } -+#endif -+ fatal (_("Error reading input file %s"), filename); -+ } -+ size_to_read -= size; - } - - if (close (fd) < 0) -diff --git a/src/indent.h b/src/indent.h -index 60ccb5a..bcb6b64 100644 ---- a/src/indent.h -+++ b/src/indent.h -@@ -106,7 +106,7 @@ typedef unsigned char BOOLEAN; - typedef struct file_buffer - { - char *name; -- unsigned long size; -+ size_t size; - char *data; - } file_buffer_ty; - --- -1.8.1.2 - diff --git a/indent-2.2.11-Do-not-split-decimal-float-suffix-from-constant.patch b/indent-2.2.11-Do-not-split-decimal-float-suffix-from-constant.patch deleted file mode 100644 index ea34d0e..0000000 --- a/indent-2.2.11-Do-not-split-decimal-float-suffix-from-constant.patch +++ /dev/null @@ -1,98 +0,0 @@ -From ff47ab3b90333bdfaa40b86cb548e92a01787345 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Thu, 25 Aug 2011 11:26:24 +0200 -Subject: [PATCH] Do not split decimal float suffix from constant - -N1312 draft of ISO/IEC WDTR24732 defines additional floating types -with given suffixes: - -_Decimal32 DF, df -_Decimal64 DD, dd -_Decimal128 DL, dl - -These suffixes must stick on numeric part of the constant as classic -float or long float does. ---- - regression/TEST | 3 ++- - regression/input/float-constant-suffix.c | 13 +++++++++++++ - regression/standard/float-constant-suffix.c | 13 +++++++++++++ - src/lexi.c | 9 +++++++++ - 4 files changed, 37 insertions(+), 1 deletions(-) - create mode 100644 regression/input/float-constant-suffix.c - create mode 100644 regression/standard/float-constant-suffix.c - -diff --git a/regression/TEST b/regression/TEST -index c860ef2..1402ddf 100755 ---- a/regression/TEST -+++ b/regression/TEST -@@ -35,7 +35,8 @@ EXAMPLES="do.c else.c for.c func-def.c lshift.c ncs.c \ - - BUGS="case-label.c one-line-1.c one-line-2.c one-line-3.c \ - one-line-4.c struct-decl.c sizeof-in-while.c line-break-comment.c \ -- macro.c enum.c elif.c nested.c wrapped-string.c minus_predecrement.c" -+ macro.c enum.c elif.c nested.c wrapped-string.c minus_predecrement.c \ -+ float-constant-suffix.c" - - INDENTSRC="args.c backup.h backup.c dirent_def.h globs.c indent.h \ - indent.c indent_globs.h io.c lexi.c memcpy.c parse.c pr_comment.c \ -diff --git a/regression/input/float-constant-suffix.c b/regression/input/float-constant-suffix.c -new file mode 100644 -index 0000000..58f5310 ---- /dev/null -+++ b/regression/input/float-constant-suffix.c -@@ -0,0 +1,13 @@ -+float foo = 1.0F; -+float foo = 1.0f; -+double foo = 1.0; -+double foo = 1.0; -+long double foo = 1.0L; -+long double foo = 1.0l; -+ -+_Decimal32 foo = 1.0DF; -+_Decimal32 foo = 1.0df; -+_Decimal64 foo = 1.0DD; -+_Decimal64 foo = 1.0dd; -+_Decimal128 foo = 1.0DL; -+_Decimal128 foo = 1.0dl; -diff --git a/regression/standard/float-constant-suffix.c b/regression/standard/float-constant-suffix.c -new file mode 100644 -index 0000000..58f5310 ---- /dev/null -+++ b/regression/standard/float-constant-suffix.c -@@ -0,0 +1,13 @@ -+float foo = 1.0F; -+float foo = 1.0f; -+double foo = 1.0; -+double foo = 1.0; -+long double foo = 1.0L; -+long double foo = 1.0l; -+ -+_Decimal32 foo = 1.0DF; -+_Decimal32 foo = 1.0df; -+_Decimal64 foo = 1.0DD; -+_Decimal64 foo = 1.0dd; -+_Decimal128 foo = 1.0DL; -+_Decimal128 foo = 1.0dl; -diff --git a/src/lexi.c b/src/lexi.c -index abc2bfa..eafb65e 100644 ---- a/src/lexi.c -+++ b/src/lexi.c -@@ -330,6 +330,15 @@ extern codes_ty lexi(void) - { - buf_ptr++; - } -+ else if (*buf_ptr == 'D' || *buf_ptr == 'd') -+ { -+ if (buf_ptr[1] == 'F' || buf_ptr[1] == 'f' || -+ buf_ptr[1] == 'D' || buf_ptr[1] == 'd' || -+ buf_ptr[1] == 'L' || buf_ptr[1] == 'l') -+ { -+ buf_ptr+=2; -+ } -+ } - else - { - while (*buf_ptr == 'U' || *buf_ptr == 'u' || *buf_ptr == 'L' || *buf_ptr == 'l') --- -1.7.6 - diff --git a/indent-2.2.11-Fix-compiler-warnings.patch b/indent-2.2.11-Fix-compiler-warnings.patch deleted file mode 100644 index 30dab2d..0000000 --- a/indent-2.2.11-Fix-compiler-warnings.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 1394dd08b2284a0f83fac63025d19b66653d6585 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Tue, 19 Feb 2013 11:34:25 +0100 -Subject: [PATCH 1/2] Fix compiler warnings - ---- - src/args.c | 6 ++++++ - src/lexi.c | 10 ---------- - 2 files changed, 6 insertions(+), 10 deletions(-) - -diff --git a/src/args.c b/src/args.c -index f392cce..abd2a6a 100644 ---- a/src/args.c -+++ b/src/args.c -@@ -62,6 +62,10 @@ - /* Argument scanning and profile reading code. Default parameters are set - * here as well. */ - -+#ifndef _XOPEN_SOURCE -+#define _XOPEN_SOURCE 500 /* strdup(3) */ -+#endif -+ - #include - #include - #include -@@ -174,7 +178,9 @@ static int exp_o = 0; - static int exp_orig = 0; - static int exp_pcs = 0; - static int exp_pi = 0; -+#ifdef PRESERVE_MTIME - static int exp_pmt = 0; -+#endif - static int exp_pro = 0; - static int exp_prs = 0; - static int exp_psl = 0; -diff --git a/src/lexi.c b/src/lexi.c -index abc2bfa..ef80e38 100644 ---- a/src/lexi.c -+++ b/src/lexi.c -@@ -198,11 +198,6 @@ int main (void) - #endif - - /* Include code generated by gperf */ --#ifdef __GNUC__ --__inline --#endif --templ_ty *is_reserved (const char *str, unsigned int len); -- - #include "gperf.c" - - /* Include code generated by gperf for C++ keyword set */ -@@ -212,11 +207,6 @@ templ_ty *is_reserved (const char *str, unsigned int len); - #undef MIN_WORD_LENGTH - #undef MAX_WORD_LENGTH - --#ifdef __GNUC__ --__inline --#endif --templ_ty *is_reserved_cc (register const char *str, register unsigned int len); -- - #include "gperf-cc.c" - - /** --- -1.8.1.2 - diff --git a/indent-2.2.11-Fix-copying-overlapping-comment.patch b/indent-2.2.11-Fix-copying-overlapping-comment.patch deleted file mode 100644 index 56f02c8..0000000 --- a/indent-2.2.11-Fix-copying-overlapping-comment.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 9e8a1699099f9aea5da11064e3aa9387ae9cffc6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Thu, 7 Mar 2013 11:32:02 +0100 -Subject: [PATCH] Fix copying overlapping comment - -Reformating block comments with -fca option triggered memcpy() on -overlapping areas. - -E.g. comment: - - /* Some statement. Unless it's special, arrange - * to break the line. */ - -from indent-2.2.11/indent.c hits it: - -$ valgrind -- ./indent -o /dev/null -fca indent.c -Memcheck, a memory error detector -Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al. -Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info -Command: ./indent -o /dev/null -fca indent.c - -Source and destination overlap in memcpy(0x4c2c3c4, 0x4c2c3c9, 6) - at 0x4A0A230: memcpy@@GLIBC_2.14 (mc_replace_strmem.c:882) - by 0x404EA7: print_comment (comments.c:857) - by 0x40EB92: handle_token_comment (handletoken.c:2119) - by 0x40EF38: handle_the_token (handletoken.c:2315) - by 0x401FDB: indent_main_loop (indent.c:628) - by 0x4021CD: indent (indent.c:715) - by 0x402869: indent_single_file (indent.c:960) - by 0x4028F1: indent_all (indent.c:992) - by 0x4029E5: main (indent.c:1054) ---- - src/comments.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/comments.c b/src/comments.c -index 01776e8..2ee8fc6 100644 ---- a/src/comments.c -+++ b/src/comments.c -@@ -854,7 +854,7 @@ begin_line: - save_length--; - } - -- (void) memcpy (e_com, save_ptr, save_length); -+ (void) memmove (e_com, save_ptr, save_length); - text_on_line = e_com; - e_com += save_length; - --- -1.8.1.4 - diff --git a/indent-2.2.11-Fix-nbdfa-and-nbdfe-typo.patch b/indent-2.2.11-Fix-nbdfa-and-nbdfe-typo.patch deleted file mode 100644 index dca9795..0000000 --- a/indent-2.2.11-Fix-nbdfa-and-nbdfe-typo.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 138fedaef6d94f7fe1601a6eba90d6354a7fb4dd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Mon, 9 Nov 2015 10:09:57 +0100 -Subject: [PATCH] Fix -nbdfa and -nbdfe typo -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - - - -Signed-off-by: Petr Písař ---- - doc/indent.texinfo | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/doc/indent.texinfo b/doc/indent.texinfo -index 08f35f6..50aaf61 100644 ---- a/doc/indent.texinfo -+++ b/doc/indent.texinfo -@@ -1048,7 +1048,7 @@ appear at one indention level deeper than the function declaration. This - is particularly helpful for functions with long argument lists. - The option @option{-bfde} causes a newline to be forced before the closing - bracket of the function declaration. For both options the 'n' setting is the default: ---nbdfa and -nbdfe. -+-nbfda and -nbfde. - - - For --- -2.4.3 - diff --git a/indent-2.2.11-Modernize-texi2html-arguments.patch b/indent-2.2.11-Modernize-texi2html-arguments.patch deleted file mode 100644 index b199929..0000000 --- a/indent-2.2.11-Modernize-texi2html-arguments.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 7df0983c326f406dddbcc7c98dce72d5174d2a3c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Wed, 18 Mar 2015 18:30:01 +0100 -Subject: [PATCH] Modernize texi2html arguments -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -texi2html-5.0 complains on -number argument: - - Option number is ambiguous (number-footnotes, number-sections) - -This patch updates texi2html arguments to comply with texi2html-5.0. - -Signed-off-by: Petr Písař - -diff --git a/doc/Makefile.am b/doc/Makefile.am -index d1fb09a..5eb9dc0 100644 ---- a/doc/Makefile.am -+++ b/doc/Makefile.am -@@ -34,14 +34,14 @@ html-monolithic: @PACKAGE@.html - html-split: @PACKAGE@_toc.html - - @PACKAGE@.html: version.texi $(@PACKAGE@_TEXINFOS) -- $(TEXI2HTML) -expandinfo -number -monolithic `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` -+ $(TEXI2HTML) -expand info -number-sections -monolithic `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` - - @PACKAGE@_toc.html: version.texi $(@PACKAGE@_TEXINFOS) - case "$(TEXI2HTML)" in \ - *"/missing texi2html") \ -- $(TEXI2HTML) -expand info -number -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` || exit 0 ;; \ -+ $(TEXI2HTML) -expand info -number-sections -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` || exit 0 ;; \ - *) $(RM) @PACKAGE@_*.html ; \ -- $(TEXI2HTML) -expand info -number -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` ;; \ -+ $(TEXI2HTML) -expand info -number-sections -nomenu -split section `if test -f @PACKAGE@.texinfo; then echo @PACKAGE@.texinfo; else echo $(srcdir)/@PACKAGE@.texinfo; fi` ;; \ - esac - - install-html-monolithic: @PACKAGE@.html --- -2.1.0 - diff --git a/indent-2.2.11-Return-non-zero-exit-code-on-tests-failure.patch b/indent-2.2.11-Return-non-zero-exit-code-on-tests-failure.patch deleted file mode 100644 index e3a7437..0000000 --- a/indent-2.2.11-Return-non-zero-exit-code-on-tests-failure.patch +++ /dev/null @@ -1,24 +0,0 @@ -From c0001598a2b5b4cc8739beeb183f0d3f9c6a1d84 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Thu, 2 Feb 2012 17:12:44 +0100 -Subject: [PATCH] Return non-zero exit code on tests failure - ---- - regression/TEST | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/regression/TEST b/regression/TEST -index c860ef2..620e77f 100755 ---- a/regression/TEST -+++ b/regression/TEST -@@ -441,6 +441,7 @@ then - cat $ERR - echo '**** Errors occured: ./output not removed' - echo -+ exit 1 - else - cd .. - ls -l output --- -1.7.7.6 - diff --git a/indent-2.2.11-Support-hexadecimal-floats.patch b/indent-2.2.11-Support-hexadecimal-floats.patch deleted file mode 100644 index c74b4e6..0000000 --- a/indent-2.2.11-Support-hexadecimal-floats.patch +++ /dev/null @@ -1,166 +0,0 @@ -From 582ad604b72f1ce3c8d00ac0e964f28a8d615604 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Wed, 18 Mar 2015 16:29:49 +0100 -Subject: [PATCH] Support hexadecimal floats -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Petr Písař ---- - regression/TEST | 2 +- - regression/input/hexadecimal_float.c | 17 +++++++++ - regression/standard/hexadecimal_float.c | 17 +++++++++ - src/lexi.c | 63 ++++++++++++++++----------------- - 4 files changed, 66 insertions(+), 33 deletions(-) - create mode 100644 regression/input/hexadecimal_float.c - create mode 100644 regression/standard/hexadecimal_float.c - -diff --git a/regression/TEST b/regression/TEST -index 480ef7c..7db4c36 100755 ---- a/regression/TEST -+++ b/regression/TEST -@@ -36,7 +36,7 @@ EXAMPLES="do.c else.c for.c func-def.c lshift.c ncs.c \ - BUGS="case-label.c one-line-1.c one-line-2.c one-line-3.c \ - one-line-4.c struct-decl.c sizeof-in-while.c line-break-comment.c \ - macro.c enum.c elif.c nested.c wrapped-string.c minus_predecrement.c \ -- float-constant-suffix.c" -+ float-constant-suffix.c hexadecimal_float.c" - - INDENTSRC="args.c backup.h backup.c dirent_def.h globs.c indent.h \ - indent.c indent_globs.h io.c lexi.c memcpy.c parse.c pr_comment.c \ -diff --git a/regression/input/hexadecimal_float.c b/regression/input/hexadecimal_float.c -new file mode 100644 -index 0000000..34c52cd ---- /dev/null -+++ b/regression/input/hexadecimal_float.c -@@ -0,0 +1,17 @@ -+/* Hexadecimal */ -+double xpi = 0x1.921fb54442d18p+1; -+double xa = 0xe.fp-1; -+double xb = 0xe.fP-1; -+double xc = 0xf.P+1; -+double xd = 0x.fP+1; -+/* hexadecimal floats must have exponent part */ -+ -+/* Decimal */ -+double dpi = 3.141592653589793e+0; -+double da = 1.2e-1; -+double db = 1.2E-1; -+double dc = 1.E+1; -+double dd = .1E+1; -+double de = 1.2; -+double df = 1.; -+double dg = .1; -diff --git a/regression/standard/hexadecimal_float.c b/regression/standard/hexadecimal_float.c -new file mode 100644 -index 0000000..34c52cd ---- /dev/null -+++ b/regression/standard/hexadecimal_float.c -@@ -0,0 +1,17 @@ -+/* Hexadecimal */ -+double xpi = 0x1.921fb54442d18p+1; -+double xa = 0xe.fp-1; -+double xb = 0xe.fP-1; -+double xc = 0xf.P+1; -+double xd = 0x.fP+1; -+/* hexadecimal floats must have exponent part */ -+ -+/* Decimal */ -+double dpi = 3.141592653589793e+0; -+double da = 1.2e-1; -+double db = 1.2E-1; -+double dc = 1.E+1; -+double dd = .1E+1; -+double de = 1.2; -+double df = 1.; -+double dg = .1; -diff --git a/src/lexi.c b/src/lexi.c -index 0a98059..21e2c24 100644 ---- a/src/lexi.c -+++ b/src/lexi.c -@@ -267,50 +267,49 @@ extern codes_ty lexi(void) - if (isdigit (*buf_ptr) || - ((buf_ptr[0] == '.') && isdigit (buf_ptr[1]))) - { -- int seendot = 0, seenexp = 0; -+ int seendot = 0, seenexp = 0, ishexa = 0; - - if ((*buf_ptr == '0') && ((buf_ptr[1] == 'x') || (buf_ptr[1] == 'X'))) - { -- buf_ptr += 2; -- while (isxdigit (*buf_ptr)) -- { -- buf_ptr++; -- } -+ ishexa = 1; -+ buf_ptr += 1; - } -- else -+ while (1) - { -- while (1) -+ if (*buf_ptr == '.') - { -- if (*buf_ptr == '.') -+ if (seendot) - { -- if (seendot) -- { -- break; -- } -- else -- { -- seendot++; -- } -+ break; - } -+ else -+ { -+ seendot++; -+ } -+ } - -- buf_ptr++; -- -- if (!isdigit (*buf_ptr) && *buf_ptr != '.') -+ buf_ptr++; -+ -+ if (!(ishexa && !seenexp ? -+ isxdigit (*buf_ptr) : isdigit (*buf_ptr) -+ ) && *buf_ptr != '.') -+ { -+ if ((ishexa ? -+ (*buf_ptr != 'P' && *buf_ptr != 'p') : -+ (*buf_ptr != 'E' && *buf_ptr != 'e') -+ ) || seenexp) - { -- if ((*buf_ptr != 'E' && *buf_ptr != 'e') || seenexp) -- { -- break; -- } -- else -+ break; -+ } -+ else -+ { -+ seenexp++; -+ seendot++; -+ buf_ptr++; -+ -+ if (*buf_ptr == '+' || *buf_ptr == '-') - { -- seenexp++; -- seendot++; - buf_ptr++; -- -- if (*buf_ptr == '+' || *buf_ptr == '-') -- { -- buf_ptr++; -- } - } - } - } --- -2.1.0 - diff --git a/indent-2.2.11-doc-Correct-a-typo-about-enabling-control-comment.patch b/indent-2.2.11-doc-Correct-a-typo-about-enabling-control-comment.patch deleted file mode 100644 index c10956a..0000000 --- a/indent-2.2.11-doc-Correct-a-typo-about-enabling-control-comment.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 5ddb9821391e7417bddd4388f78e810ea15a39d1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Thu, 2 Apr 2015 16:14:12 +0200 -Subject: [PATCH] doc: Correct a typo about enabling control comment -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - - - -Signed-off-by: Petr Písař ---- - doc/indent.texinfo | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/doc/indent.texinfo b/doc/indent.texinfo -index 08f35f6..15627e0 100644 ---- a/doc/indent.texinfo -+++ b/doc/indent.texinfo -@@ -1463,7 +1463,7 @@ formatting for a section of a program, place the disabling control - comment @code{/* *INDENT-OFF* */} on a line by itself just before that - section. Program text scanned after this control comment is output - precisely as input with no modifications until the corresponding --enabling comment is scanned on a line by itself. The disabling control -+enabling comment is scanned on a line by itself. The enabling control - comment is @code{/* *INDENT-ON* */}, and any text following the comment - on the line is also output unformatted. Formatting begins again with - the input line following the enabling control comment. --- -2.1.0 - diff --git a/indent-2.2.12-Add-m4-ax_cc_for_build.m4-for-CC_FOR_BUILD.patch b/indent-2.2.12-Add-m4-ax_cc_for_build.m4-for-CC_FOR_BUILD.patch new file mode 100644 index 0000000..c28dc42 --- /dev/null +++ b/indent-2.2.12-Add-m4-ax_cc_for_build.m4-for-CC_FOR_BUILD.patch @@ -0,0 +1,105 @@ +From d3982dea9e7dd01bae68983df38a40d374b168bb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Thu, 13 Sep 2018 15:34:03 +0200 +Subject: [PATCH] Add m4/ax_cc_for_build.m4 for CC_FOR_BUILD +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +CC_FOR_BUILD variable is used in man/Makefile.am. +m4/ax_cc_for_build.m4 macro file is missing from autoconf-2.69, thus +it is not possible to build indent after regenerating a build script +with autoreconf. We need to distribute the macro file in indent. + +Signed-off-by: Petr Písař +--- + m4/ax_cc_for_build.m4 | 77 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 77 insertions(+) + create mode 100644 m4/ax_cc_for_build.m4 + +diff --git a/m4/ax_cc_for_build.m4 b/m4/ax_cc_for_build.m4 +new file mode 100644 +index 0000000..c62ffad +--- /dev/null ++++ b/m4/ax_cc_for_build.m4 +@@ -0,0 +1,77 @@ ++# =========================================================================== ++# https://www.gnu.org/software/autoconf-archive/ax_cc_for_build.html ++# =========================================================================== ++# ++# SYNOPSIS ++# ++# AX_CC_FOR_BUILD ++# ++# DESCRIPTION ++# ++# Find a build-time compiler. Sets CC_FOR_BUILD and EXEEXT_FOR_BUILD. ++# ++# LICENSE ++# ++# Copyright (c) 2010 Reuben Thomas ++# Copyright (c) 1999 Richard Henderson ++# ++# This program is free software: you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation, either version 3 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General ++# Public License for more details. ++# ++# You should have received a copy of the GNU General Public License along ++# with this program. If not, see . ++# ++# As a special exception, the respective Autoconf Macro's copyright owner ++# gives unlimited permission to copy, distribute and modify the configure ++# scripts that are the output of Autoconf when processing the Macro. You ++# need not follow the terms of the GNU General Public License when using ++# or distributing such scripts, even though portions of the text of the ++# Macro appear in them. The GNU General Public License (GPL) does govern ++# all other use of the material that constitutes the Autoconf Macro. ++# ++# This special exception to the GPL applies to versions of the Autoconf ++# Macro released by the Autoconf Archive. When you make and distribute a ++# modified version of the Autoconf Macro, you may extend this special ++# exception to the GPL to apply to your modified version as well. ++ ++#serial 3 ++ ++dnl Get a default for CC_FOR_BUILD to put into Makefile. ++AC_DEFUN([AX_CC_FOR_BUILD], ++[# Put a plausible default for CC_FOR_BUILD in Makefile. ++if test -z "$CC_FOR_BUILD"; then ++ if test "x$cross_compiling" = "xno"; then ++ CC_FOR_BUILD='$(CC)' ++ else ++ CC_FOR_BUILD=gcc ++ fi ++fi ++AC_SUBST(CC_FOR_BUILD) ++# Also set EXEEXT_FOR_BUILD. ++if test "x$cross_compiling" = "xno"; then ++ EXEEXT_FOR_BUILD='$(EXEEXT)' ++else ++ AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext, ++ [rm -f conftest* ++ echo 'int main () { return 0; }' > conftest.c ++ bfd_cv_build_exeext= ++ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5 ++ for file in conftest.*; do ++ case $file in ++ *.c | *.o | *.obj | *.ilk | *.pdb) ;; ++ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; ++ esac ++ done ++ rm -f conftest* ++ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no]) ++ EXEEXT_FOR_BUILD="" ++ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext} ++fi ++AC_SUBST(EXEEXT_FOR_BUILD)])dnl +-- +2.17.1 + diff --git a/indent-2.2.9-man.patch b/indent-2.2.12-doc-Fix-dont-cuddle-else-short-option-and-index-remo.patch similarity index 53% rename from indent-2.2.9-man.patch rename to indent-2.2.12-doc-Fix-dont-cuddle-else-short-option-and-index-remo.patch index 3d825f5..687273d 100644 --- a/indent-2.2.9-man.patch +++ b/indent-2.2.12-doc-Fix-dont-cuddle-else-short-option-and-index-remo.patch @@ -1,8 +1,22 @@ -Only in indent-2.2.9/doc: all_opts -diff -Bburpd indent-2.2.9-orig/doc/indent.texinfo indent-2.2.9/doc/indent.texinfo ---- indent-2.2.9-orig/doc/indent.texinfo 2006-07-16 07:25:25.000000000 -0400 -+++ indent-2.2.9/doc/indent.texinfo 2006-07-16 07:57:33.000000000 -0400 -@@ -754,7 +754,7 @@ if (x > 0) +From 98a85f736394e4410235a402289009d22a13d333 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Thu, 13 Sep 2018 14:24:15 +0200 +Subject: [PATCH] doc: Fix --dont-cuddle-else short option and index + --remove-preprocessor-space +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + doc/indent.texi | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/doc/indent.texi b/doc/indent.texi +index a4b076b..4caa797 100644 +--- a/doc/indent.texi ++++ b/doc/indent.texi +@@ -792,7 +792,7 @@ if (x > 0) @kindex -ce @kindex --cuddle-else @@ -11,7 +25,7 @@ diff -Bburpd indent-2.2.9-orig/doc/indent.texinfo indent-2.2.9/doc/indent.texinf @kindex --dont-cuddle-else If you are using the @option{-br} option, you probably want to also use the @option{-ce} option. This causes the @code{else} in an if-then-else -@@ -1666,6 +1666,11 @@ Line up continued lines at parentheses.@ +@@ -2046,6 +2046,11 @@ Line up continued lines at parentheses.@* Leave space between @samp{#} and preprocessor directive.@* @xref{Indentation}. @@ -23,19 +37,22 @@ diff -Bburpd indent-2.2.9-orig/doc/indent.texinfo indent-2.2.9/doc/indent.texinf @item -nbad @itemx --no-blank-lines-after-declarations Do not force blank lines after declarations.@* -@@ -1979,6 +1989,7 @@ the corresponding short option. +@@ -2412,6 +2417,7 @@ the corresponding short option. \line{ --preprocessor-indentation \leaderfill -ppi@var{n}\ } \line{ --preserve-mtime \leaderfill -pmt\ } \line{ --procnames-start-lines \leaderfill -psl\ } +\line{ --remove-preprocessor-space \leaderfill -nlps\ } - \line{ --space-after-cast \leaderfill -cs\ \ } + \line{ --single-line-conditionals \leaderfill -slc\ } + \line{ --space-after-cast \leaderfill -cs\ \ } \line{ --space-after-for \leaderfill -saf\ } - \line{ --space-after-if \leaderfill -sai\ } -@@ -2063,6 +2075,7 @@ the corresponding short option. +@@ -2507,6 +2513,7 @@ the corresponding short option. --preserve-mtime -pmt --preprocessor-indentation -ppi@var{n} --procnames-start-lines -psl +--remove-preprocessor-space -nlps + --single-line-conditionals -slc --space-after-cast -cs --space-after-for -saf - --space-after-if -sai +-- +2.17.1 + diff --git a/indent-2.2.9-lcall.patch b/indent-2.2.9-lcall.patch deleted file mode 100644 index 3fb5aca..0000000 --- a/indent-2.2.9-lcall.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -burp indent-2.2.9/src/indent.c indent-2.2.9-lcall/src/indent.c ---- indent-2.2.9/src/indent.c 2006-02-01 14:20:25.000000000 +0100 -+++ indent-2.2.9-lcall/src/indent.c 2006-02-01 14:08:52.000000000 +0100 -@@ -3070,7 +3070,7 @@ int main ( - exit_values_ty exit_status; - - #if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES) && defined (HAVE_LCCTYPES) -- setlocale(LC_MESSAGES, ""); -+ setlocale(LC_ALL, ""); - #endif - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); diff --git a/indent.spec b/indent.spec index be52c38..eb84e4f 100644 --- a/indent.spec +++ b/indent.spec @@ -1,55 +1,53 @@ # -*- coding: utf-8 -*- Summary: A GNU program for formatting C code Name: indent -Version: 2.2.11 -Release: 26%{?dist} -License: GPLv3+ -Group: Applications/Text -URL: http://www.gnu.org/software/%{name}/ -# is dead. -# FSF's mirror -# is missing 2.2.11 version. -Source: http://indent.isidore-it.eu/%{name}-%{version}.tar.gz -Patch5: indent-2.2.9-lcall.patch -Patch7: indent-2.2.9-man.patch -# Bug 733051, submitted to upstream -# -Patch8: indent-2.2.11-Do-not-split-decimal-float-suffix-from-constant.patch -# Submitted to upstream -# -Patch9: indent-2.2.11-Return-non-zero-exit-code-on-tests-failure.patch -# Submitted to upstream -# -Patch10: indent-2.2.11-Fix-compiler-warnings.patch -# Submitted to upstream, bug #912635 -# -Patch11: indent-2.2.11-Allow-64-bit-stat.patch -# Submitted to upstream -# -Patch12: indent-2.2.11-Fix-copying-overlapping-comment.patch -# Submitted to upstream -# -Patch13: indent-2.2.11-Support-hexadecimal-floats.patch -# Submitted to upstream -# -Patch14: indent-2.2.11-Modernize-texi2html-arguments.patch -# Submitted to upstream -# -Patch15: indent-2.2.11-doc-Correct-a-typo-about-enabling-control-comment.patch -# Submitted to upstream -# -Patch16: indent-2.2.11-Fix-nbdfa-and-nbdfe-typo.patch +Version: 2.2.12 +Release: 1%{?dist} +# COPYING: GPLv3 text +# doc/indent.info: Verbatim (generated from doc/indent.texi) +# +# doc/indent.texi: Verbatim (or GPL?) +# src/code_io.c: BSD +# src/globs.c: GPLv3+ +# src/indent.c: BSD +# src/utils.h: GPLv3+ +## Not in any binary package +# aclocal.m4: GPLv3+ with exception +# config/config.guess: GPLv2+ with exception +# config/config.rpath: FSFULLR +# config/install-sh: MIT +# doc/Makefile.in: FSFULLR +# INSTALL: FSFAP +# m4/longlong.m4: FSFULLR +# man/texinfo2man.c: BSD with advertising +# regression/standard/globs.c: BSD with advertising +# regression/standard/sys.h: FSFUL (or so) +## Unused +# config/texinfo.tex: GPLv3+ with exception +# intl/plural.c: LGPLv2+ with exception +# intl/vasnprintf.c: LGPLv2+ +License: GPLv3+ and BSD and Verbatim +URL: http://www.gnu.org/software/%{name}/ +Source: http://ftpmirror.gnu.org/%{name}/%{name}-%{version}.tar.xz +# Correct documentation, proposed to upstream +# +Patch1: indent-2.2.12-doc-Fix-dont-cuddle-else-short-option-and-index-remo.patch +# Add AX_CC_FOR_BUILD m4 macro definition, copied from +# , +# license is "GPLv3+ with exception", proposed to upstream +# +Patch2: indent-2.2.12-Add-m4-ax_cc_for_build.m4-for-CC_FOR_BUILD.patch # Update config.sub to support aarch64, bug #925588 -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: coreutils -BuildRequires: gcc -BuildRequires: gettext-devel +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: coreutils +BuildRequires: gcc +BuildRequires: gettext-devel # gperf to update pre-generated code to fix compiler warnings -BuildRequires: gperf -BuildRequires: make -BuildRequires: texinfo -BuildRequires: texi2html +BuildRequires: gperf +BuildRequires: make +BuildRequires: texinfo +BuildRequires: texi2html %description Indent is a GNU program for beautifying C code, so that it is easier to @@ -62,17 +60,8 @@ you want a program to format your code. %prep %setup -q -%patch5 -p1 -%patch7 -p1 -%patch8 -p1 -b .float_suffix -%patch9 -p1 -b .exit_code -%patch10 -p1 -b .warnings -%patch11 -p1 -b .warnings -%patch12 -p1 -b .comments -%patch13 -p1 -b .hexa_float -%patch14 -p1 -b .texi2html5 -%patch15 -p1 -b .doc_dcc -%patch16 -p1 -b .doc_nbdfa +%patch1 -p1 +%patch2 -p1 # Regenerate sources rm src/gperf.c src/gperf-cc.c # Update config.sub to support aarch64, bug #925588 @@ -86,7 +75,7 @@ make %{?_smp_mflags} %install make DESTDIR=$RPM_BUILD_ROOT install rm -f $RPM_BUILD_ROOT/%{_infodir}/dir $RPM_BUILD_ROOT/%{_bindir}/texinfo2man \ - $RPM_BUILD_ROOT/usr/doc/indent/indent.html + $RPM_BUILD_ROOT/usr/doc/indent/indent.html %find_lang %name @@ -95,13 +84,17 @@ make -C regression %files -f %{name}.lang %license COPYING -%doc AUTHORS NEWS README ChangeLog* +%doc AUTHORS NEWS README.md ChangeLog* %{_bindir}/indent %{_mandir}/man1/indent.* %{_infodir}/indent.info* %changelog +* Tue Sep 11 2018 Petr Pisar - 2.2.12-1 +- 2.2.12 bump +- License corrected to from "GPLv3+" to "GPLv3+ and BSD and Verbatim" + * Fri Jul 13 2018 Fedora Release Engineering - 2.2.11-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 3e4d90f..e287813 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -98beafca62472805a3739d3867d5d70f indent-2.2.11.tar.gz +SHA512 (indent-2.2.12.tar.xz) = dbe73bd3729074825f9f5b4241a4c539ad32069df56511963417caf0351ff9ec5edd77e9580338301c8abf89ab9c0592bc7e82c14eec7450c496259d7e9045dd