I took only a very quick glance at
the source code: looks like you are using tab width 3 (is
that correct?) and I see very strange code formatting ...
can you be more specific about the strange formatting?
1. A tabstop of 3 is very odd.
2. Even with the tabstop of 3 the code is a bit unusual.
Configuring the editor to fold tabs into spaces is best, so that
the code reads easily
in any editor, and in diffs/patches/lp/more/etc, and avoids
weird whitespace diffs when
making changes. Prevents someone reading the code from having to
guess your tabstop.
Here's how the code looks in a default editor, more(1), printed
to paper/converted to PDF,
etc. Hard to read, and I think few would guess a tabstop of 3:
When the right tabstop of 3 is used, I'd agree with Albrecht,
the code is still oddly formatted.
While it's good that effort was made to keep all the comments
flush right and aligned,
having conditional code /also/ be indented far out to that
comment column is confusing
to the reader, making it hard to parse the code flow, causing
the eye to have to zig-zag
across the page to see if code or comments or both are in the
far right column:
In other words, it isn't expected code would be separated with
so much horizontal white space.
Even with syntax highlighting it's a bit of an effort to follow
the code flow.
This would be clearer to the reader and more standard:
The reader expects the code to be indented flush left in a
"stair-step" pattern
as per the code flow, and only comments indented far out to the
right.
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.