Re: Expected behavior for -cs and -ncs

david ingamells <[email protected]>
Newsgroups gmane.comp.gnu.indent.bugs
Message-ID <[email protected]>
This works in 2.2.10:

$ indent -npro -ncs

unsigned char *cp = (unsigned char *)ptr;
int
foo ()
{
  return (int)n;
}

$ indent -npro -cs

unsigned char *cp = (unsigned char *) ptr;
int
foo ()
{
  return (int) n;
}


I know of no update that fixed this in 2.2.10, so I am surprised that it 
doesn't work in 2.2.9.
I have added this to the regression test now, so it will be checked in 
the future.

2.2.10 can be obtained from:

http://indent.isidore-it.eu/beautify.html

David.

Ian Carvalho wrote:
> Hi,
>
> What is the expected behavior when the options -cs and -ncs are used.
> These are for space after cast and no space after cast.
>
> I would expect -cs to give:
> (unsigned char *) ptr;
>                 ^ - space inserted
>
> and -ncs to give:
> (unsigned char *)ptr;
>                 ^ - no space inserted
>
> Am I missing something as this does not seem to happen with version 
> 2.2.9.
> With either -cs or -ncs I am getting the first behavior, ie. with the 
> space
> inserted.
>
> Thanks
> Ian
>
>
>
>
> _______________________________________________
> bug-indent mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/bug-indent
>
>
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.