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

  1.  
  2. /* d4select.c   (c)Copyright Sequiter Software Inc., 1987-1990.  All rights reserved.
  3.  
  4.    Selects an database file for active use.
  5. */
  6.  
  7. #include "d4base.h"
  8. #include "u4error.h"
  9.  
  10. extern  int    v4cur_base ;
  11. extern  int    v4last_base ;
  12. extern  BASE  *v4base ;
  13.  
  14.  
  15. d4select( int base_ref )
  16. {
  17.    int on_base, previous_ref ;
  18.  
  19.    previous_ref =  v4cur_base ;
  20.  
  21.    on_base =  v4last_base ;
  22.    while ( on_base >= 0)
  23.    {
  24.       if ( on_base == base_ref )
  25.       {
  26.      v4cur_base =  base_ref ;
  27.      break ;
  28.       }
  29.       on_base =  v4base[on_base].prev ;
  30.    }
  31.  
  32.    return( previous_ref ) ;
  33. }
  34.  
  35.  
  36.