The problem was clearly outlined in the first post.
qsort() sorts array, arrays of structs, but it won't sort "anything". For example lists. Instead of trying to fudge this problem I implemented my own sorting algorithm in place. The algorithm does some other things too.
Yes there is nothing wrong with bubble sort!