mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
Release Cosmpolitan v3.1
This commit is contained in:
parent
e4dea37b8e
commit
69faf1b403
2 changed files with 4 additions and 39 deletions
|
@ -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__)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue