From 69faf1b40314399d5997834d7cec510bfc0b0243 Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Sat, 18 Nov 2023 20:30:47 -0800 Subject: [PATCH] Release Cosmpolitan v3.1 --- libc/integral/normalize.inc | 4 ++-- tool/decode/zip.c | 39 ++----------------------------------- 2 files changed, 4 insertions(+), 39 deletions(-) diff --git a/libc/integral/normalize.inc b/libc/integral/normalize.inc index fda45efda..38d192213 100644 --- a/libc/integral/normalize.inc +++ b/libc/integral/normalize.inc @@ -3,8 +3,8 @@ #endif #define __COSMOPOLITAN_MAJOR__ 3 -#define __COSMOPOLITAN_MINOR__ 0 -#define __COSMOPOLITAN_PATCH__ 2 +#define __COSMOPOLITAN_MINOR__ 1 +#define __COSMOPOLITAN_PATCH__ 0 #define __COSMOPOLITAN__ \ (100000000 * __COSMOPOLITAN_MAJOR__ + 1000000 * __COSMOPOLITAN_MINOR__ + \ __COSMOPOLITAN_PATCH__) diff --git a/tool/decode/zip.c b/tool/decode/zip.c index 7003aba49..adc17f740 100644 --- a/tool/decode/zip.c +++ b/tool/decode/zip.c @@ -454,41 +454,6 @@ void ShowCentralDirHeader64(uint8_t *cd) { show(".long", format(b1, "%d", READ32LE(cd + 4 + 4 + 8)), "totaldisks"); } -static const char *DescribeZipError(int err) { - switch (err) { - case kZipErrorEocdNotFound: - return "kZipErrorEocdNotFound"; - case kZipErrorEocdOffsetOverflow: - return "kZipErrorEocdOffsetOverflow"; - case kZipErrorEocdMagicNotFound: - return "kZipErrorEocdMagicNotFound"; - case kZipErrorEocdSizeOverflow: - return "kZipErrorEocdSizeOverflow"; - case kZipErrorEocdDiskMismatch: - return "kZipErrorEocdDiskMismatch"; - case kZipErrorEocdOffsetSizeOverflow: - return "kZipErrorEocdOffsetSizeOverflow"; - case kZipErrorEocdRecordsMismatch: - return "kZipErrorEocdRecordsMismatch"; - case kZipErrorEocdRecordsOverflow: - return "kZipErrorEocdRecordsOverflow"; - case kZipErrorCdirOffsetPastEocd: - return "kZipErrorCdirOffsetPastEocd"; - case kZipErrorEocdLocatorMagic: - return "kZipErrorEocdLocatorMagic"; - case kZipErrorEocdLocatorOffset: - return "kZipErrorEocdLocatorOffset"; - case kZipErrorRaceCondition: - return "kZipErrorRaceCondition"; - case kZipErrorMapFailed: - return "kZipErrorMapFailed"; - case kZipErrorOpenFailed: - return "kZipErrorOpenFailed"; - default: - return "unknown"; - } -} - int IsZipEocd32(const uint8_t *p, size_t n, size_t i) { size_t offset; if (i > n || n - i < kZipCdirHdrMinSize) { @@ -529,8 +494,8 @@ uint8_t *GetZipCdir32(const uint8_t *p, size_t n) { return (/*unconst*/ uint8_t *)(p + i); } kprintf("warning: found eocd32 magic at offset 0x%lx that didn't look " - "like an eocd32 record: %s\n", - i, DescribeZipError(err)); + "like an eocd32 record\n", + i); } } }