annoying misbehavior of -linux in 2.2.10

View: New views
2 Messages — Rating Filter:   Alert me  

annoying misbehavior of -linux in 2.2.10

by Alejandro Mery :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I mail you to ask how to "fix" two annoying misbehaviors (imo), one
is an extra space injected before macro names when used inside
structs and the other is an space after the * when they type is a
typedef.

the test file (attached) looks like:
---
typedef int foo;

#define FOO(N) foo N

struct bar {
        foo i;
        FOO(j);
};

void poink(foo *i, int *j);
---

and `indent -linux test.c` makes the following (imo invalid) change

--- test.c~ 2009-10-15 12:59:18.000000000 +0200
+++ test.c 2009-10-15 12:59:21.000000000 +0200
@@ -4,7 +4,7 @@

  struct bar {
  foo i;
- FOO(j);
+ FOO(j);
  };

-void poink(foo *i, int *j);
+void poink(foo * i, int *j);

I'm using 2.2.10 from Ubuntu. Is there a way to fix this by arguments?

Thanks,
Alejandro Mery

[test.c]

typedef int foo;

#define FOO(N) foo N

struct bar {
        foo i;
        FOO(j);
};

void poink(foo *i, int *j);


[test.diff]

--- test.c~ 2009-10-15 12:59:18.000000000 +0200
+++ test.c 2009-10-15 12:59:21.000000000 +0200
@@ -4,7 +4,7 @@
 
 struct bar {
  foo i;
- FOO(j);
+ FOO(j);
 };
 
-void poink(foo *i, int *j);
+void poink(foo * i, int *j);



_______________________________________________
bug-indent mailing list
bug-indent@...
http://lists.gnu.org/mailman/listinfo/bug-indent

smime.p7s (6K) Download Attachment

Re: annoying misbehavior of -linux in 2.2.10

by indent-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The FOO problem looks like a bug.
the poink problem can be fixed with the -T foo option.



Alejandro Mery wrote:

> Hello,
>
> I mail you to ask how to "fix" two annoying misbehaviors (imo), one is
> an extra space injected before macro names when used inside structs
> and the other is an space after the * when they type is a typedef.
>
> the test file (attached) looks like:
> ---
> typedef int foo;
>
> #define FOO(N)    foo N
>
> struct bar {
>     foo i;
>     FOO(j);
> };
>
> void poink(foo *i, int *j);
> ---
>
> and `indent -linux test.c` makes the following (imo invalid) change
>
> --- test.c~    2009-10-15 12:59:18.000000000 +0200
> +++ test.c    2009-10-15 12:59:21.000000000 +0200
> @@ -4,7 +4,7 @@
>
>  struct bar {
>      foo i;
> -    FOO(j);
> +     FOO(j);
>  };
>
> -void poink(foo *i, int *j);
> +void poink(foo * i, int *j);
>
> I'm using 2.2.10 from Ubuntu. Is there a way to fix this by arguments?
>
> Thanks,
> Alejandro Mery
> ------------------------------------------------------------------------
>
> _______________________________________________
> bug-indent mailing list
> bug-indent@...
> http://lists.gnu.org/mailman/listinfo/bug-indent



_______________________________________________
bug-indent mailing list
bug-indent@...
http://lists.gnu.org/mailman/listinfo/bug-indent