jcs
/subtext
/amendments
/424
zip: Tweak log messages
jcs made amendment 424 about 1 year ago
--- zip.c Mon Mar 13 22:51:24 2023
+++ zip.c Wed Mar 15 14:00:22 2023
@@ -110,7 +110,7 @@ zip_read_file(Str255 path, zip_extract_decider *decide
goto read_fail;
t = GET_U16(&buf);
if (t & (1 << 0)) {
- logger_printf("[zip] encryption not supported");
+ logger_printf("[zip] Encryption not supported");
goto read_fail;
}
@@ -119,7 +119,7 @@ zip_read_file(Str255 path, zip_extract_decider *decide
goto read_fail;
t = GET_U16(&buf);
if (t != 8) {
- logger_printf("[zip] compression %d not supported", t);
+ logger_printf("[zip] Compression method %d not supported", t);
goto read_fail;
}
@@ -140,11 +140,11 @@ zip_read_file(Str255 path, zip_extract_decider *decide
goto read_fail;
}
if ((signed long)comp_len < 0) {
- logger_printf("[zip] bogus compressed length (%lu)", comp_len);
+ logger_printf("[zip] Bogus compressed length (%lu)", comp_len);
goto read_fail;
}
if (comp_len == 0) {
- logger_printf("[zip] data descriptor not supported");
+ logger_printf("[zip] Data descriptor not supported");
goto read_fail;
}
@@ -157,12 +157,12 @@ zip_read_file(Str255 path, zip_extract_decider *decide
goto read_fail;
}
if ((signed long)uncomp_len < 0) {
- logger_printf("[zip] bogus uncompressed length (%lu)",
+ logger_printf("[zip] Bogus uncompressed length (%lu)",
uncomp_len);
goto read_fail;
}
if (uncomp_len == 0) {
- logger_printf("[zip] data descriptor not supported");
+ logger_printf("[zip] Data descriptor not supported");
goto read_fail;
}
@@ -171,7 +171,7 @@ zip_read_file(Str255 path, zip_extract_decider *decide
goto read_fail;
fn_len = GET_U16(&buf);
if (fn_len >= sizeof(buf)) {
- logger_printf("[zip] filename len %d too big", fn_len);
+ logger_printf("[zip] Filename len %d too big", fn_len);
goto read_fail;
}
@@ -182,7 +182,7 @@ zip_read_file(Str255 path, zip_extract_decider *decide
/* filename */
if (fn_len > sizeof(filename)) {
- logger_printf("[zip] filename too long (%ld)", fn_len);
+ logger_printf("[zip] Filename too long (%ld)", fn_len);
goto read_fail;
}
@@ -197,7 +197,7 @@ zip_read_file(Str255 path, zip_extract_decider *decide
if (decider(filename, uncomp_len)) {
comp = xmalloc(comp_len);
if (comp == NULL) {
- logger_printf("[zip] failed to malloc(%ld) for "
+ logger_printf("[zip] Failed to malloc(%ld) for "
"compressed data", comp_len);
goto read_fail;
}
@@ -210,7 +210,7 @@ zip_read_file(Str255 path, zip_extract_decider *decide
uncomp = xmalloc(uncomp_len);
if (uncomp == NULL) {
- logger_printf("[zip] failed to malloc(%ld) for "
+ logger_printf("[zip] Failed to malloc(%ld) for "
"uncompressed data", uncomp_len);
xfree(&comp);
goto read_fail;
@@ -218,7 +218,7 @@ zip_read_file(Str255 path, zip_extract_decider *decide
ret = puff(uncomp, &uncomp_len, comp, &comp_len);
if (ret != 0) {
- logger_printf("[zip] unzip failed: %d", ret);
+ logger_printf("[zip] Unzip failed: %d", ret);
xfree(&comp);
xfree(&uncomp);
goto read_fail;