2009-02-07 22:04:35 -05:00
|
|
|
#include <stdio.h>
|
|
|
|
#include "table.h"
|
|
|
|
|
|
|
|
void print_table() {
|
2014-06-15 13:07:02 -04:00
|
|
|
int r, c;
|
|
|
|
printf("printing table...\n");
|
|
|
|
for (c = 0; c < table_dims.x; c++)
|
|
|
|
for (r = 0; r < table_dims.y; r++)
|
|
|
|
printf("table[%d][%d] = %p\n", c, r, table[c][r]);
|
|
|
|
printf("done\n");
|
2009-02-07 22:04:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
int main() {
|
2014-06-15 13:07:02 -04:00
|
|
|
printf("table.c tests\n");
|
|
|
|
printf("table_dimensions = %d, %d\n", table_dims.x, table_dims.y);
|
|
|
|
init_table();
|
|
|
|
printf("table_dimensions = %d, %d\n", table_dims.x, table_dims.y);
|
|
|
|
print_table();
|
2009-02-07 22:04:35 -05:00
|
|
|
|
2014-06-15 13:07:02 -04:00
|
|
|
printf("expand_table_cols()\n");
|
|
|
|
expand_table_cols();
|
|
|
|
printf("table_dimensions = %d, %d\n", table_dims.x, table_dims.y);
|
|
|
|
print_table();
|
2009-02-07 22:04:35 -05:00
|
|
|
|
2014-06-15 13:07:02 -04:00
|
|
|
printf("expand_table_rows()\n");
|
|
|
|
expand_table_rows();
|
|
|
|
printf("table_dimensions = %d, %d\n", table_dims.x, table_dims.y);
|
|
|
|
print_table();
|
2009-02-07 22:04:35 -05:00
|
|
|
}
|