@Andrew Henle, numerous standard C function that are also specified to return -1 on an error --> Off hand, I can think of 2 sets: time() & friends and various wc...(). The are many I/O functions that return EOF, yet that is not specified as -1 - just some negative. Posix I/O functions could have done likewise.