bug-indent
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-indent] Unneeded space after "*" in function declarations


From: Pavel Roskin
Subject: [Bug-indent] Unneeded space after "*" in function declarations
Date: Tue, 24 Sep 2002 20:21:23 -0400 (EDT)

Hello!

This code is formatted incorrectly by indent 2.2.8 (it's the formatted 
code):

=============================
int
f (foo_t * a, char *b)
{
    char *c;
    foo_t *d;
    return 1 * 2;
}
=============================

Note space before "a", but not before "b" and "d".  There should not be
any space after "*" in function declarations.

This patch helps:

=============================
--- src/indent.c
+++ src/indent.c
@@ -1039,7 +1039,7 @@ static exit_values_ty indent (
                     }
                 }
 
-                parser_state_tos->want_blank = true;
+                parser_state_tos->want_blank = !is_procname_definition;
                 break;
 
             case postop:                /* got a trailing ++ or -- */
=============================

-- 
Regards,
Pavel Roskin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]