Hello community,

i try to use the CombSort to sort a array of pointers to nullterminated strings. This array of pointers are simply on the stack and the number of members is known.. So These strings are unsorted alphabetically, and contain dubble entries So i invoke CombSort with the first pointer's address on the stack and thell him also the length of this array.

Al looks well but when i hit F8 my stack is totally mest up and no piece of ordering. I know that i'm doing something wrong my self, but what?

So anyone better with stacks or knows what's going on...

:eek: speek to the reply :tongue:
Posted on 2002-05-28 03:00:18 by eisodur
Could try quick sort routine.
; say you just created 256 string pointers on the stack:
mov eax,esp
invoke QuickSort, eax, 0, 255
; now they are sorted :)

Sorry, haven't really played with the CombSort routines.
Posted on 2002-05-28 03:36:43 by bitRAKE

for this FINE FINE fine routine, now my stack isn't mest up after this function call. ACTUALLY IT LOOKS PRETTY ****ING GOOD!!!!!!!! IT WORKS


if you want to try out what i'm doing download the attachment:

- the prog lets you pick a datadirectory, where you have to put some text/html files in. It will find all filesin all subdirectories and store this file next to your choosen datadir.
- next it parse's all strings from all files.

If you hit your breakpoint at the QuickSort call you can see the stack of every file with the pointers to nullterminated strings, after that the stack will be deleted for simplicity and the next file will be parsed.
Posted on 2002-05-28 04:16:57 by eisodur
eisodur, your welcome - it is nice knowing the code works. Even though I pour over the code for hours trying to find bugs and work through the algo flow, you just never know until it is being used by many others.
Posted on 2002-05-28 08:46:29 by bitRAKE
Het crasht als de ziekte op mijn Windows XP, eisodur :)

If you need more info about the problem just PM me, or you can just ignore it if you don't care about XP :)
Posted on 2002-05-28 09:14:56 by Qweerdy
heheh... dun support win xp... i just dun like windows xp
Posted on 2002-05-28 09:41:30 by roticv