Hello community,
here is the log from the commit of package indent
checked in at Wed Aug 6 01:43:19 CEST 2008.
--------
--- indent/indent.changes 2008-02-24 18:10:43.000000000 +0100
+++ /mounts/work_src_done/STABLE/indent/indent.changes 2008-08-05 12:33:57.000000000 +0200
@@ -1,0 +2,11 @@
+Tue Aug 5 12:09:45 CEST 2008 - prusnak@suse.cz
+
+- updated to 2.2.10
+ * added --indent-label and --linux-style options to control
+ indentation of goto labels and supply a canned set of settings
+ that closely matches the preferred style for the linux kernel
+ * GPLv3 is used now
+- removed obsoleted patches:
+ * overflow.patch (included in update)
+
+-------------------------------------------------------------------
Old:
----
indent-2.2.9-nothing_is_void.diff
indent-2.2.9-overflow.patch
indent-2.2.9.tar.bz2
indent-2.2.9-warnings.diff
New:
----
indent-2.2.10-cdw.diff
indent-2.2.10-lcall.diff
indent-2.2.10-man.diff
indent-2.2.10-nothing_is_void.diff
indent-2.2.10.tar.bz2
indent-2.2.10-warnings.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ indent.spec ++++++
--- /var/tmp/diff_new_pack.i30527/_old 2008-08-06 01:43:02.000000000 +0200
+++ /var/tmp/diff_new_pack.i30527/_new 2008-08-06 01:43:02.000000000 +0200
@@ -1,10 +1,17 @@
#
-# spec file for package indent (Version 2.2.9)
+# spec file for package indent (Version 2.2.10)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
-# This file and all modifications and additions to the pristine
-# package are under the same license as the package itself.
#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
@@ -12,15 +19,17 @@
Name: indent
-License: GPL v2 or later
+License: GPL v3 or later
Group: Development/Languages/C and C++
AutoReqProv: on
-Version: 2.2.9
-Release: 288
+Version: 2.2.10
+Release: 1
Source: %{name}-%{version}.tar.bz2
-Patch: %{name}-%{version}-overflow.patch
-Patch1: %{name}-%{version}-nothing_is_void.diff
-Patch2: %{name}-%{version}-warnings.diff
+Patch0: %{name}-%{version}-nothing_is_void.diff
+Patch1: %{name}-%{version}-warnings.diff
+Patch2: %{name}-%{version}-lcall.diff
+Patch3: %{name}-%{version}-cdw.diff
+Patch4: %{name}-%{version}-man.diff
Url: ftp://ftp.gnu.org/pub/gnu/indent/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Indent Formats C Source Code
@@ -36,24 +45,29 @@
%prep
%setup -q
-%patch
-%patch1 -p1
+%patch0 -p1
+%patch1
%patch2
+%patch3 -p1
+%patch4
%build
-export CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
%configure --with-pic
+# Parallel make doesn't work
make
%install
-make DESTDIR=$RPM_BUILD_ROOT/ install
+make DESTDIR=$RPM_BUILD_ROOT install
# indent.html is installed with %doc below
-rm $RPM_BUILD_ROOT/usr/doc/indent/indent.html
-rm $RPM_BUILD_ROOT/usr/bin/texinfo2man
-mv $RPM_BUILD_ROOT/usr/share/locale/zh_TW.Big5 \
- $RPM_BUILD_ROOT/usr/share/locale/zh_TW
+rm -f $RPM_BUILD_ROOT/usr/doc/indent/indent.html $RPM_BUILD_ROOT%{_bindir}/texinfo2man $RPM_BUILD_ROOT/%{_infodir}/dir
+mv $RPM_BUILD_ROOT%{_datadir}/locale/zh_TW.Big5 $RPM_BUILD_ROOT%{_datadir}/locale/zh_TW
%find_lang %{name}
+%check
+echo =============== TEST BEGIN ===============
+make -C regression
+echo =============== TEST END ===============
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -71,6 +85,14 @@
%{_mandir}/man1/indent.1.gz
%changelog
+* Tue Aug 05 2008 prusnak@suse.cz
+- updated to 2.2.10
+ * added --indent-label and --linux-style options to control
+ indentation of goto labels and supply a canned set of settings
+ that closely matches the preferred style for the linux kernel
+ * GPLv3 is used now
+- removed obsoleted patches:
+ * overflow.patch (included in update)
* Sun Feb 24 2008 crrodriguez@suse.de
- use find_lang macro
* Wed Jan 25 2006 mls@suse.de
++++++ indent-2.2.10-cdw.diff ++++++
--- indent-2.2.10/src/indent.c
+++ indent-2.2.10/src/indent.c
@@ -1033,13 +1033,10 @@
if (!*sp_sw)
{ /* if not if for (;;) */
- do
- {
if (parse (semicolon) != total_success)
{
*file_exit_value = indent_error;
}
- } while(0);
*force_nl = true; /* force newline after a end of stmt */
}
@@ -2818,6 +2815,18 @@
return file_exit_value; /* RETURN */
}
+ if (type_code == sp_paren
+ && parser_state_tos->p_stack[parser_state_tos->tos] == dohead
+ && parser_state_tos->last_token == rbrace)
+ {
+ /* This is closing `while' of `do {stuff;} while'
+ statement (not `do stuff; while' command). In -cdw, we
+ want to suppress newline. */
+ if (settings.cuddle_do_while)
+ force_nl = false;
+ parser_state_tos->in_closing_br_while = true;
+ }
+
if ((type_code != comment) &&
(type_code != cplus_comment) &&
(type_code != newline) &&
--- indent-2.2.10/src/indent.h
+++ indent-2.2.10/src/indent.h
@@ -420,6 +420,9 @@
BOOLEAN in_decl; /*!< set to true when we are in a declaration
* statement. The processing of braces is then
* slightly different */
+ BOOLEAN in_closing_br_while; /*!< set to true when we are parsing
+ * closing while of do {} while
+ * statement*/
int in_stmt; /*!< set to 1 while in a stmt */
int in_parameter_declaration;
int ind_level; /*!< the current indentation level in spaces */
--- indent-2.2.10/src/parse.c
+++ indent-2.2.10/src/parse.c
@@ -69,6 +69,7 @@
parser_state_tos->cstk = (int *) xmalloc (INITIAL_STACK_SIZE * sizeof (int));
parser_state_tos->paren_indents_size = 8;
parser_state_tos->paren_indents = (short *) xmalloc (parser_state_tos->paren_indents_size * sizeof (short));
+ parser_state_tos->in_closing_br_while = false;
/* Although these are supposed to grow if we reach the end,
* I can find no place in the code which does this. */
@@ -428,6 +429,14 @@
parser_state_tos->ind_level = parser_state_tos->i_l_follow;
parser_state_tos->il[parser_state_tos->tos] = parser_state_tos->i_l_follow;
+
+ if (parser_state_tos->in_closing_br_while
+ && settings.cuddle_do_while
+ && !settings.btype_2)
+ {
+ parser_state_tos->ind_level += settings.brace_indent;
+ }
+ parser_state_tos->in_closing_br_while = false;
}
else
{ /* it is a while loop */
@@ -457,6 +466,12 @@
parser_state_tos->p_stack[parser_state_tos->tos] = elsehead;
/* remember if with else */
parser_state_tos->search_brace = true;
+
+ if (settings.cuddle_else
+ && !settings.btype_2)
+ {
+ parser_state_tos->ind_level += settings.brace_indent;
+ }
}
break;
++++++ indent-2.2.10-lcall.diff ++++++
--- src/indent.c
+++ src/indent.c
@@ -3290,7 +3290,7 @@
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);
++++++ indent-2.2.10-man.diff ++++++
--- doc/indent.texinfo
+++ doc/indent.texinfo
@@ -776,7 +776,7 @@
@kindex -ce
@kindex --cuddle-else
-@kindex -dce
+@kindex -nce
@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
@@ -1805,6 +1805,11 @@
Leave space between @samp{#} and preprocessor directive.@*
@xref{Indentation}.
+@item -nlps
+@itemx --remove-preprocessor-space
+Remove space between @samp{#} and preprocessor directive.@*
+@xref{Indentation}.
+
@item -nbad
@itemx --no-blank-lines-after-declarations
Do not force blank lines after declarations.@*
@@ -1977,6 +1982,11 @@
Specify the indentation for preprocessor conditional statements.
@xref{Indentation}.
+@item -ppi@var{n}
+@itemx --preprocessor-indentation@var{n}
+Request indentation of preprocessor conditional statements.@*
+@xref{Indentation}.
+
@item -prs
@itemx --space-after-parentheses
Put a space after every '(' and before every ')'.@*
@@ -2138,6 +2148,7 @@
\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{ --space-after-for \leaderfill -saf\ }
\line{ --space-after-if \leaderfill -sai\ }
@@ -2229,6 +2240,7 @@
--preserve-mtime -pmt
--preprocessor-indentation -ppi@var{n}
--procnames-start-lines -psl
+--remove-preprocessor-space -nlps
--space-after-cast -cs
--space-after-for -saf
--space-after-if -sai
++++++ indent-2.2.9-nothing_is_void.diff -> indent-2.2.10-nothing_is_void.diff ++++++
--- indent/indent-2.2.9-nothing_is_void.diff 2004-04-16 11:25:10.000000000 +0200
+++ /mounts/work_src_done/STABLE/indent/indent-2.2.10-nothing_is_void.diff 2008-08-05 12:11:00.000000000 +0200
@@ -9,25 +9,3 @@
{
char buf[1024];
int in_block = 0;
---- indent-2.2.9/src/output.c
-+++ indent-2.2.9/src/output.c
-@@ -1206,7 +1206,7 @@
- }
- }
-
--extern inhibit_indenting(
-+extern void inhibit_indenting(
- BOOLEAN flag)
- {
- inhibited = flag;
---- indent-2.2.9/src/output.h
-+++ indent-2.2.9/src/output.h
-@@ -47,7 +47,7 @@
- struct stat * file_stats,
- const char * filename);
-
--extern inhibit_indenting(
-+extern void inhibit_indenting(
- BOOLEAN flag);
-
-
++++++ indent-2.2.9.tar.bz2 -> indent-2.2.10.tar.bz2 ++++++
++++ 62245 lines of diff (skipped)
++++++ indent-2.2.9-warnings.diff -> indent-2.2.10-warnings.diff ++++++
--- indent/indent-2.2.9-warnings.diff 2004-09-15 21:00:07.000000000 +0200
+++ /mounts/work_src_done/STABLE/indent/indent-2.2.10-warnings.diff 2008-08-05 12:24:51.000000000 +0200
@@ -1,34 +1,25 @@
--- src/output.c
+++ src/output.c
-@@ -15,6 +15,8 @@
- #include