My program is written in C for Linux, and has many functions with different patterns for return values:
1) one or two return n on success and -1>
n
-1>
Why don't you use the method used by the C standard library? Oh, wait...