Output Tables to a Text File

I usually work in C#, and I have some C code that I'm using in Visual Studio that's part of a DLL. The C code was written by someone else and there's something wrong with it that is preventing my code from working properly. So I was asked to find a way to output some of the C tables to a text file in order to do some comparisons. I, unfortunately, have little idea of where to start. Here's the majority of the C code that I believe is relevant in order for someone to be able to help me out.

/* Private Variables*/
static signed char *p_gfinit;
static int *p_gfpwr;
static int *p_gflog;
static int gf_number;
static int gf_gen;

static signed char bz10_gfinit = 0;
static int bz10_gfpwr[BZ10_GF_NUMBER];
static int bz10_gflog[BZ10_GF_NUMBER];

static signed char bz12_gfinit = 0;
static int bz12_gfpwr[BZ12_GF_NUMBER];
static int bz12_gflog[BZ12_GF_NUMBER];

/* Private Function Prototypes*/
static void init_tables(void);

void ec_configuration(int id)
{
switch(id)
{
case EC_ID_BZ10:
qr_style = 0;
p_gfinit = &bz10_gfinit;
p_gfpwr = bz10_gfpwr;
p_gflog = bz10_gflog;
gf_number = BZ10_GF_NUMBER;
gf_gen = DONGLE_DERIVED_CONSTANT(BZ10_GEN, 314673582, 30207850);
break;

case EC_ID_BZ12:
qr_style = 0;
p_gfinit = &bz12_gfinit;
p_gfpwr = bz12_gfpwr;
p_gflog = bz12_gflog;
gf_number = BZ12_GF_NUMBER;
gf_gen = DONGLE_DERIVED_CONSTANT(BZ12_GEN, 576941215, 401135158);
break;
}
}

void ec_power_up_init(void)
{
ec_configuration(EC_ID_BZ4);
init_tables();

ec_configuration(EC_ID_BZ6);
init_tables();

ec_configuration(EC_ID_BZ8);
init_tables();

ec_configuration(EC_ID_BZ10);
init_tables();

ec_configuration(EC_ID_BZ12);
init_tables();
}

static void init_tables(void)
{
int i, j;

if (*p_gfinit)
return;

*p_gfinit = 1;

i = 1;
for (j = 0; j < gf_number - 1; j++)
{
p_gfpwr[j] = i;
p_gflog[i] = j;
i <<= 1;
if (i >= gf_number)
i ^= gf_number + gf_gen;
}
p_gfpwr[gf_number - 1] = p_gfpwr[0];
return;
}
If any more code is needed, then I'll post more, but I think I copied the best sections. The tables I need outputted to a text file are those in the funtion: ec_power_up_init(void). I need help with where to put the code and what the C code is in order to get the text file(s). Help is REALLY appreciated. Thanks!
[2817 byte] By [slowcoder] at [2007-11-20 1:09:54]