Annotation of researchv9/jerq/sgs/libld/ldtbindex.c, revision 1.1.1.1

1.1       root        1: #include       <stdio.h>
                      2: #include       "filehdr.h"
                      3: #include       "syms.h"
                      4: #include       "ldfcn.h"
                      5: 
                      6: long
                      7: ldtbindex(ldptr)
                      8: 
                      9: LDFILE *ldptr;
                     10: 
                     11: {
                     12:     extern long                ftell( );
                     13: 
                     14:     extern int         vldldptr( );
                     15: 
                     16:     long               position;
                     17: 
                     18: 
                     19:     if (vldldptr(ldptr) == SUCCESS) {
                     20:        if ((position = FTELL(ldptr) - OFFSET(ldptr) - HEADER(ldptr).f_symptr) 
                     21:            >= 0) {
                     22: 
                     23:            if ((position % SYMESZ) == 0) {
                     24:                return(position / SYMESZ);
                     25:            }
                     26:        }
                     27:     }
                     28: 
                     29:     return(BADINDEX);
                     30: }
                     31: 
                     32: static char    ID[ ] = "@(#) ldtbindex.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.