projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
a bit more IPv6-ization work
[oweals/busybox.git]
/
archival
/
uncompress.c
diff --git
a/archival/uncompress.c
b/archival/uncompress.c
index 8c466ebdf9d7df3597ef932c2ac82fa0638bb9e8..4611790168dc9de568f5361b2d26928f9f7dcb84 100644
(file)
--- a/
archival/uncompress.c
+++ b/
archival/uncompress.c
@@
-16,16
+16,16
@@
int uncompress_main(int argc, char **argv)
int status = EXIT_SUCCESS;
unsigned long flags;
int status = EXIT_SUCCESS;
unsigned long flags;
- flags =
bb_getopt_ulflags
(argc, argv, "cf");
+ flags =
getopt32
(argc, argv, "cf");
while (optind < argc) {
while (optind < argc) {
- c
onst c
har *compressed_file = argv[optind++];
- c
onst c
har *delete_path = NULL;
+ char *compressed_file = argv[optind++];
+ char *delete_path = NULL;
char *uncompressed_file = NULL;
int src_fd;
int dst_fd;
char *uncompressed_file = NULL;
int src_fd;
int dst_fd;
- if (
strcmp(compressed_file, "-") == 0
) {
+ if (
LONE_DASH(compressed_file)
) {
src_fd = STDIN_FILENO;
flags |= GUNZIP_TO_STDOUT;
} else {
src_fd = STDIN_FILENO;
flags |= GUNZIP_TO_STDOUT;
} else {
@@
-49,7
+49,7
@@
int uncompress_main(int argc, char **argv)
extension = strrchr(uncompressed_file, '.');
if (!extension || (strcmp(extension, ".Z") != 0)) {
extension = strrchr(uncompressed_file, '.');
if (!extension || (strcmp(extension, ".Z") != 0)) {
- bb_error_msg_and_die("
I
nvalid extension");
+ bb_error_msg_and_die("
i
nvalid extension");
}
*extension = '\0';
}
*extension = '\0';
@@
-65,7
+65,7
@@
int uncompress_main(int argc, char **argv)
/* do the decompression, and cleanup */
if ((xread_char(src_fd) != 0x1f) || (xread_char(src_fd) != 0x9d)) {
/* do the decompression, and cleanup */
if ((xread_char(src_fd) != 0x1f) || (xread_char(src_fd) != 0x9d)) {
- bb_error_msg_and_die("
I
nvalid magic");
+ bb_error_msg_and_die("
i
nvalid magic");
}
status = uncompress(src_fd, dst_fd);
}
status = uncompress(src_fd, dst_fd);
@@
-84,7
+84,7
@@
int uncompress_main(int argc, char **argv)
/* delete_path will be NULL if in test mode or from stdin */
if (delete_path && (unlink(delete_path) == -1)) {
/* delete_path will be NULL if in test mode or from stdin */
if (delete_path && (unlink(delete_path) == -1)) {
- bb_error_msg_and_die("
Couldn'
t remove %s", delete_path);
+ bb_error_msg_and_die("
canno
t remove %s", delete_path);
}
free(uncompressed_file);
}
free(uncompressed_file);