Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int seek_to_start_of_line(FILE *file) {
- int neg_count = 0;
- while(1) {
- char c = fgetc(file);
- if(c == EOF) {
- return;
- }
- if(c == (char) -1 ){ //'ΓΏ') {
- neg_count++;
- continue;
- }
- if(c == '\n') {
- if(neg_count == 4) {
- return;
- } else {
- neg_count = 0;
- }
- } else {
- neg_count = 0;
- }
- }
- }
Add Comment
Please, Sign In to add comment