2.2.11 bump

epel9
Petr Pisar 15 years ago
parent b8d8319e77
commit 4705ff5096

@ -1 +1 @@
indent-2.2.10.tar.gz
indent-2.2.11.tar.gz

@ -1,88 +0,0 @@
diff -burp indent-2.2.9/src/indent.c indent-2.2.9-cdw/src/indent.c
--- indent-2.2.9/src/indent.c 2006-01-18 18:22:36.000000000 +0100
+++ indent-2.2.9-cdw/src/indent.c 2006-01-27 17:13:55.000000000 +0100
@@ -976,13 +976,10 @@ static void handle_token_semicolon(
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 */
}
@@ -2625,6 +2622,18 @@ static exit_values_ty indent_main_loop(v
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) &&
diff -burp indent-2.2.9/src/indent.h indent-2.2.9-cdw/src/indent.h
--- indent-2.2.9/src/indent.h 2006-01-18 18:22:36.000000000 +0100
+++ indent-2.2.9-cdw/src/indent.h 2006-01-27 17:20:14.000000000 +0100
@@ -357,6 +357,9 @@ typedef struct parser_state
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 */
diff -burp indent-2.2.9/src/parse.c indent-2.2.9-cdw/src/parse.c
--- indent-2.2.9/src/parse.c 2002-08-04 19:08:41.000000000 +0200
+++ indent-2.2.9-cdw/src/parse.c 2006-01-27 17:18:52.000000000 +0100
@@ -38,6 +38,7 @@ void init_parser (void)
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. */
@@ -380,6 +381,14 @@ exit_values_ty parse (
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 */
@@ -409,6 +418,12 @@ exit_values_ty parse (
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;

@ -1,11 +0,0 @@
diff -Burp indent-2.2.9/man/texinfo2man.c indent-2.2.9-explicits/man/texinfo2man.c
--- indent-2.2.9/man/texinfo2man.c 2006-01-18 18:18:00.000000000 +0100
+++ indent-2.2.9-explicits/man/texinfo2man.c 2006-01-18 18:15:14.000000000 +0100
@@ -163,6 +163,7 @@ int start_line[256];
static char value_updated[64], value_edition[64], value_version[64];
+void
process_texi (FILE * in)
{
char buf[1024];

@ -1,17 +1,16 @@
# -*- coding: utf-8 -*-
Summary: A GNU program for formatting C code
Name: indent
Version: 2.2.10
Release: 5%{?dist}
Version: 2.2.11
Release: 1%{?dist}
License: GPLv3+
Group: Applications/Text
URL: http://indent.isidore-it.eu/beautify.html
Source: http://indent.isidore-it.eu/%{name}-%{version}.tar.gz
Patch3: indent-2.2.9-explicits.patch
Patch4: indent-2.2.9-cdw.patch
Patch5: indent-2.2.9-lcall.patch
Patch7: indent-2.2.9-man.patch
BuildRequires: gettext texinfo texi2html
#BuildRequires: gettext texinfo texi2html
BuildRequires: texinfo texi2html
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
@ -27,15 +26,13 @@ you want a program to format your code.
%prep
%setup -q
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch7 -p1
%build
%configure
# Parallel make doesn't work
make
## Parallel make doesn't work
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
@ -62,14 +59,20 @@ if [ "$1" = 0 ]; then
fi
%files -f %{name}.lang
%doc AUTHORS COPYING NEWS README
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README ChangeLog*
%{_bindir}/indent
%{_mandir}/man1/indent.*
%{_infodir}/indent.info*
%changelog
* Tue Jul 20 2010 Petr Pisar <ppisar@redhat.com> - 2.2.11-1
- 2.2.11 bump (#457064)
- Remove useless patches: indent-2.2.9-cdw.patch, indent-2.2.9-explicits.patch
- Reenable parallel build
- Distribute upstream changelogs
* Tue Aug 11 2009 Roman Rakus <rrakus@redhat.com> - 2.2.10-5
- Don't print errors in post and preun sections (#515935)

@ -1 +1 @@
be35ea62705733859fbf8caf816d8959 indent-2.2.10.tar.gz
98beafca62472805a3739d3867d5d70f indent-2.2.11.tar.gz

Loading…
Cancel
Save