/* PSPP - a program for statistical analysis.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
-#include <output/table.h>
-#include <output/table-provider.h>
+#include "output/table.h"
+#include "output/table-provider.h"
#include <assert.h>
#include <stdlib.h>
-#include <libpspp/cast.h>
-#include <libpspp/compiler.h>
+#include "libpspp/cast.h"
+#include "libpspp/compiler.h"
#include "gl/xalloc.h"
{
assert (table->ref_cnt > 0);
if (--table->ref_cnt == 0)
- table->class->destroy (table);
+ table->klass->destroy (table);
}
}
void
table_init (struct table *table, const struct table_class *class)
{
- table->class = class;
+ table->klass = class;
table->n[TABLE_HORZ] = table->n[TABLE_VERT] = 0;
table->h[TABLE_HORZ][0] = table->h[TABLE_HORZ][1] = 0;
table->h[TABLE_VERT][0] = table->h[TABLE_VERT][1] = 0;
{
assert (x >= 0 && x < table->n[TABLE_HORZ]);
assert (y >= 0 && y < table->n[TABLE_VERT]);
- table->class->get_cell (table, x, y, cell);
+ table->klass->get_cell (table, x, y, cell);
}
/* Frees CELL, which should have been initialized by calling
{
assert (x >= 0 && x < table->n[TABLE_HORZ] + (axis == TABLE_HORZ));
assert (y >= 0 && y < table->n[TABLE_VERT] + (axis == TABLE_VERT));
- return table->class->get_rule (table, axis, x, y);
+ return table->klass->get_rule (table, axis, x, y);
}
\f
struct table_unshared
static struct table_unshared *
table_unshared_cast (const struct table *table)
{
- assert (table->class == &table_unshared_class);
+ assert (table->klass == &table_unshared_class);
return UP_CAST (table, struct table_unshared, table);
}
static struct table_string *
table_string_cast (const struct table *table)
{
- assert (table->class == &table_string_class);
+ assert (table->klass == &table_string_class);
return UP_CAST (table, struct table_string, table);
}