bug-indent
[Top][All Lists]
Advanced

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

Re: gnu indent: where are the tabs?


From: david
Subject: Re: gnu indent: where are the tabs?
Date: Thu, 31 May 2007 18:45:19 +0200
User-agent: Thunderbird 1.5.0.10 (X11/20060911)

No, indent is not broken e.g.

indent -ut -ts 2 -st t.c > t.c.out

works fine. You do need to set the indent step (e.g. -i 2) equal to or a
multiple of the tab size if you wish to sensibly use tabs. Using the
manual can work wonders :-)

IMHO tabs are a bad thing in code.

I would suggest, if you want to report problems you;
1) state the version of indent you are using.
2) State on which platform you are running.
3) Exactly which command options you used.

I don't see any tabs in your example, btw????


Rui Maciel wrote:
> I've just started looking into gnu indent and I'm having some trouble
> making it format the source code using tabs. In the man pages it is said
> that the -ut and -ts options could handle that but no matter how I run
> indent, the source code still appears exactly like if it was run with
> indent --no-tabs.
>
> The result is as following:
>
> int test(int param)
> {
>   if (param == 1))
>     {
>       printf ("error\n");
>       return EXIT_SUCCESS;
>     }
>   return EXIT_SUCCESS;
> }
>
> Is gnu indent broken? What do I need to do to be able to format the
> code with leading tabs? Something like:
>
> int test(int param)
> {
>         if (param == 1))
>         {
>                 printf ("error\n");
>                 return EXIT_SUCCESS;
>         }
>         return EXIT_SUCCESS;
> }
>
>
>   





reply via email to

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