}
}
}
+
+ if (is_last_column(cl))
+ return;
+
/* fill rest of cell with space */
for(; len_pad < cl->width; ++len_pad)
fputc(' ', tb->out);
- if (!is_last_column(cl))
- fputs(colsep(tb), tb->out);
+ fputs(colsep(tb), tb->out);
}
fputs(UL_COLOR_RESET, tb->out);
free(data);
+ if (is_last_column(cl))
+ return 0;
+
for (i = len; i < width; i++)
fputc(' ', tb->out); /* padding */
- if (!is_last_column(cl))
- fputs(colsep(tb), tb->out); /* columns separator */
-
+ fputs(colsep(tb), tb->out); /* columns separator */
return 0;
err:
free(data);
if (is_last_column(cl)
&& len < width
&& !scols_table_is_maxout(tb)
- && !scols_column_is_right(cl)
- && !scols_column_is_wrap(cl)
- && !scols_column_is_wrapnl(cl))
+ && !scols_column_is_right(cl))
width = len;
/* truncate data */