Here is the problem that I am having:
What I have is a bunch of files that have one line of data in them. What I do is I read the data from the file and fputs it into another file that I collect all the data in.
Here is where the problem comes up. Sometimes the data files have very little data in them and when that happens the fputs put the next files dta in that same line. I used the fputs because it is supposed to put in the CRLF after the string you use but it seems that it doesn't.
It could be my code so here is the code that I am using:
if fopen 0 tempstr READ
fseek 0 0 0 ; Put pointer at end of file.
fread 0 Tempstring 255 Len
fclose 0
if fopen 0 file_name WRITE ; Open file for write only.
statmsg "file %s is open", file_name
fseek 0 0 2; Put pointer at end of file.
fputs 0 tempstring
fclose 0 ; Close the file.
endif
endif
let me know if you see anything wrong.
Thanks a lot!!!
To go where no programmer has gone before.
What I have is a bunch of files that have one line of data in them. What I do is I read the data from the file and fputs it into another file that I collect all the data in.
Here is where the problem comes up. Sometimes the data files have very little data in them and when that happens the fputs put the next files dta in that same line. I used the fputs because it is supposed to put in the CRLF after the string you use but it seems that it doesn't.
It could be my code so here is the code that I am using:
if fopen 0 tempstr READ
fseek 0 0 0 ; Put pointer at end of file.
fread 0 Tempstring 255 Len
fclose 0
if fopen 0 file_name WRITE ; Open file for write only.
statmsg "file %s is open", file_name
fseek 0 0 2; Put pointer at end of file.
fputs 0 tempstring
fclose 0 ; Close the file.
endif
endif
let me know if you see anything wrong.
Thanks a lot!!!
To go where no programmer has gone before.