home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / emacs / src / filesave.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-07  |  768 b   |  26 lines

  1. #include    "stdio.h"
  2. #include    "ed.h"
  3. extern int ovreq, ovreq2, ovsub, ovsub2;
  4. /*
  5.  * Save the contents of the current
  6.  * buffer in its associated file. No nothing
  7.  * if nothing has changed (this may be a bug, not a
  8.  * feature). Error if there is no remembered file
  9.  * name for the buffer. Bound to "C-X C-S". May
  10.  * get called by "C-Z".
  11.  */
  12. ovmain( x, f, n )
  13. {
  14.     register int    s;
  15.  
  16.     if ((curbp->b_flag&BFCHG) == 0)        /* Return, no changes.    */
  17.         return (TRUE);
  18.     if (curbp->b_fname[0] == 0)
  19.     {    /* Must have a name.    */
  20.         mlwrite("No file name");
  21.         return (FALSE);
  22.     }
  23.     return ( writeout( curbp->b_fname ));
  24. }
  25. #include "writeout.c"
  26.