Annotation of researchv9/jerq/sgs/libld/ldrseek.c, revision 1.1

1.1     ! root        1: #include       <stdio.h>
        !             2: #include       "filehdr.h"
        !             3: #include       "scnhdr.h"
        !             4: #include       "ldfcn.h"
        !             5: 
        !             6: int
        !             7: ldrseek(ldptr, sectnum)
        !             8: 
        !             9: LDFILE         *ldptr;
        !            10: unsigned short sectnum; 
        !            11: 
        !            12: {
        !            13:        extern  int     ldshread( );
        !            14:        extern  int     fseek( );
        !            15: 
        !            16:        SCNHDR  shdr;
        !            17: 
        !            18:        if (ldshread(ldptr, sectnum, &shdr) == SUCCESS) {
        !            19:                if (shdr.s_nreloc != 0) {
        !            20:                    if (FSEEK(ldptr, shdr.s_relptr, BEGINNING) == OKFSEEK) {
        !            21:                            return(SUCCESS);
        !            22:                    }
        !            23:                }
        !            24:        }
        !            25: 
        !            26:        return(FAILURE);
        !            27: }
        !            28: 
        !            29: static char ID[ ] = "@(#) ldrseek.c: 1.1 1/7/82";

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.