test results mc.hlp.it 156+ M
Pavel Roskin
proski at gnu.org
Thu Jan 23 19:57:16 UTC 2003
Hello!
> > This is used to print the table of contents. If cnode->heading_level is
> > negative, some stupid versions of fprintf may try to print an infinite
> > number of spaces.
>
> Negative width means left justified output.
Maybe. It was my first idea. It doesn't matter. The variable was
uninitialized, so it could be a large positive number.
> BTW, why do you complain against ?: operator?
I don't like too long expressions. It's hard to understand their
structure. Automatic indentation only makes things worse by breaking the
line regardless of parentheses.
On the other hand, the code using the "if" operator looks better after
automatic indentation. It's easier to notice similarities in the code and
reorganize it if required. Finally, it's easier to put comments into the
code.
For example, compare this
(widget->is_panelized) ? (widget->x = widget->parent.x) : (widget->x =
widget->parent.x + 4);
and this
if (widget->is_panelized) {
widget->x = widget->parent.x;
} else {
/* Need to leave 4 cells on the left */
widget->x = widget->parent.x + 4;
}
I have no problem with ?: if it doesn't make the code hard to read.
--
Regards,
Pavel Roskin
More information about the mc-devel
mailing list