Annotation of researchv9/jerq/sgs/libld/ldshread.c, revision 1.1.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: ldshread(ldptr, sectnum, secthdr)
                      8: 
                      9: LDFILE *ldptr;
                     10: unsigned short sectnum;
                     11: SCNHDR *secthdr; 
                     12: 
                     13: {
                     14:     extern int         fseek( );
                     15:     extern int         fread( );
                     16: 
                     17:     extern int         vldldptr( );
                     18: 
                     19:     if (vldldptr(ldptr) == SUCCESS) {
                     20:        if ((sectnum != 0) && (sectnum <= HEADER(ldptr).f_nscns)) {
                     21:            if (FSEEK(ldptr,
                     22:                FILHSZ + HEADER(ldptr).f_opthdr + (sectnum - 1L) * SCNHSZ,
                     23:                BEGINNING) == OKFSEEK) {
                     24:                if (FREAD(secthdr, SCNHSZ, 1, ldptr) == 1) {
                     25:                    return(SUCCESS);
                     26:                }
                     27:            }
                     28:        }
                     29:     }
                     30: 
                     31:     return(FAILURE);
                     32: }
                     33: 
                     34: static char ID[ ] = "@(#) ldshread.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.