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

Re: [MiNT] Coding style. Calling functions



2011/4/28 Vincent Rivière <vincent.riviere@freesbee.fr>:
> David Gálvez wrote:
>>
>> I found another one, calling functions like this:
>>
>> kmalloc (xxxx);
>>
>> http://sparemint.org/cgi-bin/cvsweb/freemint/sys/cmdline.c?rev=1.9&content-type=text/x-cvsweb-markup
>>
>> or like this
>>
>> kmalloc(xxxx);
>>
>> http://sparemint.org/cgi-bin/cvsweb/freemint/sys/cnf.c?rev=1.32&content-type=text/x-cvsweb-markup
>>
>> with and without space between name and "(".
>
> When I patch some existing code, I look around and use the same style for
> the added or changed lines. I believe this is the right thing to do.
>
> For new files, I use the project's coding style rules, usually by looking at
> other sources. If there are no rules, personally I prefer writing
> kmalloc(xxxx) but I don't mind.
>
> Serious projects use code reformatting tools configured in the same way for
> all the members of the team. Every developer must manually or automatically
> run such tool before committing. So anyone can write code using his habits,
> and can concentrate on his important work instead of automatable details.
>
> --
> Vincent Rivière
>
good call in that last paragraph..

again I go with no space here too..

I have just finished working with some in C++ code. It appears that
C/C++ functions were written with a space & no space for coded
functions. This would be a moot point if there was any specific rules
for kernel/xaaes coding, a proper dev environment, or a reformatting
tool required before comit..

Paul