

I’m not sure that’s K&R style. In various places you have things where the thing that follows a for, while or if isn’t indented, and as far as I’m aware, K&R indents religiously. K&R omits braces on single statements, sure, but that statement is nonetheless indented from the parent keyword.
e.g. you have things like:
while (condition)
statement;
and
for(x;y;z) {
if (condition) {
statement1;
statement2;
}
}
Which I’m pretty sure should be:
while (condition)
statement;
and
for(x;y;z) {
if (condition) {
statement1;
statement2;
}
}
respectively. The idea is that you can theoretically trace the keyword down to its closing brace, assuming there is one.

Call me cynical, but I think you’ve put quotes around the wrong part of your title.
Try around “accidentally”.