From: Christopher Sean Morrison <brlcad@ma...> - 2008-07-14 08:12:35
Without even reading the code I can tell you that the #if/#else/
#endif directives are usually a tendency of Bob when he's testing new
code. Usually it just means he made a change with minimal testing,
leaving the previous code in case it needs to be reverted. Alas, he
more often than not makes the change and moves on leaving it to
someone else to wonder and clean up after years later ... :-)
Looking at the code in question, it looks like the entire guts to the
new bu_structparse_argv() are from bu_tcl.c's bu_tcl_structparse_argv
() where that #if didn't exist on the %S case. Looking at the old
code (the #else), I can see where that looks odd. It's sufficient
for bu_tcl_structparse_argv() since it just looks at the logged
result, but it won't actually set the parsed value if it's a vls now
(if I'm reading it correctly). Trying a few test cases..
p.s. I don't think Bob is presently able to read the brlcad-devel
mailings due to his new address, I'll pass on the question in person.
On Jul 11, 2008, at 8:40 AM, Daniel Roßberg wrote:
> The handling of bu_vls strings in bu_structparse_argv (lubbu/parse.c,
> line 2344-2350) looks odd to me. Does anybody remember why the
> #if/#else/#endif directives were introduced?
Get latest updates about Open Source Projects, Conferences and News.