Hi,

There aren't really any strict rules on spacing. I'm currently using Emacs with 
its auto-indentation and a basic-offset setting of 5. I don't really mind, as 
long as it's not unreadable. If it is, I'll just reindent it. 

You're right about the stylistic choices you listed, except that I prefer a 
space between if/for/while/do and the left parenthesis:
if (cond) {
     fdklaf();
}

I try to stay away from C++-isms, so functions with empty arguments are written 
as
int fn(void)
{
   /* ... */
}

not:
int fn()
{
   /* ... */
}

All local variables are declared at the top of the function, with an exception 
for  *_get_type (because they're written in the same way in GTK+ itself) 

Best regards,
Magnus





On Sun, 17 Dec 2006 14:34:06 -0500
Forest Bond <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> One more message for today. :)
> 
> While working on the zero-crossing search features, I wasn't sure how to use
> whitespace in the source files.  There seems to be a mixture of tabs and 
> spaces.
> My default editor setup does not use tabs at all, so the code I contributed
> probably didn't have consistent whitespace.
> 
> What are the generally accepted whitespace practices?  Things looked a little
> strange for me, since my tabwidth is probably not the same as other peoples.  
> I
> am happy to conform to settings that others are using, I just need to know 
> what
> the right thing to do is.
> 
> Also, I'd just like to confirm the following stylistic choices:
> 
> this seems to be preferred:
> --------------------------------------------------------------------------------
> void my_function()
> {
> /* code */
> }
> --------------------------------------------------------------------------------
> over this:
> --------------------------------------------------------------------------------
> void my_function() {
>   /* code */
> }
> --------------------------------------------------------------------------------
> 
> 
> this seems to be preferred:
> --------------------------------------------------------------------------------
> if(x == 0) do_something();
> --------------------------------------------------------------------------------
> over this:
> --------------------------------------------------------------------------------
> if(x == 0)
> {
>   do_something();
> }
> --------------------------------------------------------------------------------
> 
> -Forest
> 

_______________________________________________
Mhwaveedit-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/mhwaveedit-discuss

Reply via email to