Annotation of researchv10no/cmd/cfront/libC/new/_new.c, revision 1.1

1.1     ! root        1: 
        !             2: typedef void (*PFVV)();
        !             3: 
        !             4: extern PFVV _new_handler;
        !             5: 
        !             6: extern "C" {
        !             7:        extern char* malloc(unsigned);
        !             8: }
        !             9: 
        !            10: extern void* operator new(long size)
        !            11: {
        !            12:        char* p;
        !            13: 
        !            14:        while ( (p=malloc(unsigned(size)))==0 ) {
        !            15:                if(_new_handler && size)
        !            16:                        (*_new_handler)();
        !            17:                else
        !            18:                        return 0;
        !            19:        }
        !            20:        return (void*)p;
        !            21: }

unix.superglobalmegacorp.com

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