Handling CRLF, CR and LF when reading a txt file
I have a portion of C-code as below which is complied in linux gcc environment.
In my project I have to handle ALL CRLF, CR and LF when reading a txt file created from different OS.
I'm not sure if fscanf() handles all cases automatically.
Is there any other way that can handle all cases?
while (fscanf(fp, "%d", &data) != EOF)
{
printf("%d\n", data);
}