Join Nostr
2026-06-19 20:22:44 UTC

niin sanottu :maya-kurainmaster-yay: :tkw: on Nostr: even my corrected version fails with the same error. #include <u.h> #include <libc.h> ...

even my corrected version fails with the same error.

#include <u.h>
#include <libc.h>
#include <bio.h>

uchar
v (uchar b)
{
b = (b >> 4) | (b << 4);
b = ((b & 0xCC) >> 2) | ((b & 0x33) << 2);
b = ((b & 0xAA) >> 1) | ((b & 0x55) << 1);
return b;
}

void
main (void)
{
Biobuf B;
int w, h, i, r, t, x;
uchar *d; char *p;

Binit (&B, 0, OREAD);
p = Brdline (&B, '\n');
Bterm (&B);

w = strtol(p, &p, 10);
h = strtol(p, &p, 10);
r = (w + 7) / 8;
t = r * h;
d = malloc(t);

for (i = 0; i < t; i ++) d [i] = v ((uchar) (strtol (p, &p, 16)));

print ("%11s %11d %11d %11d %11d ", "k1", 0, 0, w, h);
write (1, d, t);

exits(0);
}

maybe i should use stdio... i am clearly filtered :mayasad:
thank you for reading my blog post.