Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 09 Apr 2015 14:51:20 +0300
From: Alexander Cherepanov <ch3root@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: Coding Style

On 2015-04-08 11:58, Kai Zhao wrote:
> Here are the specific differences between our current coding style and
> Kernel
> style.
>
> 1. Don't put multiple statements on a single line
>
> There are some cases in john which does not meet this requirement, such as
> below:
>
> src/loader.c : 746
>
> if (current_pw) continue;

It seems everybody agrees that it should be fixed. After (and if) we 
decide on a specific style this could be dealt with in jumbo during 
total reformatting. For core it is yet to be seen how much reformatting 
it required/wanted.

> 2. Never break user-visible strings such as printk messages even it exceeds
> column 80, because that breaks the ability to grep for them. This rule is
> the
> same as Frank's idea.
>
> There are some cases in john which does not meet this requirement, such as
> below:
>
> src/common-opencl.c : 1732
>
> fprintf(stderr, "Hardware resources "
>            "exhausted\n");

Can this be fixed automatically by existing tools?

> 3. Use only C89 "/* ... */" style and don't use C99-style " // ..."
>
> John core meets this requirementbut jumbo does not.

IMHO this is a minor point and could be postponed until we figure other 
things out.

-- 
Alexander Cherepanov

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.