S
S!mb@
Hi all,
I'm currently developping a tool to convert texts files between linux,
windows and mac.
the end of a line is coded by 2 characters in windows, and only one in
unix & mac. So I have to delete a character at each end of a line.
car = fgetc(myFile);
while (car != EOF) {
if (car == 13) {
car2 = fgetc(myFile) ;
if (car2 == 10) {
// fseek of 2 characters
// delete a caracter
// overwrite the second caracter
}
}
}
how can I do that ? is there a function that I can use ? I can't find
one in stdio.h
thx in advance,
Jerem.
I'm currently developping a tool to convert texts files between linux,
windows and mac.
the end of a line is coded by 2 characters in windows, and only one in
unix & mac. So I have to delete a character at each end of a line.
car = fgetc(myFile);
while (car != EOF) {
if (car == 13) {
car2 = fgetc(myFile) ;
if (car2 == 10) {
// fseek of 2 characters
// delete a caracter
// overwrite the second caracter
}
}
}
how can I do that ? is there a function that I can use ? I can't find
one in stdio.h
thx in advance,
Jerem.