Here is the code SORRY :P
Code:
char *leer(char *line,FILE *fp){
char *aux;
int length,i;
char *r;
aux = calloc(longitud,sizeof(char));
r=fgets(aux,longitud,fp);
if(r!=NULL){
strcpy(line,aux);
largo=longitud;
while (strrchr(aux,10)==NULL){
r=fgets(aux,longitud,fp);
if (r==NULL)
break;
largo = largo+longitud;
realloc(linea,largo*sizeof(char));
strcat(linea,aux);
}
}
free(aux);
return r
}
the variable 'longitud' is a globlal variable that is use to determine the minimum size of reading buffer. If there's something you don't understand ask for it.