Changeset 207d5da in mainline for uspace/lib/c/generic/io/table.c


Ignore:
Timestamp:
2017-09-22T07:21:53Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5c769d54
Parents:
5e962ad
Message:

Fix extraneous empty line printed after table.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/table.c

    r5e962ad r207d5da  
    165165        }
    166166
    167         return table_write_next_cell(table);
     167        table->wcell = NULL;
     168        return EOK;
    168169}
    169170
     
    394395        while (row != NULL) {
    395396                cell = table_row_cell_first(row);
     397                if (cell == NULL)
     398                        break;
     399
    396400                column = table_column_first(table);
    397401                firstc = true;
     402
    398403                while (cell != NULL && cell->text != NULL) {
    399404                        spacing = firstc ? table->metrics.margin_left : 1;
     
    495500                        ++ep;
    496501
     502                if (table->wcell == NULL) {
     503                        rc = table_write_next_cell(table);
     504                        if (rc != EOK) {
     505                                assert(rc == ENOMEM);
     506                                goto out;
     507                        }
     508                }
     509
    497510                rc = table_cell_extend(table->wcell, sp, ep - sp);
    498511                if (rc != EOK) {
Note: See TracChangeset for help on using the changeset viewer.