chknl() fail to detect eof, and prints the followin warning:
warning: newline expected, got "�" (where the char in question is 255)
The fix is trivial: check for a return of 0 in sloscan(). However, sloscan() might also return (usch)-1 (i.e. 255) because it can happen that unch() has been called beforehand with a value of -1 returned by sloscan(), and unch(-1) actually pushes back 255.
See the attached patch for a fix (hopefully more formal than my tentative explanation above :)