Hi, qsort would be in stdlib.h but it's not there. Often qsort is implemented as a recursive function but that's no good idea on an microcontroller with few RAM and without a MMU.
The standard says (7.20.5.2) that qsort can be any sorting function, so you can take e. g. weak heapsort (recursive) or shellsort. If possible you should use bucketsort or radixsort. Regards, Rolf mspgcc-users@lists.sourceforge.net schrieb am 02.08.05 01:46:08: > > Hello all: > > The mspgcc manual (http://mspgcc.sourceforge.net/manual/x1109.html) says > that qsort() is included in the MSP430 standard library, but it doesn't > seem to be there... > > This function is not defined in the include files, 'nm' doesn't show it in > my compiled msp430/lib/libc.a. The source code obtained from CVS an > implementation appears to be present in msp430-libc/src/stdlib/qsort.c. > > Is there a way to enable this in the library? I searched in many places > and was unable to find any useful information. If not, I am also > interested in 3rd party libraries implementing sorting functions > (quicksort or other), preferably in the same interface as qsort(). > > Thanks in advance. > /dima > > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Mspgcc-users mailing list > Mspgcc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mspgcc-users