home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c160 / 1.ddi / SOURCE / F4CHAR.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-22  |  647 b   |  31 lines

  1. /* (c)Copyright Sequiter Software Inc., 1987-1990.  All rights reserved.
  2.  
  3.    f4char.c
  4. */
  5.  
  6. #include "p4misc.h"
  7. #include "d4base.h"
  8.  
  9. #include <string.h>
  10.  
  11. extern int  v4cur_base ;
  12. extern BASE *v4base ;
  13.  
  14. int  f4char( long f_ref )
  15. {
  16.    /* Return the first character of the record buffer. */
  17.    return( *f4ptr(f_ref) ) ;
  18. }
  19.  
  20. void f4r_char( long f_ref, char chr )
  21. {
  22.    char *ptr ;
  23.  
  24.    /* Blank the record buffer and then insert the first character. */
  25.    ptr =  f4ptr(f_ref) ;
  26.    memset( ptr, (int) ' ', (size_t) f4width(f_ref) ) ;
  27.    *ptr =  chr ;
  28.  
  29.    if ( v4base[v4cur_base].eof == 0 )     d4ptr()->buffer_changed =  1 ;
  30. }
  31.