Annotation of researchv9/jtools/src/pi/batch.c, revision 1.1

1.1     ! root        1: #include "master.pri"
        !             2: #include "process.pri"
        !             3: #include "frame.pub"
        !             4: #include "hostcore.h"
        !             5: #include "format.pub"
        !             6: #include <CC/stdio.h>
        !             7: #include "expr.pub"
        !             8: #include "symbol.h"
        !             9: SRCFILE("batch.c")
        !            10: 
        !            11: void BatchProcess::open()
        !            12: {
        !            13:        core = (Core*) new HostCore(this, master);
        !            14:        char *error = core->open();
        !            15:        if( error ){
        !            16:                fprintf(stderr, "%s\n", error);
        !            17:                exit(1);
        !            18:        }
        !            19:        CallStk *c = core->callstack();
        !            20:        for( long l = c->size-1; l>=0; --l )
        !            21:                if( l<32 || l>c->size-32 ){
        !            22:                Frame f = c->frame(l);
        !            23:                Bls t;
        !            24:                f.addsymbols();
        !            25:                printf("%s\n", f.text(t));
        !            26:                if( f.func ){
        !            27:                        BlkVars bv(f.func->blk(f.pc));
        !            28:                        Var *v;
        !            29:                        while( v = bv.gen() ){
        !            30:                                Bls tt;
        !            31:                                if( v->disc() == U_ARG ) continue;
        !            32:                                Expr *e = E_Sym(v);
        !            33:                                e->evaltext(&f, tt);
        !            34:                                printf("\t%s\n", tt.text);
        !            35:                        }
        !            36:                }
        !            37:        }
        !            38: }
        !            39: 
        !            40: BatchMaster::BatchMaster(char *c, char *a)
        !            41: {
        !            42:        new BatchProcess(c, a)->open();
        !            43: }

unix.superglobalmegacorp.com

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