One user-space repair task per eligible HWE debug-diag / compile-deploy base ID: 320 admitted (C 218, C++ 97, build scripts 5), 1 skipped by the content filter. Each ships a public spec with a check-to-basis table, at least two defects with single-fix fixtures, a symptom-masking fixture and an alternative correct implementation. Claude re-checked all 320: structure, the HWE quality items and trace6 Docker calibration receipts against current digests (320/320 USABLE). Difficulty is unmeasured. Known follow-up: 212 tasks use 120 ad-hoc family names; the next batch maps them to the canonical list. The batch's 1,256-line progress log stays in its factory report and the 36-local branch batch15-hwe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
40 lines
910 B
C
40 lines
910 B
C
#include "text.h"
|
|
|
|
size_t text_extent(const unsigned char *data, size_t length, enum text_kind kind)
|
|
{
|
|
(void)data;
|
|
(void)kind;
|
|
return length >= 5 ? 5 : length;
|
|
}
|
|
|
|
uint32_t text_hash_byte(uint32_t hash, unsigned char value)
|
|
{
|
|
hash ^= value;
|
|
hash *= UINT32_C(16777619);
|
|
return hash;
|
|
}
|
|
|
|
uint32_t text_hash_bytes(uint32_t hash, const unsigned char *data, size_t length)
|
|
{
|
|
size_t index;
|
|
for (index = 0; index < length; ++index) {
|
|
hash = text_hash_byte(hash, data[index]);
|
|
}
|
|
return hash;
|
|
}
|
|
|
|
size_t text_wire_size(const unsigned char *data, size_t length)
|
|
{
|
|
size_t result = 0;
|
|
size_t index;
|
|
for (index = 0; index < length; ++index) {
|
|
unsigned char value = data[index];
|
|
if (value >= 32 && value <= 126 && value != '\\' && value != '|') {
|
|
result += 1;
|
|
} else {
|
|
result += 4;
|
|
}
|
|
}
|
|
return result;
|
|
}
|