On Wednesday 26 March 2008, Phil Dibowitz wrote:
> Your patch looks very solid. However, your changing things that Stephen's
> API patch is ALSO going to change (in fact, his patch will make your patch
> simpler, you won't have to deal with that silly static-size vs dynamic-size
> thing).
> Can you wait until his patch is applied and then fix up yours accordingly?

No problem, it will be a few days anyway before I will have time to dig
into the CVS again - I'll see what's left then...

> Also, in learn_ir_commands, if reading the file fails, you just go into the
> generic LearnIR code. This is the wrong approach. If the user gave us a
> file, we should fail if the file wasn't able to be opened.

I just had a look a the patch to verify, but AFAIK that's just what my code
does; it should do (2) only when file_name is null, otherwise if err != 0,
it should proceed from (1) to (3) and just return err (you may have noticed
that I prefer to code single exit points).

if (file_name) { ...
        err = read_from_file(file_name, &x, &size);
        if ( err == 0 ) {..
                rmt->LearnIR(&ls); ..
                if (post) Post(x, "POSTOPTIONS", ri, true, &ls, &keyname);
        } // (1)
} else {
        rmt->LearnIR(); // (2)
}
return err; // (3)

Andreas

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel

Reply via email to