Changeset 4439:0383a03ba8ae for buffy.c

Show
Ignore:
Timestamp:
2005-10-20 21:35:37 (3 years ago)
Author:
Brendan Cully <brendan@…>
Branch:
HEAD
Message:

Full large file support. Keep a close watch on your mailboxes everyone!

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • buffy.c

    r4343 r4439  
    5353int fseek_last_message (FILE * f) 
    5454{ 
    55   long int pos; 
     55  LOFF_T pos; 
    5656  char buffer[BUFSIZ + 9];      /* 7 for "\n\nFrom " */ 
    5757  int bytes_read; 
     
    6060  memset (buffer, 0, sizeof(buffer)); 
    6161  fseek (f, 0, SEEK_END); 
    62   pos = ftell (f); 
     62  pos = ftello (f); 
    6363 
    6464  /* Set `bytes_read' to the size of the last, probably partial, buffer; 0 < 
     
    7373    /* we save in the buffer at the end the first 7 chars from the last read */ 
    7474    strncpy (buffer + BUFSIZ, buffer, 5+2); /* 2 == 2 * mutt_strlen(CRLF) */ 
    75     fseek (f, pos, SEEK_SET); 
     75    fseeko (f, pos, SEEK_SET); 
    7676    bytes_read = fread (buffer, sizeof (char), bytes_read, f); 
    7777    if (bytes_read == -1) 
     
    8080      if (!mutt_strncmp (buffer + i, "\n\nFrom ", mutt_strlen ("\n\nFrom "))) 
    8181      {                         /* 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); 
    8383        return 0; 
    8484      }