Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!ginosko!uunet!mcsun!sunic!bmc!kuling!jonasf From: jonasf@kuling.UUCP (Jonas Flygare) Newsgroups: comp.sys.amiga Subject: Re: Lattice C++ troubles revisited... Message-ID: <1203@kuling.UUCP> Date: 10 Oct 89 22:49:01 GMT Organization: Dep. of Computer Systems, Upsala University, Sweden Lines: 44 Well... Here's my solution to ved_delete.. If you see any bugs, please mail me and tell what's wrong, and what I can do to fix it.. (If any of you people on Lattice have the official fix.. I would like to get it.. :) /* This code was written late one evening after having spent */ /* some 4 hours reading assembler, reference books and cfront */ /* output. It doesn't look much but represents a lot of work.. */ /* If you find it useful, or have suggestions on improvements */ /* please write to the author: */ /* Jonas Flygare jonasf@kuling.uu.se */ /* Vaktargatan 32F:621 */ /* 754 22 Uppsala */ /* SWEDEN */ /* */ /* _vec_delete(....) */ /* args: pointer to start of array, number of elements in array */ /* size of each element in bytes, pointer to destructor, */ /* and a flag that tells whether to reclaim storage or not*/ /* (I have no clue what _vec_delete shall do then.. it */ /* does nada for now..) */ /* No error check on function pointers... */ void _vec_delete(void *a, int b, int c, void *d, int e) { int loop; void (*fun)(); fun=(void (*)())d; /* Ok, I know.. So I AM lazy.. */ if (e) /* test if storage will be reclaimed */ { for (loop=0;loop