Mercurial > hg > sidinfo
changeset 104:09ca9d9a8710
Change to match changed th_ioctx API.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 15 Feb 2016 06:07:50 +0200 |
parents | ff6d1a9a2fde |
children | 9a0aeb9ce9ba 9ff4f6da3db8 |
files | sidlib.c |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/sidlib.c Mon Feb 15 04:43:22 2016 +0200 +++ b/sidlib.c Mon Feb 15 06:07:50 2016 +0200 @@ -55,9 +55,9 @@ !thfread_be16(ctx, &psid->startSong) || !thfread_be32(ctx, &psid->speed)) { - th_io_error(ctx, ctx->errno, + th_io_error(ctx, ctx->status, "Could not read PSID/RSID header: %s.\n", - th_error_str(ctx->errno)); + th_error_str(ctx->status)); goto error; } @@ -78,9 +78,9 @@ !thfread_str(ctx, (uint8_t *) psid->sidAuthor, PSID_STR_LEN) || !thfread_str(ctx, (uint8_t *) psid->sidCopyright, PSID_STR_LEN)) { - th_io_error(ctx, ctx->errno, + th_io_error(ctx, ctx->status, "Error reading SID file header: %s.\n", - th_error_str(ctx->errno)); + th_error_str(ctx->status)); goto error; } @@ -97,9 +97,9 @@ !thfread_u8(ctx, &psid->pageLength) || !thfread_be16(ctx, &psid->reserved)) { - th_io_error(ctx, ctx->errno, + th_io_error(ctx, ctx->status, "Error reading PSID/RSID v2+ extra header data: %s.\n", - th_error_str(ctx->errno)); + th_error_str(ctx->status)); goto error; } } @@ -384,7 +384,7 @@ th_io_error(ctx, THERR_MALLOC, "Error allocating temporary data buffer of %d bytes.\n", PSID_BUFFER_SIZE); - return ctx->errno; + return ctx->status; } while (thfgets(line, PSID_BUFFER_SIZE, ctx) != NULL) @@ -573,7 +573,7 @@ th_free(node); th_io_error(ctx, THERR_MALLOC, "Could not allocate memory for node.\n"); - return ctx->errno; + return ctx->status; } // Read node lenghts