pgm 17.2, sort inventory array with qsort