aboutsummaryrefslogtreecommitdiff
path: root/src/tar.c
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2020-08-10 12:43:26 +0200
committerJan200101 <sentrycraft123@gmail.com>2020-08-10 12:43:26 +0200
commit1753e2b151cbb4af75a4e9ea61720b3704b03805 (patch)
tree6265e9829a6d6b76ddae13de2138ef8f1c657ccd /src/tar.c
parentc11dd0eae09df4982459a34d764910d0501f2ae2 (diff)
downloadpolecat-1753e2b151cbb4af75a4e9ea61720b3704b03805.tar.gz
polecat-1753e2b151cbb4af75a4e9ea61720b3704b03805.zip
a lot of changes […]0.1.3
- go to next entry of argv and decrement argc the deeper it goes - add basic lutris functionality - remove "help" from help message and as a command - replace all stderr prints with stdout prints (usually stderr is better for directly informing the user but in this case I don't think it will help much) - add libarchive dependency to the README - bump version number
Diffstat (limited to 'src/tar.c')
-rw-r--r--src/tar.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tar.c b/src/tar.c
index 8894676..0fd4fc3 100644
--- a/src/tar.c
+++ b/src/tar.c
@@ -19,7 +19,7 @@ static int copy_data(struct archive* ar, struct archive* aw)
return (r);
r = archive_write_data_block(aw, buff, size, offset);
if (r < ARCHIVE_OK) {
- fprintf(stderr, "%s\n", archive_error_string(aw));
+ printf("%s\n", archive_error_string(aw));
return (r);
}
}
@@ -32,7 +32,7 @@ void extract(const char* filename, const char* outputdir)
if (chdir(outputdir) < 0)
{
- fprintf(stderr, "Cannot change to %s\n", outputdir);
+ printf("Cannot change to %s\n", outputdir);
return;
}
@@ -67,7 +67,7 @@ void extract(const char* filename, const char* outputdir)
if (r < ARCHIVE_OK)
{
- fprintf(stderr, "%s\n", archive_error_string(a));
+ printf("%s\n", archive_error_string(a));
}
if (r < ARCHIVE_WARN)
@@ -78,20 +78,20 @@ void extract(const char* filename, const char* outputdir)
r = archive_write_header(ext, entry);
if (r < ARCHIVE_OK)
{
- fprintf(stderr, "%s\n", archive_error_string(ext));
+ printf("%s\n", archive_error_string(ext));
}
else if (archive_entry_size(entry) > 0)
{
r = copy_data(a, ext);
if (r < ARCHIVE_OK)
- fprintf(stderr, "%s\n", archive_error_string(ext));
+ printf("%s\n", archive_error_string(ext));
if (r < ARCHIVE_WARN)
return;
}
r = archive_write_finish_entry(ext);
if (r < ARCHIVE_OK)
- fprintf(stderr, "%s\n", archive_error_string(ext));
+ printf("%s\n", archive_error_string(ext));
if (r < ARCHIVE_WARN)
return;
}