Changeset 5398:1bdb7a7c3c8f for buffy.c

Show
Ignore:
Timestamp:
2008-05-21 11:36:33 (6 months ago)
Author:
Rocco Rutte <pdmef@…>
Branch:
HEAD
Message:

Fix new mail detection for >2 GB mboxes with $check_mbox_size set

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • buffy.c

    r5011 r5398  
    4949 * upon success return 0. If no message found - return -1 */ 
    5050 
    51 int fseek_last_message (FILE * f) 
     51static int fseek_last_message (FILE * f) 
    5252{ 
    5353  LOFF_T pos; 
     
    9595 
    9696/* Return 1 if the last message is new */ 
    97 int test_last_status_new (FILE * f) 
     97static int test_last_status_new (FILE * f) 
    9898{ 
    9999  HEADER *hdr; 
     
    115115} 
    116116 
    117 int test_new_folder (const char *path) 
     117static int test_new_folder (const char *path) 
    118118{ 
    119119  FILE *f; 
     
    161161 
    162162  if (stat (b->path, &sb) == 0) 
    163     b->size = (long) sb.st_size; 
     163    b->size = (off_t) sb.st_size; 
    164164  else 
    165165    b->size = 0; 
     
    236236    { 
    237237      /* some systems out there don't have an off_t type */ 
    238       (*tmp)->size = (long) sb.st_size; 
     238      (*tmp)->size = (off_t) sb.st_size; 
    239239    } 
    240240    else 
     
    359359        { 
    360360          /* some other program has deleted mail from the folder */ 
    361           tmp->size = (long) sb.st_size; 
     361          tmp->size = (off_t) sb.st_size; 
    362362        } 
    363363        if (tmp->newly_created && 
     
    397397    } 
    398398    else if (option(OPTCHECKMBOXSIZE) && Context && Context->path) 
    399       tmp->size = (long) sb.st_size;    /* update the size */ 
     399      tmp->size = (off_t) sb.st_size;   /* update the size of current folder */ 
    400400 
    401401    if (!tmp->new)