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.

Libraries2−31Operations on filesStdio.hremove(file)rename(old,new)tmpfile()tmpnam(buffer)DescriptionRemoves the named file, so that a subsequentattempt to open it fails. Returns a non−zero value ifnot succesful.Changes the name of the file from old name to newname. Returns a non−zero value if not succesful.Creates a temporary file of the mode "wb+" that will beautomatically removed when closed or when theprogram terminates normally. Returns a file pointer.Creates new file names that do not conflict with otherfile names currently in use. The new file name isstored in a buffer which must have room forL_tmpnam characters. Returns a pointer to thetemporary name. The file names are created in thecurrent directory and all start with "tmp". At mostTMP_MAX unique file names can be generated.Error handlingStdio.hclearerr(stream)ferror(stream)feof(stream)perror(*s)DescriptionClears the end of file and error indicators for stream.Returns a non−zero value if the error indicator forstream is set.Returns a non−zero value if the end of file indicator forstream is set.Prints s and the error message belonging to the integer errno. (See section 2.2.3, errno.h)2.2.20 STDLIB.H AND WCHAR.HThe header file stdlib.h contains general utility functions which fall intothe following categories (Some have parallel wide−character, declared inwchar.h)• Numeric conversions• Random number generation• Memory management• Envirnoment communication• Searching and sorting• • • • • • • •

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

Saved successfully!

Ooh no, something went wrong!