home *** CD-ROM | disk | FTP | other *** search
-
- /* (c)Copyright Sequiter Software Inc., 1987-1990. All rights reserved.
-
- f4ptr.c
- */
-
- #include "d4base.h"
-
- extern BASE *v4base ;
-
- /* f4ptr
-
- Returns a pointer to the corresponding field
- */
-
- char * f4ptr( long field_ref)
- {
- BASE *base_ptr ;
- int f_num, b_ref ;
-
- b_ref = (int) (field_ref>>16) ;
- if (b_ref < 0 ) return( (char *) 0 ) ;
-
- base_ptr = v4base + b_ref ;
- f_num = (int) (field_ref & 0xFFFF) ;
-
- if ( f_num >= base_ptr->num_fields || f_num < 0)
- return( (char *) 0 ) ;
-
- return( base_ptr->buffer + base_ptr->fields[f_num].offset ) ;
- }
-
-