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−34PCP Reference ManualEnvironment communicationabort()atexit(*func)exit(status)_Exit(status)Causes abnormal program termination. If thesignal SIGABRTis caught, the signal handler maytake over control. (See section 2.2.14, signal.h).Func points to a function that is called (withoutarguments) when the program normallyterminates.Causes normal program termination. Acts as ifmain() returns with status as the return value.Status can also be specified with the predefinedmacros EXIT_SUCCES or EXIT_FAILURE.Same as exit, but not registered by the atexitfunction or signal handlers registerd by thesignal function are called.getenv(*s) Searches an environment list for a string s.Returns a pointer to the contents of s.NOTE: this function is not implemented becausethere is no OS.system(*s)Passes the string s to the environment forexecution.NOTE: this function is not implemented becausethere is no OS.Searching and sortingLIBRARIESbsearch(*key,*base,n,size,*cmp)qsort(*base,n,size,*cmp)This function searches in an array of n members,for the object pointed to by key. The initial base ofthe array is given by base. The size of eachmember is specified by size. The given array mustbe sorted in ascending order, according to theresults of the function pointed to by cmp. Returnsa pointer to the matching member in the array, orNULL when not found.This function sorts an array of n members usingthe quick sort algorithm. The initial base of thearray is given by base. The size of each memberis specified by size. The array is sorted inascending order, according to the results of thefunction pointed to by cmp.

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

Saved successfully!

Ooh no, something went wrong!