home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume9 / elm2 / part01 / src / quit.c < prev    next >
C/C++ Source or Header  |  1987-03-08  |  577b  |  33 lines

  1. /**        quit.c        **/
  2.  
  3. /** quit: leave the current mailbox and quit the program.
  4.   
  5.     (C) Copyright 1985, Dave Taylor
  6. **/
  7.  
  8. #include "headers.h"
  9.  
  10. long bytes();
  11.  
  12. quit()
  13. {
  14.     /* a wonderfully short routine!! */
  15.  
  16.     if (leave_mbox(1) == -1)
  17.       return;            /* new mail!  (damn it)  resync */
  18.  
  19.     leave();
  20. }
  21.  
  22. resync()
  23. {
  24.     /** Resync on the current mailbox... This is simple: simply call
  25.        'newmbox' to read the file in again, set the size (to avoid
  26.         confusion in the main loop) and refresh the screen!
  27.     **/
  28.  
  29.       newmbox(1, TRUE, TRUE);
  30.       mailfile_size = bytes(infile);    
  31.       showscreen();
  32. }
  33.