# HG changeset patch # User Matti Hamalainen # Date 1455509270 -7200 # Node ID 09ca9d9a87108805738653e1899cd4fb4f559bd8 # Parent ff6d1a9a2fdeff311836fbf3dd34f0899bc24f19 Change to match changed th_ioctx API. diff -r ff6d1a9a2fde -r 09ca9d9a8710 sidlib.c --- 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