From: Sergey Poznyakoff Date: Mon, 10 May 2004 11:41:23 +0000 (+0000) Subject: (read_and): Print block number before X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=4c004cff39d10f1b7744aaec1c9eb85c9cfb3c56;p=chaz%2Ftar (read_and): Print block number before issuing 'Skipping to next header' diagnostics, if requested by block_number_option. --- diff --git a/src/list.c b/src/list.c index eb5f9ba..e2746bc 100644 --- a/src/list.c +++ b/src/list.c @@ -171,6 +171,15 @@ read_and (void (*do_something) (void)) case HEADER_ZERO_BLOCK: case HEADER_SUCCESS: + if (block_number_option) + { + char buf[UINTMAX_STRSIZE_BOUND]; + off_t block_ordinal = current_block_ordinal (); + block_ordinal -= recent_long_name_blocks; + block_ordinal -= recent_long_link_blocks; + fprintf (stdlis, _("block %s: "), + STRINGIFY_BIGINT (block_ordinal, buf)); + } ERROR ((0, 0, _("Skipping to next header"))); break;