Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri, 15 Jul 2011 02:44:36 +0400
From: Aleksey Cherepanov <aleksey.4erepanov@...il.com>
To: john-dev@...ts.openwall.com
Subject: coding styles for c/c++? indenter? emacs settings?

I want to know how to indent the code right.

Owl/doc/CONVENTIONS says that good (not perfect) way to indent is
 'indent -kr -i8 -nlp -nbbo -l79 -lc79'
 (http://cvsweb.openwall.com/cgi/cvsweb.cgi/~checkout~/Owl/doc/CONVENTIONS?rev=1.33;content-type=text%2Fplain
 ).

But documentation for indent says that it is not suitable for c++. For
instance template
'func<T>(arg);'
will be formatted as
'func < T > (arg);'
that is not good (i saw similar code in Johnny).

Are there any known or already used alternative of indent for c++?

May it be easier to use indent and hands? Because as i understand it is
needed to use hands even with indent as of it is not perfect.

By the way why indent is not perfect? What does indent miss? Or what is the
difference between indent and the preferred coding style? Or what is the
preferred coding style?

Also i want to set my editor up to support such style. Does anyone have
such settings for emacs? Probably set up editor could replace indenter.

Regards,
Aleksey Cherepanov

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ