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: $ + // $Id: Table.pmod,v 1.3 1998/03/25 16:59:16 noring 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:103:    {    if(sizeof(t) != sizeof(table))    TABLE_ERR("Table sizes are not equal.");    fields += indices(t);    array v = values(t);    for(int r = 0; r < sizeof(table); r++)    table[r] = table[r] + v[r];    return this_object();    }    -  mixed op_col(function f, int|string c, mixed ... args) +  static private mixed op_col(function f, int|string c, mixed ... args)    {    c = remap(c);    mixed x = table[0][c];    for(int r = 1; r < sizeof(table); r++)    f(x, table[r][c], @args);    return x;    }       mixed sum_col(int|string c)    {