Changeset 4439:0383a03ba8ae for buffy.c
Legend:
- Unmodified
- Added
- Removed
-
buffy.c
r4343 r4439 53 53 int fseek_last_message (FILE * f) 54 54 { 55 long intpos;55 LOFF_T pos; 56 56 char buffer[BUFSIZ + 9]; /* 7 for "\n\nFrom " */ 57 57 int bytes_read; … … 60 60 memset (buffer, 0, sizeof(buffer)); 61 61 fseek (f, 0, SEEK_END); 62 pos = ftell (f);62 pos = ftello (f); 63 63 64 64 /* Set `bytes_read' to the size of the last, probably partial, buffer; 0 < … … 73 73 /* we save in the buffer at the end the first 7 chars from the last read */ 74 74 strncpy (buffer + BUFSIZ, buffer, 5+2); /* 2 == 2 * mutt_strlen(CRLF) */ 75 fseek (f, pos, SEEK_SET);75 fseeko (f, pos, SEEK_SET); 76 76 bytes_read = fread (buffer, sizeof (char), bytes_read, f); 77 77 if (bytes_read == -1) … … 80 80 if (!mutt_strncmp (buffer + i, "\n\nFrom ", mutt_strlen ("\n\nFrom "))) 81 81 { /* found it - go to the beginning of the From */ 82 fseek (f, pos + i + 2, SEEK_SET);82 fseeko (f, pos + i + 2, SEEK_SET); 83 83 return 0; 84 84 }
