Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Coding conventions

Re: Coding conventions

From: perterm <perterm_at_vce.de>
Date: Thu, 29 Aug 2002 11:04:24 +0200

Daniel Stenberg wrote:

>>But I notice that code I supplied was altered -> someone doesn't seem to
>>like single lines in braces.
>
> That must've been made by some evil person we should chase down and make
> responsible for all bad sorts of bad things! B-]


Actually some bad thing in fact did happen: I provided the wormlet.c
file - obviously with major conding convention violations, since I
didn't know the difference between c++ an c style comments, and worse
things. Someone was so kind to clean that up for me but during that
process one line seems to magically have altered from

if (arghCollision(headx, heady) >= 0)

to

if (arghCollision(headx, heady))


That's what you get when you don't follow / understand conding
conventions. Now I also understood that
"Variables and function names should be all lower case." doesn't just
mean that they all must start with lower case but that each character of
the names must be lowercase. Got that one wrong too. I still don't know
what "c++ism and Javaisms" are but I assume that just means I should
avoid typedefs.
Also I was told that global variables should be static. I have no
problem to obey that rule without understanding it. But surely there's
some background. Might it be that those global variables would use up
stack memory if not declared static? Maybe I should learn c before
writing code with it...

Phil
Received on 2002-08-29

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy