diff options
Diffstat (limited to 'contrib/patches/lrn-indent.diff')
-rw-r--r-- | contrib/patches/lrn-indent.diff | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/patches/lrn-indent.diff b/contrib/patches/lrn-indent.diff index 8ba3b77cc..2cf61d2cf 100644 --- a/contrib/patches/lrn-indent.diff +++ b/contrib/patches/lrn-indent.diff | |||
@@ -40,13 +40,13 @@ diff -u indent-2.2.11/src/handletoken.c indent-2.2.11.my/src/handletoken.c | |||
40 | + parser_state_tos->in_parameter_declaration = 0; | 40 | + parser_state_tos->in_parameter_declaration = 0; |
41 | + } | 41 | + } |
42 | } | 42 | } |
43 | 43 | ||
44 | /** | 44 | /** |
45 | diff -u indent-2.2.11/src/indent.h indent-2.2.11.my/src/indent.h | 45 | diff -u indent-2.2.11/src/indent.h indent-2.2.11.my/src/indent.h |
46 | --- indent-2.2.11/src/indent.h 2009-10-11 23:15:34 +0400 | 46 | --- indent-2.2.11/src/indent.h 2009-10-11 23:15:34 +0400 |
47 | +++ indent-2.2.11.my/src/indent.h 2011-08-16 14:19:37 +0400 | 47 | +++ indent-2.2.11.my/src/indent.h 2011-08-16 14:19:37 +0400 |
48 | @@ -318,6 +318,11 @@ | 48 | @@ -318,6 +318,11 @@ |
49 | int brace_indent; /*!< number of spaces to indent braces from the suround if, while, etc. in -bl | 49 | int brace_indent; /*!< number of spaces to indent braces from the surround if, while, etc. in -bl |
50 | * (bype_2 == 0) code */ | 50 | * (bype_2 == 0) code */ |
51 | int expect_output_file; /*!< Means "-o" was specified. */ | 51 | int expect_output_file; /*!< Means "-o" was specified. */ |
52 | + int diff_decls_and_defs; /*!< Makes indent think that function prototypes are terminated by ';', | 52 | + int diff_decls_and_defs; /*!< Makes indent think that function prototypes are terminated by ';', |
@@ -55,7 +55,7 @@ diff -u indent-2.2.11/src/indent.h indent-2.2.11.my/src/indent.h | |||
55 | + * This is the default. | 55 | + * This is the default. |
56 | + */ | 56 | + */ |
57 | } user_options_ty; | 57 | } user_options_ty; |
58 | 58 | ||
59 | extern user_options_ty settings; | 59 | extern user_options_ty settings; |
60 | @@ -430,6 +435,7 @@ | 60 | @@ -430,6 +435,7 @@ |
61 | * slightly different */ | 61 | * slightly different */ |
@@ -71,7 +71,7 @@ diff -u indent-2.2.11/src/lexi.c indent-2.2.11.my/src/lexi.c | |||
71 | @@ -616,8 +616,11 @@ | 71 | @@ -616,8 +616,11 @@ |
72 | * I've added '=' to this list to keep from breaking | 72 | * I've added '=' to this list to keep from breaking |
73 | * a non-valid C macro from libc. -jla */ | 73 | * a non-valid C macro from libc. -jla */ |
74 | 74 | ||
75 | - if (*tp != ';' && *tp != ',' && *tp != '(' && *tp != '=') | 75 | - if (*tp != ';' && *tp != ',' && *tp != '(' && *tp != '=') |
76 | + if ((*tp != ';' || !settings.diff_decls_and_defs) && | 76 | + if ((*tp != ';' || !settings.diff_decls_and_defs) && |
77 | + *tp != ',' && *tp != '(' && *tp != '=') | 77 | + *tp != ',' && *tp != '(' && *tp != '=') |