/*========================== CONVERSION.C ===========================*/ #include int readfile(); /* test file is testcon.prn */ FILE *inputfileptr; FILE *outputfileptr; int i,N,P,M,q; int *msitc,*dsic; int **msic; float *ddata,*dfinal; float **dmatrix; char inputfilename[81]; char outputfilename[81]; /*================================ main ==============================*/; void main() { int j; int *lengthsic; float sum,den; /* ============================ credits ========================= */ printf("\n"); printf("\n"); printf(" Welcome to the SIC --> SITC Conversion Program\n"); printf("\n"); printf(" Software (c) Christos Kostopoulos\n"); printf("\n"); printf(" SIC to SITC Conversion Matrix \n"); printf(" (c) Christopher K. Clague and Pam Lowry\n"); printf("\n"); printf(" University of Maryland at College Park\n"); printf("\n"); printf(" July 1991\n"); printf("\n"); printf("\n"); printf("\n"); /* ========================== input data ======================== */ /* ------------------------- read masterfile -------------------- */ printf("Enter Drive and Name of Master Conversion Table [i.e. a:convert.prn]:\n"); printf("\n"); printf("\n"); scanf("%s",inputfilename); /* convert.prn */ if( (inputfileptr=fopen(inputfilename,"r"))==NULL ) { printf( "Unable to open %s. I quit.\n", inputfilename); exit(1); } /* N: length of msitc,msic */ fscanf(inputfileptr,"%d %d",&N,&P); /* P: width of msic only */ msitc = (int *)malloc((unsigned)N*sizeof(int)); msic = (int **)malloc((unsigned)N*sizeof(int *)); for (i=0;i