#include #include #include "corlist.h" #define min(x,y) ((xMAX_LEN) { printf("ERROR in file %s: the string '%s' exceeds maximum length of %d characters.\n",Name,a,MAX_LEN); fclose(f); return -1; } if (w.lb>MAX_LEN) { printf("ERROR in file %s: the string '%s' exceeds maximum length of %d characters.\n",Name,b,MAX_LEN); fclose(f); return -1; } strcpy(w.a,a), strcpy(w.b,b); total++; List = (CorWeight*)realloc(List,total*sizeof(CorWeight)); List[total-1]=w; // printf("%s\t<->\t%s\t%1.2f\n",w.a,w.b,((float)w.w/PREC)); } } fclose(f); // printf("Total: %d\n\n",total); return(total); }