#include <stdio.h>


void dumpInt(int i, char *filename) {
   FILE *fout = fopen(filename, "a");
   fprintf(fout, "%x\n", i);
   fclose(fout);
}
void dumpStr(char* str, char *filename) {
   FILE *fout = fopen(filename, "w");
   fprintf(fout, "%s\n", str);
   fclose(fout);
}
void dumpArray(double *re, double *im, int length, char *filename) {
   FILE *fout = fopen(filename, "w");
   int i;
   for (i=0; i<length; ++i) {
     fprintf(fout, "%6d) Re: %g  Im: %g\n", i, re[i], im[i]);
   }
   fclose(fout);
}
