home *** CD-ROM | disk | FTP | other *** search
-
- /* h4first.c (c)Copyright Sequiter Software Inc., 1987-1990. All rights reserved. */
-
- #include "d4all.h"
- #include "h4memory.h"
-
- int h4first( char **ptr_ptr, int ref )
- {
- MEMORY *memory ;
- UNIT *ref_ptr ;
-
- memory = (MEMORY *) (*ptr_ptr -sizeof(MEMORY)) ;
-
- if ( ref < 0 ) return -1 ;
-
- for(;;)
- {
- ref_ptr = (UNIT *) (*ptr_ptr + memory->len_unit* ref) ;
- if ( ref_ptr->prev < 0 ) return ref ;
-
- ref = ref_ptr->prev ;
- }
- }
-
-