
#import "ExtList.h"
#import <stdlib.h>

@implementation ExtList

- sortUsingFunc:(SortFunc *)func
{
	qsort(dataPtr,[self count],sizeof(id),func);
	return self;
}

- (int)insertOrdered:object usingFunc:(SortFunc *)func
{
	int		count = [self count];
	int		ind;
	id		ob2;

	for (ind=0; ind<count && (ob2=[self objectAt:ind]) &&
		func(&object,&ob2)>0; ind++);
	[self insertObject:object at:ind];

	return ind;
}
