13.07.2015 Views

pcp_reference_guide_v2.5 - Tasking

pcp_reference_guide_v2.5 - Tasking

pcp_reference_guide_v2.5 - Tasking

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2−22PCP Reference ManualLow level file access functionsStdio.h_close(fd)_lseek(fd,offset,whence)_open(fd,flags)_read(fd,*buff,cnt)_unlink(*name)_write(fd,*buffer,cnt)DescriptionUsed by the functions close and fclose.(FSS implementation)Used by all file positioning functions:fgetpos, fseek, fsetpos, ftell, rewind.(FSS implementation)Used by the functions fopen andfreopen. (FSS implementation)Reads a sequence of characters from afile. (FSS implementation)Used by the function remove.(FSS implementation)Writes a sequence of characters to a file.(FSS implementation)File accessLIBRARIESStdio.hfopen(name,mode)fclose(name)DescriptionOpens a file for a given mode. Availablemodes are:"r" read; open text file for reading"w" write; create text file for writing;if the file already exists its contentsis discarded"a" append; open existing text file orcreate new text file for writing atend of file"r+" open text file for update; readingand writing"w+" create text file for update; previouscontents if any is discarded"a+" append; open or create text file forupdate, writes at end of file(FSS implementation)Flushes the data stream and closes thespecified file that was previously openedwith fopen. (FSS implementation)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!