diff options
Diffstat (limited to 'gunzip.c')
-rw-r--r-- | gunzip.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -297,7 +297,7 @@ int in; /* input file descriptor */ | |||
297 | 297 | ||
298 | method = (int) get_byte(); | 298 | method = (int) get_byte(); |
299 | if (method != DEFLATED) { | 299 | if (method != DEFLATED) { |
300 | error_msg("unknown method %d -- get newer version of gzip\n", method); | 300 | error_msg("unknown method %d -- get newer version of gzip", method); |
301 | exit_code = ERROR; | 301 | exit_code = ERROR; |
302 | return -1; | 302 | return -1; |
303 | } | 303 | } |
@@ -1116,11 +1116,11 @@ int in, out; /* input and output file descriptors */ | |||
1116 | if (res == 3) { | 1116 | if (res == 3) { |
1117 | error_msg(memory_exhausted); | 1117 | error_msg(memory_exhausted); |
1118 | } else if (res != 0) { | 1118 | } else if (res != 0) { |
1119 | error_msg("invalid compressed data--format violated\n"); | 1119 | error_msg("invalid compressed data--format violated"); |
1120 | } | 1120 | } |
1121 | 1121 | ||
1122 | } else { | 1122 | } else { |
1123 | error_msg("internal error, invalid method\n"); | 1123 | error_msg("internal error, invalid method"); |
1124 | } | 1124 | } |
1125 | 1125 | ||
1126 | /* Get the crc and original length */ | 1126 | /* Get the crc and original length */ |
@@ -1149,15 +1149,15 @@ int in, out; /* input and output file descriptors */ | |||
1149 | 1149 | ||
1150 | /* Validate decompression */ | 1150 | /* Validate decompression */ |
1151 | if (orig_crc != updcrc(outbuf, 0)) { | 1151 | if (orig_crc != updcrc(outbuf, 0)) { |
1152 | error_msg("invalid compressed data--crc error\n"); | 1152 | error_msg("invalid compressed data--crc error"); |
1153 | } | 1153 | } |
1154 | if (orig_len != (ulg) bytes_out) { | 1154 | if (orig_len != (ulg) bytes_out) { |
1155 | error_msg("invalid compressed data--length error\n"); | 1155 | error_msg("invalid compressed data--length error"); |
1156 | } | 1156 | } |
1157 | 1157 | ||
1158 | /* Check if there are more entries in a pkzip file */ | 1158 | /* Check if there are more entries in a pkzip file */ |
1159 | if (pkzip && inptr + 4 < insize && LG(inbuf + inptr) == LOCSIG) { | 1159 | if (pkzip && inptr + 4 < insize && LG(inbuf + inptr) == LOCSIG) { |
1160 | fprintf(stderr, "has more than one entry--rest ignored\n"); | 1160 | error_msg("has more than one entry--rest ignored"); |
1161 | if (exit_code == OK) | 1161 | if (exit_code == OK) |
1162 | exit_code = WARNING; | 1162 | exit_code = WARNING; |
1163 | } | 1163 | } |
@@ -1261,9 +1261,9 @@ int gunzip_main(int argc, char **argv) | |||
1261 | } | 1261 | } |
1262 | 1262 | ||
1263 | if (isatty(fileno(stdin)) && fromstdin==1 && force==0) | 1263 | if (isatty(fileno(stdin)) && fromstdin==1 && force==0) |
1264 | error_msg_and_die( "data not read from terminal. Use -f to force it.\n"); | 1264 | error_msg_and_die( "data not read from terminal. Use -f to force it."); |
1265 | if (isatty(fileno(stdout)) && tostdout==1 && force==0) | 1265 | if (isatty(fileno(stdout)) && tostdout==1 && force==0) |
1266 | error_msg_and_die( "data not written to terminal. Use -f to force it.\n"); | 1266 | error_msg_and_die( "data not written to terminal. Use -f to force it."); |
1267 | 1267 | ||
1268 | gunzip_init(); | 1268 | gunzip_init(); |
1269 | 1269 | ||