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.

<strong>TASKING</strong> <strong>VX</strong>-<strong>toolset</strong> <strong>for</strong> <strong>ARM</strong> <strong>User</strong> <strong>Guide</strong>atexit(*func)exit(status)_Exit(status)getenv(*s)system(*s)func points to a function that is called (without arguments) when the programnormally terminates.Causes normal program termination. Acts as if main() returns with status asthe return value. Status can also be specified with the predefined macrosEXIT_SUCCES or EXIT_FAILURE.Same as exit, but not registered by the atexit function or signal handlersregistered by the signal function are called.Searches an environment list <strong>for</strong> a string s. Returns a pointer to the contentsof s.NOTE: this function is not implemented because there is no OS.Passes the string s to the environment <strong>for</strong> execution.NOTE: this function is not implemented because there is no OS.Searching and sortingbsearch(*key,*base, n, size,*cmp)qsort(*base, n,size, *cmp)This function searches in an array of n members, <strong>for</strong> the object pointed to bykey. The initial base of the array is given by base. The size of each memberis specified by size. The given array must be sorted in ascending order,according to the results of the function pointed to by cmp. Returns a pointerto the matching member in the array, or NULL when not found.This function sorts an array of n members using the quick sort algorithm. Theinitial base of the array is given by base. The size of each member is specifiedby size. The array is sorted in ascending order, according to the results of thefunction pointed to by cmp.Integer arithmeticint abs(j)long labs(j)long long llabs(j)div_t div(x,y)ldiv_t ldiv(x,y)lldiv_t lldiv(x,y)Compute the absolute value of an int, long int, and long long int jrespectively.Compute x/y and x%y in a single operation. X and y have respectively typeint, long int and long long int. The result is stored in the membersquot and rem of struct div_t, ldiv_t and lldiv_t which have thesame types.Multibyte/wide character and string conversionsmblen(*s,n)mbtowc(*pwc,*s,n)wctomb(*s,wc)Determines the number of bytes in the multi-byte character pointed to by s. Atmost n characters will be examined. (See also mbrlen in Section 13.2.28,wchar.h).Converts the multi-byte character in s to a wide-character code and stores itin pwc. At most n characters will be examined.Converts the wide-character wc into a multi-byte representation and stores itin the string pointed to by s. At most MB_CUR_MAX characters are stored.766

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

Saved successfully!

Ooh no, something went wrong!