maint: switch from ERROR to paxerror etc

Prefer functions like ‘paxerror’ to macros like ‘ERROR’.
The functions have cleaner semantics, and calls are
easier to read.
This commit is contained in:
Paul Eggert
2024-08-19 09:57:13 -07:00
parent e9c16628f0
commit 0dfcfa4aa4
22 changed files with 548 additions and 634 deletions
+4 -4
View File
@@ -57,7 +57,7 @@ move_archive (off_t count)
|| ckd_add (&position, move_start, increment)
|| position < 0)
{
ERROR ((0, EOVERFLOW, "lseek: %s", archive_name_array[0]));
paxerror (EOVERFLOW, "lseek: %s", archive_name_array[0]);
return;
}
else if (rmtlseek (archive, position, SEEK_SET) == position)
@@ -205,12 +205,12 @@ delete_archive_members (void)
switch (previous_status)
{
case HEADER_STILL_UNREAD:
WARN ((0, 0, _("This does not look like a tar archive")));
paxwarn (0, _("This does not look like a tar archive"));
FALLTHROUGH;
case HEADER_SUCCESS:
case HEADER_SUCCESS_EXTENDED:
case HEADER_ZERO_BLOCK:
ERROR ((0, 0, _("Skipping to next header")));
paxerror (0, _("Skipping to next header"));
FALLTHROUGH;
case HEADER_FAILURE:
break;
@@ -348,7 +348,7 @@ delete_archive_members (void)
break;
case HEADER_FAILURE:
ERROR ((0, 0, _("Deleting non-header from archive")));
paxerror (0, _("Deleting non-header from archive"));
set_next_block_after (current_header);
break;