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

  1. /*
  2.     sdpushlt.c
  3.  
  4.     % sed_PushLeft
  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 edge character.  This will have to be 
  13.                     changed when "string too short" is fixed. 
  14.     11/16/86 sng    Now handles variable-length fields.
  15.     11/18/87 jmd     changed names of some low-level funcs
  16.      5/11/88 jmd     moved work to field_PushLeft
  17.  
  18.      3/24/89 jmd    added sed_ macros
  19.  
  20.      3/28/90 jmd    ansi-fied
  21. */
  22.  
  23. #include "sed.h"
  24. #include "fldpriv.h"
  25.  
  26. char sed_PushLeft(sed_type sed, int scancode)
  27. /*
  28.     modifies:   the sed.
  29.     effects:    inserts the scancode at the current position, pushes the
  30.                    characters to the left:
  31.                 |x  hell mom|
  32.                        ^
  33.                 |  hello mom|      ---> return('x');
  34.                        ^ 
  35.     returns:    the character that falls off the edge.  If nothing falls off
  36.                  the edge, return '\0'.
  37. */
  38. {
  39.     char edge_char;
  40.  
  41.     cs_Assert(sed_Ok(sed), CS_SD_PSHL_SED, 0);
  42.  
  43.     edge_char = menu_PushLeft(sed_GetMenu(sed), sed_GetFieldNo(sed), sed_GetRecordPos(sed), (char) scancode);
  44.     sd_refresh_field(sed, sed_GetFieldNo(sed));
  45.  
  46.     return(edge_char);
  47. }
  48.  
  49.