[cvsnt] checkcvswrappers (revision 1.5)

Gabriel Genellina gagenellina at softlab.com.ar
Tue Jul 12 22:11:01 BST 2005


At Tuesday 12/7/2005 05:02, David Somers wrote:

> > So I decided to port your program to Python (which appears to me, being
> > much better suited than "raw" C code for this task...)
>I'm happier using C than Python.

That depends on the task... By example, recursing over all files and 
subdirectories as you do takes a lot of C code, but it's a single call in 
Python: os.walk()
But I don't want to start any language war! It's just a matter of taste...

> > - in CrunchFile, you forgot to initialize the `offset` variable
>
>Possibly... automatic variables should really be initialized to 0 by the
>compiler, but its a bit hard to determine whether gcc does this or not...
>erring on the side of caution, I've now explicitly initilized this variable.

Automatic variables are not initialized in ANSI C (as opposed to static 
which are initialized to 0)
See http://www.vmunix.com/~gabor/c/draft.html#6.5.8 (I could not find an 
online source for the final standard, maybe it's available only on paper...)

> > - the tests in CrunchFile must be reordered, utf32le_bom is never fired
> > because it's masked by utf16le_bom which comes first.
>
>You see, that's what happens when you write code and the caffeione level is
>too low. Thanks for spotting it.

I need high levels of "mate" (a typical beverage from Argentina)...


Gabriel Genellina
Softlab SRL 




More information about the cvsnt mailing list