home *** CD-ROM | disk | FTP | other *** search
-
- /* d4lock_all() (c)Copyright Sequiter Software Inc., 1987-1990. All rights reserved.
- */
-
- #include "d4all.h"
-
- extern INDEX *v4index ;
-
- int d4lock_all( int do_wait, int free_buffers )
- {
- int rc, index_on ;
-
- if ( ! d4locked(-1L))
- if ( d4unlock(-1L) < 0) return -1 ;
-
- if ( (rc = d4lock( -1L, do_wait)) < 0) return rc ;
-
- for ( index_on = d4ptr()->index_ref;
- index_on >= 0; index_on = v4index[index_on].prev )
- {
- if ( (rc = i4lock( index_on, do_wait)) < 0) return rc ;
- if ( free_buffers )
- if ( i4free( index_on) < 0) return -1 ;
- }
-
- return 0 ;
- }
-
-
-
-