Branch: Tag:

2007-11-11

2007-11-11 14:25:11 by Martin Nilsson <mani@lysator.liu.se>

Backported fix for sorting number columns.

Rev: lib/modules/ADT.pmod/Table.pmod:1.28

1:   // Table.pmod by Fredrik Noring, 1998 - // $Id: Table.pmod,v 1.27 2004/01/11 00:38:16 nilsson Exp $ + // $Id: Table.pmod,v 1.28 2007/11/11 14:25:11 nilsson Exp $      #pike __REAL_VERSION__   #define TABLE_ERR(msg) error("(Table) "+msg+"\n")
298:    m[d] += ({ t[r] });    }    array i = indices(m), v = values(m); +  if(types[c] && types[c]->type=="num") +  i = (array(float))i;    predef::sort(i, v);    t = (is_reversed ? predef::reverse(v) : v)*({});    }