The value "short" on the fread man page is not a data type.
"Short" in this case means "less than expected." If fread () should read 4 objects, but only read 3, it will return 3.
I believe that the manual page should be rewritten to say: "If an error occurs or the end of the file is reached, the return value is the number of elements that were successfully read or written until an error or EOF occurs.
jmd
source share