13.07.2015 Views

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

LibrariesRandom accessstdio.hfseek(stream, offset,origin)DescriptionSets the position indicator <strong>for</strong> stream. (FSS implementation)When repositioning a binary file, the new position origin is given by the following macros:SEEK_SET 0 offset characters from the beginning of the fileSEEK_CUR 1 offset characters from the current position in the fileSEEK_END 2 offset characters from the end of the fileftell(stream)rewind(stream)Returns the current file position <strong>for</strong> stream, or -1L on error.(FSS implementation)Sets the file position indicator <strong>for</strong> the stream to the beginning of the file. Thisfunction is equivalent to:(void) fseek(stream,0L,SEEK_SET);clearerr(stream);(FSS implementation)fgetpos(stream,pos) Stores the current value of the file position indicator <strong>for</strong> stream in the objectpointed to by pos. (FSS implementation)fsetpos(stream,pos) Positions stream at the position recorded by fgetpos in *pos. (FSSimplementation)Operations on filesstdio.hremove(file)DescriptionRemoves the named file, so that a subsequent attempt to open it fails. Returns anon-zero value if not successful.rename(old,new) Changes the name of the file from old name to new name. Returns a non-zerovalue if not successful.tmpfile()tmpnam(buffer)Error handlingCreates a temporary file of the mode "wb+" that will be automatically removed whenclosed or when the program terminates normally. Returns a file pointer.Creates new file names that do not conflict with other file names currently in use.The new file name is stored in a buffer which must have room <strong>for</strong> L_tmpnamcharacters. Returns a pointer to the temporary name. The file names are createdin the current directory and all start with "tmp". At most TMP_MAX unique file namescan be generated.stdio.hclearerr(stream)ferror(stream)feof(stream)DescriptionClears the end of file and error indicators <strong>for</strong> stream.Returns a non-zero value if the error indicator <strong>for</strong> stream is set.Returns a non-zero value if the end of file indicator <strong>for</strong> stream is set.763

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

Saved successfully!

Ooh no, something went wrong!