This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Reformatting C/C++/Java code (RE: proposed sync() patch)


> From: Corinna Vinschen

> On Apr 14 11:14, Dave Korn wrote:
> > and GNU coding style would be
> > 
> > +static int 
> > +sync_drive (char drive)
> > 
> > which is probably the more appropriate here.
> 
> GNU coding style is what we're trying to follow.
> 
> Corinna

i.e:
$ indent -gnu <sourcefile(s)...>

read more:
$ man indent
and then type: (the typing will show up on the last line)
/^COMMON STYLES
and hit ENTER...


Assuming you do not use strange formatting/style - the
output of indent will be perfectly acceptable, I presume.


Another possibility:
$ astyle --style=gnu <...>

$ man astyle
No manual entry for astyle
$ info astyle
<not found>
$ type -a astyle
astyle is /usr/bin/astyle
astyle is /bin/astyle
$ astyle -h
<blahblah>


/Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E

** on a mailing list; please keep replies on that particular list **

-- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); --
--END OF MESSAGE--

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]