Phil Dibowitz wrote: > On Sun, Mar 16, 2008 at 02:25:42PM -0600, Stephen Warren wrote: >> GetTag: Add size parameter; the point of the change. > > Reading through the diff it looks like the user passes in two pointers here > - one that's the start of the data and one that's the modified to the start of > the found tag. The user has to make a second pointer anyway, so we might as > well just let them make that temp pointer be the start of the data as we were > doing before... don't see the need to add another thing in the stack.
As a personal preference, I like to avoid inout parameters, such that all parameters are either parameters passed in to, or results passed out of, a function. A result of this is that at the call site, "x" is in, and "&x" is out; a /little/ more self-documenting without reading the function docs. Still, I can change that if it really bugs you. > The one thing that stood out: > >> + // Consume tags until there aren't any left >> + for (;;) { >> + // Loop searching for start of tag character >> + for (;;) { > > Nitpicky, but stylistically I'd prefer while (1) here. I was always taught > that for is for when you know how many interations (foo < bar) and while is > for when you don't (1, or "still exists" or read() or whatever). I'm guessing > your not a big fan of do-while either - neither am I. I didn't write those :) Either way works fine for me; I just worked in environments (peer groups) that preferred for(;;) "for ever". I can certainly switch the over though. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel