The extremely odd for-loop structure feels to me like someone was trying very hard to avoid a goto, and in the process obfuscated the flow quite a bit more. The special case of head'ing stdin is similar to the classic "loop and a half problem" (which is really only a problem if you religiously abstain from goto use.) I'd consider this a more straightforward way to do it:
FILE *f;
int i = 1;
...
if(argc < 2) {
f = stdin;
goto do_head;
}
...
while(i<argc) {
f = fopen(argv[i], "r");
/* check for failure to open */
...
do_head:
/* head'ing code goes here */
...
fclose(f);
i++;
}
That being said, OpenBSD code is still far more concise and readable than GNU; compare coreutils' head.c here:
http://code.metager.de/source/xref/gnu/coreutils/src/head.c
GNU head has a bit more functionality, but I don't think the increase in complexity - nearly 10x more lines - is proportional to that.