Re: gnu indent: where are the tabs?

david <[email protected]>
Newsgroups gmane.comp.gnu.indent.bugs
Message-ID <[email protected]>
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;
> }
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.