home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / Samples / CSAPE32.ARJ / SOURCE / CSSRC / SDPULLRT.C < prev    next >
C/C++ Source or Header  |  1990-03-28  |  1KB  |  51 lines

  1. /*
  2.     sdpulllt.c
  3.  
  4.     % sed_PullRight
  5.  
  6.     C-scape 3.2
  7.     Copyright (c) 1986, 1987, by Oakland Group, Inc.
  8.     ALL RIGHTS RESERVED.
  9.  
  10.     Revision History:
  11.     -----------------
  12.     11/06/86 jmd    Now returns the deleted character.
  13.     11/14/86 sng    Now handles variable-length fields.
  14.     11/18/87 jmd     changed names of some low-level funcs
  15.      5/11/88 jmd     moved work to field_PullRight
  16.  
  17.      3/24/89 jmd    added sed_ macros
  18.  
  19.      3/28/90 jmd    ansi-fied
  20. */                    
  21.  
  22. #include "sed.h"
  23. #include "fldpriv.h"
  24.  
  25. char sed_PullRight(sed_type sed)
  26. /*
  27.     modifies:   the sed.
  28.     effects:    deletes the current character, pulls in the characters to the
  29.                 right:
  30.                 |heello mom   |
  31.                    ^ 
  32.                 |hello mom    |
  33.                    ^
  34.     returns:    the deleted character.  If the cursor is over empty area,
  35.                  return '\0'.
  36. */
  37. {
  38.     char del_char;
  39.  
  40.     cs_Assert(sed_Ok(sed), CS_SD_PULR_SED, 0);
  41.  
  42.     /* Remember the deleted character. */
  43.     del_char = menu_PullRight(sed_GetMenu(sed), sed_GetFieldNo(sed), sed_GetRecordPos(sed));
  44.  
  45.     if (del_char != '\0') {
  46.         sd_refresh_field(sed, sed_GetFieldNo(sed));
  47.     }
  48.  
  49.     return(del_char);
  50. }
  51.