[comp.sys.amiga] Lattice C++ troubles revisited...

jonasf@kuling.UUCP (Jonas Flygare) (10/11/89)

	If there is anyone out there who have made or recieved from 
	Lattice a bugfix to the missing _vec_delete in cplus.lib, 
	could I get a copy/info on how to get it?
	Also.. Anyone know if Lattice plan to do any work on cfront 2.0?
	(I want multiple inheritance and operator ->()... :) :))
	
	/Still waiting to hear from Lattice on both C++ and LC5.4.. :(
-- 
Jonas Flygare (aka Flax)        |"2 + 2 = 5 for sufficiently large values 
email: jonasf@kuling.UUCP       | of 2.."
real:  Vaktargatan 32 F:621     |Disclaim? _MY_ opinions doesn't need any
       S-754 22 Uppsala Sweden  |disclamation... 

jonasf@kuling.UUCP (Jonas Flygare) (10/11/89)

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<b;loop++)
    {			/* destructor will check if NULL..	*/
     (*fun)(a,e);	/* call destructor with element and flag */
     a=(void *)((unsigned int)a+c);	/* increment pointer */
    }
   }
}
     
/* That's all.. */
-- 
Jonas Flygare (aka Flax)        |"2 + 2 = 5 for sufficiently large values 
email: jonasf@kuling.UUCP       | of 2.."
real:  Vaktargatan 32 F:621     |Disclaim? _MY_ opinions doesn't need any
       S-754 22 Uppsala Sweden  |disclamation... 

jac@muslix.llnl.gov (James Crotinger) (10/11/89)

In article <1202@kuling.UUCP> jonasf@kuling.UUCP (Jonas Flygare) writes:
>
>	If there is anyone out there who have made or recieved from 
>	Lattice a bugfix to the missing _vec_delete in cplus.lib, 
>	could I get a copy/info on how to get it?

  I don't think there have been any updates, at least not on bix.
(Actually there was an update to the CC driver, but I think it broke
more things than it fixed 8-( ). Actually, I didn't even know this was
missing. Does Lattice know? (Or, more importantly, does Tim know?)  
I would think they'd get a fix posted pronto. I'll try to check next
time I'm on BIX.

>	Also.. Anyone know if Lattice plan to do any work on cfront 2.0?
>	(I want multiple inheritance and operator ->()... :) :))
>	

  Tim Holloway is working on a C++ *compiler* for the Amiga. It will
be compatable with CFRONT 2.0. Early this summer he said he hoped to
be beta testing by the end of the year. Haven't heard anything about
it since then. Can't wait tho'!!

>	/Still waiting to hear from Lattice on both C++ and LC5.4.. :(

  Me too!

>-- 
>Jonas Flygare (aka Flax)        |"2 + 2 = 5 for sufficiently large values 
>email: jonasf@kuling.UUCP       | of 2.."
>real:  Vaktargatan 32 F:621     |Disclaim? _MY_ opinions doesn't need any
>       S-754 22 Uppsala Sweden  |disclamation... 

  Jim