C programmers be like: i want a function with a short name and a looong body
java programmers will have a method called retrieveBlockFromCentralBlockAndCacheContents which just calls another method somewhere, c programmers will have a function called getblk and it's 1000 lines of triply nested for loops and fiddly logic
calling out past emily btw the function is too long to screenshot lol
it's from the filesystem hjfs that i wrote for plan 9
getblk() was one of the worst functions i had ever written at the time, it took ages to get all the cornercases right, it ended up a dumping ground for a lot of functionality, it's really the core of the fs
it's wild that at the time i thought i had it all figured out and now i look back on it and all i can say is lmao :)
there was a reason why it's a single function rather than multiple but i think if C supported functions within functions it would have been much easier to write and i wouldn't have gotten myself tangled up in so much mess tbh
maybe in hindsight writing multiple functions and copy-pasting the common parts would have been a better idea though