Homepage > Man Pages > Category > Subroutines
Homepage > Man Pages > Name > P

pack_fread

man page of pack_fread

pack_fread: Reads n bytes from the stream. Allegro game programming library.

NAME
pack_fread - Reads n bytes from the stream. Allegro game programming library.

SYNOPSIS

#include <allegro.h> long pack_fread(void *p, long n, PACKFILE *f);

DESCRIPTION

Reads 'n' bytes from the stream 'f', storing them at the memory location pointed to by 'p'. Example: unsigned char buf[256]; ... if (pack_fread(buf, 256, input_file) != 256) abort_on_error("Truncated input file!");

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.

SEE ALSO

pack_fopen(3alleg), pack_fopen_chunk(3alleg), pack_feof(3alleg),
 
 
 

Copyright © 2011–2018 by topics-of-interest.com . All rights reserved. Hosted by all-inkl.
Contact · Imprint · Privacy

Page generated in 59.24ms.

tier-bedarf.com | roboter.name | dfptutorial.com