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

  1.  
  2. /* (c)Copyright Sequiter Software Inc., 1987-1990.  All rights reserved.
  3.  
  4.    long d4locked()
  5. */
  6.  
  7. #include "d4base.h"
  8.  
  9. int  d4locked( long rec_code )
  10. {
  11.    BASE   *base_ptr ;
  12.  
  13.    base_ptr =  d4ptr() ;
  14.  
  15.    if ( base_ptr->file_lock > 0 )  return 1 ;
  16.  
  17.    if ( rec_code > 0 )
  18.    {
  19.       if ( rec_code == base_ptr->rec_lock )  return 1 ;
  20.       return 0 ;
  21.    }
  22.  
  23.    if ( rec_code == 0 )
  24.       if ( base_ptr->file_lock == 0)   return 1 ;
  25.  
  26.    return 0 ;
  27. }
  28.