Annotation of coherent/b/conf/patch/refs, revision 1.1

1.1     ! root        1: symName(sym, str_tab, work)
        !             2:        SYMENT *sym;
        !             3:        char *str_tab, *work;
        !             4: coffnlist(fn, nlp, names, count)
        !             5:        char *fn;       /* file name */
        !             6:        SYMENT *nlp;    /* names to look up */
        !             7:        char *names;    /* long names */
        !             8:        int count;      /* size of passed table */
        !             9: main()
        !            10: symName(sym, str_tab, work)
        !            11:        SYMENT *sym;
        !            12:        char *str_tab, *work;
        !            13: coffnlist(fn, nlp, names, count)
        !            14:        char *fn;       /* file name */
        !            15:        SYMENT *nlp;    /* names to look up */
        !            16:        char *names;    /* long names */
        !            17:        int count;      /* size of passed table */
        !            18: main()
        !            19: myatol( s )
        !            20:        register char * s;
        !            21: The size of the altered field is by default sizeof(int), but the 'value'\n\
        !            22:        specification may be followed by a ':' and a 'c', 's', 'i', or 'l' to\n\
        !            23:        explicitly specify a char, short, int, or long sized patch.\n\
        !            24:        \
        !            25:        ";
        !            26:        
        !            27:        #include <stdio.h>
        !            28:        #include <coff.h>
        !            29:        #include <canon.h>
        !            30:        #include <ctype.h>
        !            31:        
        !            32:        #include <sys/types.h>
        !            33:        #include <sys/stat.h>
        !            34:        #include "patch.h"
        !            35:        
        !            36:        /*
        !            37:         * Nlist tables and patch records.
        !            38:         */
        !            39:        #define NNLS    512
        !            40:        int     nnls;   /* Number of nlist elements used */
        !            41:        SYMENT nl[NNLS*2];
        !            42:        int     sym_len = 0;    /* Number of bytes allocated for symbols.  */
        !            43:        char    *symbols=NULL;
        !            44:        
        !            45:        PLIST pl[NNLS];
        !            46:        
        !            47:        char *namep;            /* Name of object file to patch.  */
        !            48:        int hotpatch = 0;       /* Are we patching /dev/kmem?  */
        !            49:        int verbose = 0;        /* Are we printing feedback?  */
        !            50:        int peek = 0;           /* Just peek--don't actually do the patch.  */
        !            51:        
        !            52:        void main();
        !            53:        int getnames();
        !            54:        void badsym();
        !            55:        void getone();
        !            56:        void setfile();
        !            57:        void setkmem();
        !            58:        int patch();
        !            59:        long myatol();
        !            60:        void usage();
        !            61:        char *index();
        !            62:        char *realloc();
        !            63:        
        !            64:        
        !            65:        void
        !            66:        main(argc, argv)
        !            67:        int argc;
        !            68:        char *argv[];
        !            69: getnames(nn, npp)
        !            70:        int nn;
        !            71:        char **npp;
        !            72: badsym(offset)
        !            73:        long offset;
        !            74: getone(i, np)
        !            75:        int i;                  /* Which'th symbol assigment is this?  */
        !            76:        register char *np;      /* The symbol assignment itself.  */
        !            77: setkmem(n)
        !            78:        int n;
        !            79: patch(fd, p)
        !            80:        int fd;
        !            81:        PLIST *p;
        !            82: myatol( s )
        !            83:        register char * s;
        !            84: usage()
        !            85: setfile(namep, n, pl)
        !            86:        char *namep;
        !            87:        int n;
        !            88:        struct plist pl[];
        !            89: main()
        !            90: main()

unix.superglobalmegacorp.com

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