Improve code formatting according to CMP.

Add one pair of braces for clarity, move some other braces and
else statements around. There's more to that, but these were
minimal changes to improve readability for solving STR #3043.
There are no real code changes involved though.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10474 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser 2014-11-27 15:29:54 +00:00
parent e7e8faa25b
commit 9797563552

View File

@ -351,9 +351,8 @@ Fl_File_Browser::item_draw(void *p, // I - List item data
else
fl_color(fl_inactive(c));
for (t = line->txt, ptr = fragment; *t != '\0'; t ++)
if (*t == '\n')
{
for (t = line->txt, ptr = fragment; *t != '\0'; t ++) {
if (*t == '\n') {
// Newline - nul terminate this fragment and draw it...
*ptr = '\0';
@ -365,21 +364,18 @@ Fl_File_Browser::item_draw(void *p, // I - List item data
width = 0;
Y += fl_height();
column = 0;
}
else if (*t == column_char())
{
} else if (*t == column_char()) {
// Tab - nul terminate this fragment and draw it...
*ptr = '\0';
int cW = W - width; // Clip width...
if (columns)
{
// Try clipping inside this column...
if (columns) {
// Try clipping inside this column...
for (i = 0; i < column && columns[i]; i ++) { ; }
if (columns[i])
cW = columns[i];
if (columns[i])
cW = columns[i];
}
fl_draw(fragment, X + width, Y, cW, fl_height(),
@ -387,21 +383,18 @@ Fl_File_Browser::item_draw(void *p, // I - List item data
// Advance to the next column...
column ++;
if (columns)
{
if (columns) {
for (i = 0, width = 0; i < column && columns[i]; i ++)
width += columns[i];
}
else
width = column * (int)(fl_height() * 0.6 * 8.0);
width = column * (int)(fl_height() * 0.6 * 8.0);
ptr = fragment;
}
else
*ptr++ = *t;
if (ptr > fragment)
{
}
if (ptr > fragment) {
// Nul terminate this fragment and draw it...
*ptr = '\0';