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

  1.  
  2. /*  (c)Copyright Sequiter Software Inc., 1987-1990.  All rights reserved.
  3.  
  4.     d4go.c
  5. */
  6.  
  7.  
  8. #include "d4all.h"
  9. #include "u4error.h"
  10.  
  11. extern BASE *v4base ;
  12. extern int   v4cur_base ;
  13.  
  14.  
  15. int d4go( long rec_num )
  16. {
  17.    BASE *base_ptr ;
  18.  
  19.    if ( v4cur_base < 0 )
  20.    {
  21.       u4error( E_D_MISSING, (char *) 0 ) ;
  22.       return( -1 ) ;
  23.    }
  24.  
  25.    if ( rec_num <= 0L )  
  26.    {
  27.       d4blank() ;
  28.       return(1) ;
  29.    }
  30.    base_ptr =  v4base + v4cur_base ;
  31.  
  32.    #ifndef SMALL
  33.       if ( d4changed(base_ptr) < 0 )  return -1 ;
  34.    #endif
  35.  
  36.    v4base[v4cur_base].eof =  v4base[v4cur_base].bof =  0 ;
  37.  
  38.    return ( d4read( rec_num) ) ;
  39. }
  40.