avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] code review comments


From: E. Weddington
Subject: Re: [avrdude-dev] code review comments
Date: Wed, 07 Jul 2004 22:43:06 -0600

On 7 Jul 2004 at 23:14, Brian Dean wrote:

> On Wed, Jul 07, 2004 at 05:21:23PM -0600, E. Weddington wrote:
> 
> > Considering all the systems that avrdude is known to work on, the
> > compiler that is being used on all those systems is GCC, and no
> > other. Indenting preprocessor directives is known to work on
> > GCC. So, technically it's fine. But if somebody (Brian) wants to
> > declare a stylistic preference for the application, that's a
> > different matter.
> 
> My $0.02:
> 
> I don't normally indent because I've been bitten by pre-processors
> (ages ago) that didn't handle it.  Also, I normally do my editing
> with emacs have it set to autoindent which does not indent
> preprocessor directives.
> 
> But I personally don't have a strong opinion on this.
> 
> However, Ted did bring up a few good points about the #ifdef's being
> much more noticeable if they are not indented.  I agree that it's
> probably good to make them stand out more and be ugly since
> conditionally compilation should be minimized where possible.  I
> wouldn't go too far out of the way to change them, but if someone has
> some free time and wanted to do some cleanup, they can feel free to
> unindent them, as long as you don't have any objection, of course.

It certainly doesn't bother me one way or the other. I would agree with you and 
Ted about 
making them stand out. So if someone wants to do the formatting that's fine.
 
> Regarding the directives themselves, making the setvbuf() calls
> unconditional does not have any adverse affect on Mac OS X at least.
> I suspect it should be fine on the other Unix platforms as well, but
> I've only tested on Mac OS X.

Great! Regarding Ted's comment, now I dimly remember that setvbuf() is a 
standard function, 
but since I've been doing almost strictly embedded for the last 9.5 years I've 
had no need for 
that function.... :-/ So, yeah, make it good for all platforms.

Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]