Changes in uspace/lib/c/generic/io/table.c [1d6dd2a:11d9630] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/io/table.c
r1d6dd2a r11d9630 40 40 #include <stdio.h> 41 41 #include <stdlib.h> 42 #include <str.h>43 42 44 43 static table_column_t *table_column_first(table_t *); … … 52 51 * @return EOK on success, ENOMEM if out of memory 53 52 */ 54 static errno_t table_add_row(table_t *table, table_row_t **rrow)53 static int table_add_row(table_t *table, table_row_t **rrow) 55 54 { 56 55 table_row_t *row; … … 75 74 * @return EOK on success, ENOMEM if out of memory 76 75 */ 77 static errno_t table_row_add_cell(table_row_t *row, table_cell_t **rcell)76 static int table_row_add_cell(table_row_t *row, table_cell_t **rcell) 78 77 { 79 78 table_cell_t *cell; … … 100 99 * @return EOK on success, ENOMEM if out of memory 101 100 */ 102 static errno_t table_add_column(table_t *table, table_column_t **rcolumn)101 static int table_add_column(table_t *table, table_column_t **rcolumn) 103 102 { 104 103 table_column_t *column; … … 122 121 * @return EOK on success, ENOMEM if out of memory 123 122 */ 124 static errno_t table_write_next_cell(table_t *table)125 { 126 errno_t rc;123 static int table_write_next_cell(table_t *table) 124 { 125 int rc; 127 126 128 127 rc = table_row_add_cell(table->wrow, &table->wcell); … … 156 155 * @return EOK on success, ENOMEM if out of memory 157 156 */ 158 static errno_t table_write_next_row(table_t *table)159 { 160 errno_t rc;157 static int table_write_next_row(table_t *table) 158 { 159 int rc; 161 160 162 161 rc = table_add_row(table, &table->wrow); … … 273 272 * @return EOK on success, ENOMEM if out of memory 274 273 */ 275 static errno_t table_cell_extend(table_cell_t *cell, const char *str, size_t len)274 static int table_cell_extend(table_cell_t *cell, const char *str, size_t len) 276 275 { 277 276 char *cstr; … … 299 298 * @return EOK on success, ENOMEM if out of memory 300 299 */ 301 errno_t table_create(table_t **rtable)300 int table_create(table_t **rtable) 302 301 { 303 302 table_t *table; 304 errno_t rc;303 int rc; 305 304 306 305 table = calloc(1, sizeof(table_t)); … … 378 377 * @return EOK on success, EIO on I/O error 379 378 */ 380 errno_t table_print_out(table_t *table, FILE *f)379 int table_print_out(table_t *table, FILE *f) 381 380 { 382 381 table_row_t *row; … … 475 474 * @return EOK on success, ENOMEM if out of memory 476 475 */ 477 errno_t table_printf(table_t *table, const char *fmt, ...)476 int table_printf(table_t *table, const char *fmt, ...) 478 477 { 479 478 va_list args; 480 errno_t rc; 481 int ret; 479 int rc; 482 480 char *str; 483 481 char *sp, *ep; … … 488 486 489 487 va_start(args, fmt); 490 r et= vasprintf(&str, fmt, args);488 rc = vasprintf(&str, fmt, args); 491 489 va_end(args); 492 490 493 if (r et< 0) {491 if (rc < 0) { 494 492 table->error = ENOMEM; 495 493 return table->error; … … 549 547 * @return EOK if no error indicated, non-zero error code otherwise 550 548 */ 551 errno_t table_get_error(table_t *table)549 int table_get_error(table_t *table) 552 550 { 553 551 return table->error;
Note:
See TracChangeset
for help on using the changeset viewer.