Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 05 Apr 2015 05:44:22 +0200
From: magnum <>
Subject: Re: Coding Style

On 2015-04-05 05:21, Kai Zhao wrote:
> Hi all,
> Coding style is one of my task. I want to discuss it, document it and
> convert to it.
> Below is the first problem I want to discuss.
> Coding Style [1]: Brace Style
> --------------------------------------
> 1.1 Put the opening brace of a function body in the next line below the
> function
> prototype or on the same line of the function prototype?
> Most of the functions in john put the opening brace of a function body in
> the next
> line, but there are some functions put it on the same line.
> 1.2 Put all other opening braces on the same line as the syntax element to
> which
> the brace is subordinate.

We put it on a new line for functions and on same line for statements
like if and for. Except I sometimes use a new line for statements if
this avoids going past column 80.

A much more important style issue is the ignorant idea of indenting with
spaces. We indent with tab and align with spaces.

Unfortunately a lot of the code deviate from our coding style.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.