Ignore:
File:
1 edited

Legend:

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

    r1d6dd2a r11d9630  
    4040#include <stdio.h>
    4141#include <stdlib.h>
    42 #include <str.h>
    4342
    4443static table_column_t *table_column_first(table_t *);
     
    5251 * @return EOK on success, ENOMEM if out of memory
    5352 */
    54 static errno_t table_add_row(table_t *table, table_row_t **rrow)
     53static int table_add_row(table_t *table, table_row_t **rrow)
    5554{
    5655        table_row_t *row;
     
    7574 * @return EOK on success, ENOMEM if out of memory
    7675 */
    77 static errno_t table_row_add_cell(table_row_t *row, table_cell_t **rcell)
     76static int table_row_add_cell(table_row_t *row, table_cell_t **rcell)
    7877{
    7978        table_cell_t *cell;
     
    10099 * @return EOK on success, ENOMEM if out of memory
    101100 */
    102 static errno_t table_add_column(table_t *table, table_column_t **rcolumn)
     101static int table_add_column(table_t *table, table_column_t **rcolumn)
    103102{
    104103        table_column_t *column;
     
    122121 * @return EOK on success, ENOMEM if out of memory
    123122 */
    124 static errno_t table_write_next_cell(table_t *table)
    125 {
    126         errno_t rc;
     123static int table_write_next_cell(table_t *table)
     124{
     125        int rc;
    127126
    128127        rc = table_row_add_cell(table->wrow, &table->wcell);
     
    156155 * @return EOK on success, ENOMEM if out of memory
    157156 */
    158 static errno_t table_write_next_row(table_t *table)
    159 {
    160         errno_t rc;
     157static int table_write_next_row(table_t *table)
     158{
     159        int rc;
    161160
    162161        rc = table_add_row(table, &table->wrow);
     
    273272 * @return EOK on success, ENOMEM if out of memory
    274273 */
    275 static errno_t table_cell_extend(table_cell_t *cell, const char *str, size_t len)
     274static int table_cell_extend(table_cell_t *cell, const char *str, size_t len)
    276275{
    277276        char *cstr;
     
    299298 * @return EOK on success, ENOMEM if out of memory
    300299 */
    301 errno_t table_create(table_t **rtable)
     300int table_create(table_t **rtable)
    302301{
    303302        table_t *table;
    304         errno_t rc;
     303        int rc;
    305304
    306305        table = calloc(1, sizeof(table_t));
     
    378377 * @return EOK on success, EIO on I/O error
    379378 */
    380 errno_t table_print_out(table_t *table, FILE *f)
     379int table_print_out(table_t *table, FILE *f)
    381380{
    382381        table_row_t *row;
     
    475474 * @return EOK on success, ENOMEM if out of memory
    476475 */
    477 errno_t table_printf(table_t *table, const char *fmt, ...)
     476int table_printf(table_t *table, const char *fmt, ...)
    478477{
    479478        va_list args;
    480         errno_t rc;
    481         int ret;
     479        int rc;
    482480        char *str;
    483481        char *sp, *ep;
     
    488486
    489487        va_start(args, fmt);
    490         ret = vasprintf(&str, fmt, args);
     488        rc = vasprintf(&str, fmt, args);
    491489        va_end(args);
    492490
    493         if (ret < 0) {
     491        if (rc < 0) {
    494492                table->error = ENOMEM;
    495493                return table->error;
     
    549547 * @return EOK if no error indicated, non-zero error code otherwise
    550548 */
    551 errno_t table_get_error(table_t *table)
     549int table_get_error(table_t *table)
    552550{
    553551        return table->error;
Note: See TracChangeset for help on using the changeset viewer.