home *** CD-ROM | disk | FTP | other *** search
/ ftp.update.uu.se / ftp.update.uu.se.2014.03.zip / ftp.update.uu.se / pub / rainbow / cpm / emacs / emacssrc.lzh / killreg.c < prev    next >
C/C++ Source or Header  |  1992-03-11  |  595b  |  25 lines

  1. #include    "stdio.h"
  2. #include    "ed.h"
  3.  
  4. /*
  5.  * Kill the region. Ask "getregion"
  6.  * to figure out the bounds of the region.
  7.  * Move "." to the start, and kill the characters.
  8.  * Bound to "C-W".
  9.  */
  10. ovmain(x, f, n)
  11. {
  12.     register int    s;
  13.     REGION        region;
  14.  
  15.     if ((s=getregion(®ion)) != TRUE)
  16.         return (s);
  17.     if ((lastflag&CFKILL) == 0)        /* This is a kill type    */
  18.         kdelete();            /* command, so do magic    */
  19.     thisflag |= CFKILL;            /* kill buffer stuff.    */
  20.     curwp->w_dotp = region.r_linep;
  21.     curwp->w_doto = region.r_offset;
  22.     return (ldelete(region.r_size, TRUE));
  23. }
  24. #include "getreg.c"
  25.