Beispiel #1
0
int partB(int k)
{
    int l = 101;
    kprintf("In b, local var l is at 0x%x\r\n",  (unsigned int) &l);
    kprintf("In b, param k is at 0x%x\r\n", (unsigned int) &k);
    return partC(l);
}
void string_sorter::sortC(int left, int right) {
	//This is the recursive part of the quicksort
	//for the C list

	int pos;
	timeb time_ms;
	unsigned int timestart, timeend;

	//Starts the timer
	ftime(&time_ms);
	timestart = time_ms.millitm + (time_ms.time & 0xfffff) * 1000;

	//Recursive case for quicksort
	if (left < right) {

		pos = partC(left, right);
		sortC(left, pos - 1);
		sortC(pos + 1, right);
	}
	//Base case for quicksort
	else
		;

	//Ends the timer and records the difference
	ftime(&time_ms);
	timeend = time_ms.millitm + (time_ms.time & 0xfffff) * 1000;
	ctimediff = timeend - timestart;

}