.\" Generated by the Allegro makedoc utility .TH pack_fread 3alleg4 "version 4.4.3" "Allegro" "Allegro manual" .SH NAME pack_fread \- Reads n bytes from the stream. Allegro game programming library.\& .SH SYNOPSIS .B #include .sp .B long pack_fread(void *p, long n, PACKFILE *f); .SH DESCRIPTION Reads `n' bytes from the stream `f', storing them at the memory location pointed to by `p'. Example: .nf unsigned char buf[256]; ... if (pack_fread(buf, 256, input_file) != 256) abort_on_error("Truncated input file!"); .fi .SH "RETURN VALUE" Returns the number of bytes read, which will be less than `n' if EOF is reached or an error occurs. Error codes are stored in errno. .SH SEE ALSO .BR pack_fopen (3alleg4), .BR pack_fopen_chunk (3alleg4), .BR pack_feof (3alleg4), .BR expackf (3alleg4)