pike.git / lib / modules / ADT.pmod / Table.pmod

version» Context lines:

pike.git/lib/modules/ADT.pmod/Table.pmod:1:   // Table.pmod by Fredrik Noring, 1998 - // $Id: Table.pmod,v 1.9 1998/06/26 16:43:34 noring Exp $ + // $Id: Table.pmod,v 1.10 1999/11/25 00:55:54 hubbe Exp $      #define TABLE_ERR(msg) throw(({ "(Table) "+msg+"\n", backtrace() }))      class table {    static private mapping fieldmap;    static private array table, fields, types;       static private array|int remap(array|string|int cs, int|void forgive)    {    array v = ({});
pike.git/lib/modules/ADT.pmod/Table.pmod:193:    object sum(int|string ... cs)    {    return group(`+, cs);    }       object distinct(int|string ... cs)    {    if(!sizeof(cs))    return sum();    array f = remap(fields) - remap(cs); -  mapping m = mkmapping(f, Array.map(f, lambda() +  mapping m = mkmapping(f, Array.map(f, lambda(mixed unused)    { return lambda(mixed x1,    mixed x2)    { return x1; }; }));    return group(m);    }       object map(function f, array(int|string)|int|string cs, mixed ... args)    {    int ap = arrayp(cs);    array t = copy_value(table);