bug-indent
[Top][All Lists]
Advanced

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

Re: Expected behavior for -cs and -ncs


From: John E Hein
Subject: Re: Expected behavior for -cs and -ncs
Date: Wed, 23 Jul 2008 12:06:45 -0600

david ingamells wrote at 19:42 +0200 on Jul 23, 2008:
 > 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.

Seems okay in my local test here on 2.2.9, too...


echo '(unsigned char *)ptr;' | gindent -npro -cs
(unsigned char *) ptr;

echo '(unsigned char *)ptr;' | gindent -npro -ncs
(unsigned char *)ptr;

However, --no-space-after-cast fails:


echo '(unsigned char *)ptr;' | gindent -npro --space-after-cast
(unsigned char *) ptr;

echo '(unsigned char *)ptr;' | gindent -npro --no-space-after-cast
indent: unknown option "no-space-after-cast"




reply via email to

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