Issue 6597 - build fails with: Undefined symbol: void SvPtrarr::InitData(void*const*,unsigned short) on Solaris SPARC
Summary: build fails with: Undefined symbol: void SvPtrarr::InitData(void*const*,unsig...
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: code (show other issues)
Version: OOo 1.0.1
Hardware: Sun Solaris
: P3 Trivial (vote)
Target Milestone: OOo 1.0.4
Assignee: sander_traveling
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-26 10:50 UTC by jkeil
Modified: 2004-08-12 17:26 UTC (History)
2 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
patch to remove SvPtrarr::InitData() from linker mapfile for the solaris sparc libsvl641ss.so library (731 bytes, patch)
2002-07-26 10:53 UTC, jkeil
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description jkeil 2002-07-26 10:50:53 UTC
Compiling OO 1.0.1 on Solaris SPARC: the compilation stopped in 
the module svtools/util building a binary named 'bmpgui':

...
------------------------------
Making: ../unxsols3.pro/bin/bmpgui
unx
CC -w -z combreloc -PIC -temp=/tmp -norunpath -lthread -instances=static
-L../unxsols3.pro/lib -L../lib -L/home/oo/oo_1.0.1_src/solenv/unxsols3/lib
-L/home/oo/oo_1.0.1_src/solver/641/unxsols3.pro/lib
-L/home/oo/oo_1.0.1_src/solenv/unxsols3/lib
-L/home/oo/oo_1.0.1_src/solenv/unxsols3/libsolaris.2.6 -L/lib -L/usr/lib
-L/usr/local/lib -L/usr/dt/lib -L/usr/openwin/lib -L/usr/j2sdk1_3_0_02/lib
-L/usr/j2sdk1_3_0_02/jre/lib/sparc -L/usr/j2sdk1_3_0_02/jre/lib/sparc/motif21
-L/usr/j2sdk1_3_0_02/jre/lib/sparc/native_threads -L/usr/openwin/lib -o
../unxsols3.pro/bin/bmpgui ../unxsols3.pro/obj/bmpgui.o
../unxsols3.pro/obj/bmpcore.o
/home/oo/oo_1.0.1_src/solver/641/unxsols3.pro/lib/salmain.o -lvcl641ss -ltl641ss
-lvos2C52 -lsal -lsvt641ss -lsvl641ss -Bdynamic -lnsl -lsocket -ldl -lm -lCrun
-lX11 -Bdynamic -lstlport_sunpro
Undefined                       first referenced
 symbol                             in file
void SvPtrarr::InitData(void*const*,unsigned short)   
../unxsols3.pro/lib/libsvl641ss.so
ld: fatal: Symbol referencing errors. No output written to
../unxsols3.pro/bin/bmpgui
dmake:  Error code 1, while making '../unxsols3.pro/bin/bmpgui'
---* TG_SLO.MK *---

ERROR: Error 65280 occurred while making /home/oo/oo_1.0.1_src/svtools/util
dmake:  Error code 1, while making 'build_all'
---* TG_SLO.MK *---
Comment 1 jkeil 2002-07-26 10:53:51 UTC
Created attachment 2366 [details]
patch to remove SvPtrarr::InitData() from linker mapfile for the solaris sparc libsvl641ss.so library
Comment 2 jkeil 2002-07-26 10:57:09 UTC
A find on the OO sources, looking for the 'SvPtrarr::InitData()'
method reveals that the method has been removed:

% find . -name '*.[hc]*' -exec grep 'SvPtrarr::InitData' {} +
./svtools/inc/svstdarr.hxx:             #90353# Removed obsolete
SvPtrarr::InitData() method.



Apparently, removing the obsolete SvPtrarr::InitData() method missed the 
oo/util/svtools/util/libsvl641ss.so.mapfile which still tries to
export the method from the libsvl641ss.so shared library.


The patch fixes the mapfile.

Comment 3 Unknown 2002-07-26 13:45:03 UTC
Sander, how did you build it with this bug? 
Comment 4 matthias.huetsch 2002-07-29 20:37:30 UTC
Hi Juergen,

I think something got badly mixed up in your build. As I understand it,
you're building OOo 1.0.1 (SRC641), but 'svtools/inc/svarray.hxx' r1.5
is in from SRC657, only. The revision that is tagged for OpenOffice_1_0_1
is r1.3.6.1, which still has 'InitData()'.

Probably I've update to HEAD, which will do no good at all. Please do a
'cvs update -rOpenOffice_1_0_1' when building OOo 1.0.1

Hope that helps,
Matthias
Comment 5 matthias.huetsch 2002-07-29 20:40:06 UTC
Hi again,

Please read: 
  Probably I've update to HEAD, ...
as
  Probably you've update to HEAD, ...

Sorry for my confusion,
Matthias
Comment 6 jkeil 2002-07-30 10:25:56 UTC
Matthias,

maybe this problem is caused by issue 6507, anoncvs is not updated
any more?

I just re-checked, and the version of svarray.hxx I've checked out
in my source tree *is* the one tagged OpenOffice_1_0_1:

% cvs status svarray.hxx
===================================================================
File: svarray.hxx       Status: Up-to-date

   Working revision:    1.3.6.1
   Repository revision: 1.3.6.1 /cvs/oo/util/svtools/inc/svarray.hxx,v
   Sticky Tag:          OpenOffice_1_0_1 (revision: 1.3.6.1)
   Sticky Date:         (none)
   Sticky Options:      (none)


Btw. I was told to use the OOO_STABLE_1 tag instead of
OpenOffice_1_0_1 to get bug fixes for the OO 10x releases.  But
that does not make a difference for the svarray.hxx or the
libsvl641ss.so.mapfile file.


And as far as I can tell, the problem is *not* caused by an
out-of-date C++ source or header file [1].  The missing external
symbol is caused by the linker "Mapfile" that still wants to export
the (nonexistant) symbol for SvPtrarr::InitData() from the
libsvl641ss.so shared library.


--
[1] I had no problem building OO 101 on Solaris 8 x86 using sources
that were 'cvs updated' to the same OpenOffice_1_0_1 tag.  This is
because the Solaris x86 OO build does *not* use linker mapfiles to
control the set of symbols exported from a shared library.
Comment 7 jkeil 2002-07-30 10:46:55 UTC
Btw. the real problem is when building the libsvl641ss.so shared
library in the svtools module with SvPtrarr::InitData() still in
the mapfile:


------------------------------
Making: ../unxsols3.pro/lib/libsvl641ss.so
CC -c -KPIC -o ../unxsols3.pro/slo/svl_dflt_version.o -DUNX 
-I../unxsols3.pro/inc /home/oo/oo_1.0.1_src/solenv/src/version.cxx
CC -w -z combreloc -PIC -temp=/tmp -norunpath -z text -G -lthread
-instances=static -M
../unxsols3.pro/misc/libsvl641ss.so_svl641ss.mapfile
-L../unxsols3.pro/lib -L../lib
-L/home/oo/oo_1.0.1_src/solenv/unxsols3/lib
-L/home/oo/oo_1.0.1_src/solver/641/unxsols3.pro/lib
-L/home/oo/oo_1.0.1_src/solenv/unxsols3/lib
-L/home/oo/oo_1.0.1_src/solenv/unxsols3/libsolaris.2.6 -L/lib
-L/usr/lib -L/usr/local/lib -L/usr/dt/lib -L/usr/openwin/lib
-L/usr/j2sdk1_3_0_02/lib -L/usr/j2sdk1_3_0_02/jre/lib/sparc
-L/usr/j2sdk1_3_0_02/jre/lib/sparc/motif21
-L/usr/j2sdk1_3_0_02/jre/lib/sparc/native_threads -L/usr/openwin/lib
../unxsols3.pro/slo/svl_dflt_version.o
../unxsols3.pro/slo/svl_dflt_description.o -o
../unxsols3.pro/lib/libsvl641ss.so ../unxsols3.pro/slo/svtdata.o
../unxsols3.pro/slo/registerlight.o ../unxsols3.pro/slo/accelcfg.o
../unxsols3.pro/slo/xmlaccelcfg.o ../unxsols3.pro/slo/cjkoptions.o
../unxsols3.pro/slo/pathoptions.o ../unxsols3.pro/slo/saveopt.o
../unxsols3.pro/slo/undoopt.o ../unxsols3.pro/slo/helpopt.o
../unxsols3.pro/slo/javaoptions.o ../unxsols3.pro/slo/useroptions.o
../unxsols3.pro/slo/moduleoptions.o
../unxsols3.pro/slo/securityoptions.o
../unxsols3.pro/slo/localisationoptions.o
../unxsols3.pro/slo/workingsetoptions.o
../unxsols3.pro/slo/viewoptions.o
../unxsols3.pro/slo/internaloptions.o
../unxsols3.pro/slo/startoptions.o
../unxsols3.pro/slo/historyoptions.o ../unxsols3.pro/slo/inetoptions.o
../unxsols3.pro/slo/menuoptions.o
../unxsols3.pro/slo/dynamicmenuoptions.o
../unxsols3.pro/slo/options3d.o ../unxsols3.pro/slo/fontoptions.o
../unxsols3.pro/slo/addxmltostorageoptions.o
../unxsols3.pro/slo/miscopt.o ../unxsols3.pro/slo/defaultoptions.o
../unxsols3.pro/slo/searchopt.o
../unxsols3.pro/slo/printwarningoptions.o
../unxsols3.pro/slo/printoptions.o
../unxsols3.pro/slo/syslocaleoptions.o
../unxsols3.pro/slo/cacheoptions.o ../unxsols3.pro/slo/regoptions.o
../unxsols3.pro/slo/filerec.o ../unxsols3.pro/slo/bintitem.o
../unxsols3.pro/slo/cenumitm.o ../unxsols3.pro/slo/cintitem.o
../unxsols3.pro/slo/cntwall.o ../unxsols3.pro/slo/cstitem.o
../unxsols3.pro/slo/ctypeitm.o ../unxsols3.pro/slo/custritm.o
../unxsols3.pro/slo/dateitem.o ../unxsols3.pro/slo/dtritem.o
../unxsols3.pro/slo/frqitem.o ../unxsols3.pro/slo/itemiter.o
../unxsols3.pro/slo/itempool.o ../unxsols3.pro/slo/itemprop.o
../unxsols3.pro/slo/itemset.o ../unxsols3.pro/slo/lckbitem.o
../unxsols3.pro/slo/poolio.o ../unxsols3.pro/slo/poolitem.o
../unxsols3.pro/slo/sfontitm.o ../unxsols3.pro/slo/sitem.o
../unxsols3.pro/slo/slstitm.o ../unxsols3.pro/slo/tfrmitem.o
../unxsols3.pro/slo/tresitem.o ../unxsols3.pro/slo/whiter.o
../unxsols3.pro/slo/adrparse.o ../unxsols3.pro/slo/inethist.o
../unxsols3.pro/slo/inettype.o ../unxsols3.pro/slo/iniadrtk.o
../unxsols3.pro/slo/loginerr.o ../unxsols3.pro/slo/strcrypt.o
../unxsols3.pro/slo/strmadpt.o ../unxsols3.pro/slo/PasswordHelper.o
../unxsols3.pro/slo/smplhint.o ../unxsols3.pro/slo/hint.o
../unxsols3.pro/slo/lstner.o ../unxsols3.pro/slo/isethint.o
../unxsols3.pro/slo/cancel.o ../unxsols3.pro/slo/brdcst.o
../unxsols3.pro/slo/listener.o ../unxsols3.pro/slo/listenerbase.o
../unxsols3.pro/slo/listeneriter.o ../unxsols3.pro/slo/broadcast.o
../unxsols3.pro/slo/passwordcontainer.o ../unxsols3.pro/slo/hashtab.o
../unxsols3.pro/slo/hashcont.o ../unxsols3.pro/slo/svarray.o
../unxsols3.pro/slo/htmlkey2.o ../unxsols3.pro/slo/htmlkywd.o
../unxsols3.pro/slo/htmlsupp.o ../unxsols3.pro/slo/parhtml.o
../unxsols3.pro/slo/svparser.o ../unxsols3.pro/slo/parrtf.o
../unxsols3.pro/slo/rtfout.o ../unxsols3.pro/slo/rtfkeywd.o
../unxsols3.pro/slo/rtfkey2.o ../unxsols3.pro/slo/converter.o
../unxsols3.pro/slo/cmdparse.o -ltl641ss -lvos2C52 -lcppu -lcomphelp2
-lcppuhelper3C52 -lsal -lsalhelper3C52 -lutl641ss -lucbhelper1C52
-Bdynamic -lnsl -lsocket -ldl -lm -lCrun -Bdynamic -lstlport_sunpro
Undefined                       first referenced
 symbol                             in file
void SvPtrarr::InitData(void*const*,unsigned short)   
../unxsols3.pro/misc/libsvl641ss.so_svl641ss.mapfile
ld: warning: Symbol referencing errors
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

/home/oo/oo_1.0.1_src/solenv/bin/checkdll.sh -L../unxsols3.pro/lib
-L../lib -L/home/oo/oo_1.0.1_src/solenv/unxsols3/lib
-L/home/oo/oo_1.0.1_src/solver/641/unxsols3.pro/lib
-L/home/oo/oo_1.0.1_src/solenv/unxsols3/lib
-L/home/oo/oo_1.0.1_src/solenv/unxsols3/libsolaris. -L/lib -L/usr/lib
-L/usr/local/lib -L/usr/dt/lib -L/usr/openwin/lib
-L/usr/j2sdk1_3_0_02/lib -L/usr/j2sdk1_3_0_02/jre/lib/sparc
-L/usr/j2sdk1_3_0_02/jre/lib/sparc/motif21
-L/usr/j2sdk1_3_0_02/jre/lib/sparc/native_threads -L/usr/openwin/lib
../unxsols3.pro/lib/libsvl641ss.so
Checking DLL ../unxsols3.pro/lib/libsvl641ss.so ...: ok
-rwxr-xr-x   1 jk       usr      1454232 Jul 30 11:33
../unxsols3.pro/lib/libsvl641ss.so



The linker warns about the missing definition, but the build
continues.  The new shared library contains the symbol
SvPtrarr::InitData() as an undefined external reference:

% pwd
/home/oo/oo_1.0.1_src/svtools
% nm -p unxsols3.pro/lib/libsvl641ss.so | grep InitData
0000000000 U __1cISvPtrarrIInitData6MpkpvH_v_
Comment 8 matthias.huetsch 2002-07-30 12:27:00 UTC
Hi Juergen,

I still believe that your sources somehow got mixed up, but I should
have looked at your recent comments more closely:

% find . -name '*.[hc]*' -exec grep 'SvPtrarr::InitData' {} +
./svtools/inc/svstdarr.hxx:             #90353# Removed obsolete
SvPtrarr::InitData() method.

So it's 'svstdarr.hxx' that got updated to HEAD (r1.3) instead of the
OOO_STABLE_1 branch series (r1.2.16...).

The method 'SvPtrarr::InitData()' is definitely present in OOo 1.0.x,
so the mapfile is correct in exporting that symbol.

Hope that helps,
Matthias
Comment 9 jkeil 2002-07-30 12:56:58 UTC
> The method 'SvPtrarr::InitData()' is definitely present in OOo 1.0.x,
> so the mapfile is correct in exporting that symbol.

But that's *not* what I see on anoncvs@anoncvs.openoffice.org.

According to the appended cvs diff between the sources tagged
OpenOffice_1_0 and OpenOffice_1_0_1, there is

File                       OO 1.0 rev             OO 1.0.1 rev
-----------------------------------------------------------------
svstdarr.hxx               1.2                    1.2.16.1
svarray.hxx                1.3                    1.3.6.1
libsvl641ss.so.mapfile     1.1.2.1                1.1.2.2


If you look at the appended cvs diff, you'll notice that both
svstdarr.hxx and svarray.hxx were updated on
anoncvs.openoffice.org to *remove* InitData methods.  And the update
on the mapfile didn't change anything that is 'InitData()' related.


% pwd
/home/oo/oo_1.0.1_src/svtools
% cvs -z3 diff -rOpenOffice_1_0 -rOpenOffice_1_0_1 inc/svstdarr.hxx
inc/svarray.hxx util/libsvl641ss.so.mapfile
Index: inc/svstdarr.hxx
===================================================================
RCS file: /cvs/oo/util/svtools/inc/svstdarr.hxx,v
retrieving revision 1.2
retrieving revision 1.2.16.1
diff -u -B -r1.2 -r1.2.16.1
--- inc/svstdarr.hxx	2001/03/20 18:31:25	1.2
+++ inc/svstdarr.hxx	2002/05/30 09:01:13	1.2.16.1
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: svstdarr.hxx,v $
  *
- *  $Revision: 1.2 $
+ *  $Revision: 1.2.16.1 $
  *
- *  last change: $Author: jp $ $Date: 2001/03/20 18:31:25 $
+ *  last change: $Author: hr $ $Date: 2002/05/30 09:01:13 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -67,8 +67,8 @@
 #*	  Beschreibung
 #*
 #*    Ersterstellung    JP 22.10.96
-#*	  Letzte Aenderung	$Author: jp $ $Date: 2001/03/20 18:31:25 $
-#*	  $Revision: 1.2 $
+#*	  Letzte Aenderung	$Author: hr $ $Date: 2002/05/30 09:01:13 $
+#*	  $Revision: 1.2.16.1 $
 #*
 #*	  $Logfile:   T:/svtools/inc/svstdarr.hxv  $
 #*
@@ -153,9 +153,6 @@
 	USHORT Count() const  {   return SvUShorts::Count();	}
 	const USHORT* GetData() const { return (const USHORT*)pData; }
 
-	void InitData( const USHORT* pE, USHORT nL ) {
-		SvUShorts::InitData( pE, nL );
-	}
 	const USHORT& operator[](USHORT nP) const {
 		return SvUShorts::operator[]( nP );
 	}
@@ -335,11 +332,17 @@
 
 		Source Code Control System - Header
 
-		$Header: /cvs/oo/util/svtools/inc/svstdarr.hxx,v 1.2 2001/03/20
18:31:25 jp Exp $
+		$Header: /cvs/oo/util/svtools/inc/svstdarr.hxx,v 1.2.16.1
2002/05/30 09:01:13 hr Exp $
 
 		Source Code Control System - Update
 
 		$Log: svstdarr.hxx,v $
+		Revision 1.2.16.1  2002/05/30 09:01:13  hr
+		#i5181#,#90353# Merge with 1.3: removed InitData()
+		
+		Revision 1.3  2002/05/12 16:21:03  mhu
+		#90353# Removed obsolete SvPtrarr::InitData() method.
+		
 		Revision 1.2  2001/03/20 18:31:25  jp
 		new standard arrays
 		
Index: inc/svarray.hxx
===================================================================
RCS file: /cvs/oo/util/svtools/inc/svarray.hxx,v
retrieving revision 1.3
retrieving revision 1.3.6.1
diff -u -B -r1.3 -r1.3.6.1
--- inc/svarray.hxx	2001/09/27 18:28:34	1.3
+++ inc/svarray.hxx	2002/05/30 08:57:57	1.3.6.1
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: svarray.hxx,v $
  *
- *  $Revision: 1.3 $
+ *  $Revision: 1.3.6.1 $
  *
- *  last change: $Author: hr $ $Date: 2001/09/27 18:28:34 $
+ *  last change: $Author: hr $ $Date: 2002/05/30 08:57:57 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -141,6 +141,10 @@
 #include <limits.h> 	// fuer USHRT_MAX
 #endif
 
+#ifndef _RTL_ALLOC_H_
+#include <rtl/alloc.h>
+#endif
+
 #ifndef _SOLAR_H
 #include <tools/solar.h>
 #endif
@@ -204,19 +209,15 @@
 class nm\
 {\
 protected:\
-	AE *pData;\
-	BYTE nFree, nIncr;\
+	AE    *pData;\
+	USHORT nFree;\
 	USHORT nA;\
 \
-	void _grow(USHORT nSize);\
+	void _resize(size_t n);\
 \
 public:\
 	nm( BYTE= IS, BYTE= GS );\
-	~nm()\
-	{\
-		if( pData )\
-			delete (void*) pData;\
-	}\
+	~nm() { rtl_freeMemory( pData ); }\
 \
 	_SVVARARR_DEF_GET_OP_INLINE(nm, AE )\
 	AERef GetObject(USHORT nP) const { return (*this)[nP]; } \
@@ -229,8 +230,6 @@
 	USHORT Count() const { return nA; }\
 	const AE* GetData() const { return (const AE*)pData; }\
 \
-	void InitData( const AE* pE, USHORT nL );\
-\
 	void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
 	{\
 		_ForEach( 0, nA, fnForEach, pArgs );\
@@ -263,58 +262,50 @@
 SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE )
 
 #define SV_IMPL_VARARR_GEN( nm, AE, AERef )\
-nm::nm( BYTE nInitSize, BYTE nGSize )\
+nm::nm( BYTE nInit, BYTE )\
+	: pData (0),\
+	  nFree (nInit),\
+	  nA    (0)\
 {\
-	if( nInitSize )\
+	if( nInit )\
 	{\
-		int nS = nInitSize;\
-		pData = (AE *)new char[sizeof(AE) * nS];\
-		DBG_ASSERT( pData,"CTOR, new");\
+		pData = (AE*)(rtl_allocateMemory(sizeof(AE) * nInit));\
+		DBG_ASSERT( pData, "CTOR, allocate");\
 	}\
-	else pData = 0;\
-	nIncr = nGSize ? nGSize : nInitSize;\
-	nFree = nInitSize;\
-	nA = 0;\
 }\
 \
-void nm::_grow( USHORT nGSize )\
+void nm::_resize (size_t n)\
 {\
-	DBG_ASSERT(nGSize,"_grow # wrong");\
-	AE *pAdr =(AE *) new char[sizeof(AE) * nGSize];\
-	DBG_ASSERT( pAdr,"_grow (new)");\
-	if( pData )\
+	USHORT nL = ((n < USHRT_MAX) ? USHORT(n) : USHRT_MAX);\
+	AE* pE = (AE*)(rtl_reallocateMemory (pData, sizeof(AE) * nL));\
+	if ((pE != 0) || (nL == 0))\
 	{\
-		memcpy( pAdr, pData, nA * sizeof( AE ));\
-		delete (void *)pData;\
+		pData = pE;\
+		nFree = nL - nA;\
 	}\
-	pData = pAdr;\
-	nFree = (BYTE)(nGSize - nA);\
 }\
 \
 void nm::Insert( const AERef aE, USHORT nP )\
 {\
 	DBG_ASSERT(nP <= nA && nA < USHRT_MAX, "Ins 1");\
-	if( !nFree )\
-		_grow( (( nA  / nIncr) + 1) * nIncr );\
+	if (nFree < 1)\
+		_resize (nA + ((nA > 1) ? nA : 1));\
 	if( pData && nP < nA )\
 		memmove( pData+nP+1, pData+nP, (nA-nP) * sizeof( AE ));\
 	*(pData+nP) = (AE&)aE;\
-	nA++;\
-	nFree--;\
+	nA += 1; nFree -= 1;\
 }\
 \
 void nm::Insert( const AE* pE, USHORT nL, USHORT nP )\
 {\
 	DBG_ASSERT(nP<=nA && ((long)nA+nL)<USHRT_MAX,"Ins n");\
-	USHORT nG = 0;\
-	if( nL > (USHORT)nFree )\
-		_grow( nG = ((( nA + nL - 1) / nIncr) + 1) * nIncr );\
+	if (nFree < nL)\
+		_resize (nA + ((nA > nL) ? nA : nL));\
 	if( pData && nP < nA )\
 		memmove( pData+nP+nL, pData+nP, (nA-nP) * sizeof( AE ));\
 	if( pE )\
 		memcpy( pData+nP, pE, nL * sizeof( AE ));\
-	nA += nL;\
-	nFree = nG ? (BYTE)(nG - nA) : nFree - (BYTE)nL; \
+	nA += nL; nFree -= nL;\
 }\
 \
 void nm::Replace( const AERef aE, USHORT nP )\
@@ -322,6 +313,7 @@
 	if( nP < nA )\
 		*(pData+nP) = (AE&)aE;\
 }\
+\
 void nm::Replace( const AE *pE, USHORT nL, USHORT nP )\
 {\
 	if( pE && nP < nA )\
@@ -332,7 +324,7 @@
 		{\
 			memcpy( pData + nP, pE, nL * sizeof( AE ));\
             nP += nL - nA; \
-            nFree = (BYTE)nP;\
+            nFree = nP;\
 		}\
 		else \
 		{\
@@ -344,19 +336,17 @@
 		}\
 	}\
 }\
+\
 void nm::Remove( USHORT nP, USHORT nL )\
 {\
 	if( !nL )\
 		return;\
 	DBG_ASSERT( nP < nA && nP + nL <= nA,"Del");\
 	if( pData && nP+1 < nA )\
-		memmove( pData+nP, pData+nP+nL,\
-						(nA-nP-nL) * sizeof( AE ));\
-	nA -= nL;\
-	if( nL > (USHORT)(nIncr - nFree) ) \
-		_grow((( nA / nIncr ) + 1) * nIncr );\
-	else \
-		nFree += (BYTE)nL; \
+		memmove( pData+nP, pData+nP+nL, (nA-nP-nL) * sizeof( AE ));\
+	nA -= nL; nFree += nL;\
+	if (nFree > nA)\
+		_resize (nA);\
 }\
 \
 void nm::_ForEach( USHORT nStt, USHORT nE, \
@@ -367,14 +357,7 @@
 	for( ; nStt < nE && (*fnCall)( *(const AE*)(pData+nStt), pArgs );
nStt++)\
 		;\
 }\
-void nm::InitData( const AE* pE, USHORT nL ) \
-{\
-	if( pData ) \
-		delete (void*) pData;\
-	pData = (AE*)pE;\
-	nA = nL;\
-	nFree = 0;\
-}\
+\
 _SVVARARR_IMPL_GET_OP_INLINE(nm, AE )\
 
 
@@ -429,19 +412,16 @@
 class nm\
 {\
 protected:\
-	AE *pData;\
-	BYTE nFree, nIncr;\
+	AE    *pData;\
+	USHORT nFree;\
 	USHORT nA;\
 \
-	void _grow(USHORT nSize);\
+	void _resize(size_t n);\
 	void _destroy();\
 \
 public:\
 	nm( BYTE= IS, BYTE= GS );\
-	~nm()\
-	{\
-		_destroy();\
-	}\
+	~nm() { _destroy(); }\
 \
 	_SVOBJARR_DEF_GET_OP_INLINE(nm,AE)\
 	AE& GetObject(USHORT nP) const { return (*this)[nP]; } \
@@ -452,8 +432,6 @@
 	USHORT Count() const { return nA; }\
 	const AE* GetData() const { return (const AE*)pData; }\
 \
-	void InitData( const AE* pE, USHORT nL );\
-\
 	void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
 	{\
 		_ForEach( 0, nA, fnForEach, pArgs );\
@@ -477,53 +455,60 @@
 };
 
 #define SV_IMPL_OBJARR( nm, AE )\
-nm::nm( BYTE nInitSize, BYTE nGSize )\
+nm::nm( BYTE nInit, BYTE )\
+	: pData (0),\
+	  nFree (nInit),\
+	  nA    (0)\
 {\
-	if( nInitSize )\
+	if( nInit )\
 	{\
-		int nS = nInitSize;\
-		pData = (AE *)new char[sizeof(AE) * nS];\
-		DBG_ASSERT( pData,"CTOR, new");\
+		pData = (AE*)(rtl_allocateMemory(sizeof(AE) * nInit));\
+		DBG_ASSERT( pData, "CTOR, allocate");\
 	}\
-	else pData = 0;\
-	nIncr = nGSize ? nGSize : nInitSize;\
-	nFree = nInitSize;\
-	nA = 0;\
 }\
 \
-void nm::_grow( USHORT nGSize )\
+void nm::_destroy()\
 {\
-	DBG_ASSERT(nGSize,"_grow # wrong");\
-	AE *pAdr =(AE *) new char[sizeof(AE) * nGSize];\
-	DBG_ASSERT( pAdr,"_grow (new)");\
-	if( pData )\
+	if(pData)\
 	{\
-		memcpy( pAdr, pData, nA * sizeof( AE ));\
-		delete (void *)pData;\
+		AE* pTmp=pData;\
+		for(USHORT n=0; n < nA; n++,pTmp++ )\
+		{\
+			pTmp->~AE();\
+		}\
+		rtl_freeMemory(pData);\
+		pData = 0;\
 	}\
-	pData = pAdr;\
-	nFree = (BYTE)(nGSize - nA);\
 }\
 \
+void nm::_resize (size_t n)\
+{\
+	USHORT nL = ((n < USHRT_MAX) ? USHORT(n) : USHRT_MAX);\
+	AE* pE = (AE*)(rtl_reallocateMemory (pData, sizeof(AE) * nL));\
+	if ((pE != 0) || (nL == 0))\
+	{\
+		pData = pE;\
+		nFree = nL - nA;\
+	}\
+}\
+\
 void nm::Insert( const AE &aE, USHORT nP )\
 {\
 	DBG_ASSERT( nP <= nA && nA < USHRT_MAX,"Ins 1");\
-	if( !nFree )\
-		_grow( (( nA  / nIncr) + 1) * nIncr );\
+	if (nFree < 1)\
+		_resize (nA + ((nA > 1) ? nA : 1));\
 	if( pData && nP < nA )\
 		memmove( pData+nP+1, pData+nP, (nA-nP) * sizeof( AE ));\
 	AE* pTmp = pData+nP;\
 	new( (DummyType*) pTmp ) AE( (AE&)aE );\
-	nA++;\
-	nFree--;\
+	nA += 1; nFree -= 1;\
 }\
 \
 void nm::Insert( const AE* pE, USHORT nL, USHORT nP )\
 {\
 	DBG_ASSERT(nP<=nA && ((long)nA+nL) < USHRT_MAX, "Ins n");\
-	USHORT nG = 0;\
-	if( nL > (USHORT)nFree )\
-		_grow( nG = ((( nA + nL - 1) / nIncr) + 1) * nIncr );\
+	if (nFree < nL)\
+		_resize (nA + ((nA > nL) ? nA : nL));\
 	if( pData && nP < nA )\
 		memmove( pData+nP+nL, pData+nP, (nA-nP) * sizeof( AE ));\
 	if( pE )\
@@ -534,8 +519,7 @@
 			 new( (DummyType*) pTmp ) AE( (AE&)*pE );\
 		}\
 	}\
-	nA += nL;\
-	nFree = nG ? (BYTE)(nG - nA) : nFree - (BYTE)nL;\
+	nA += nL; nFree -= nL;\
 }\
 \
 void nm::Remove( USHORT nP, USHORT nL )\
@@ -551,13 +535,10 @@
 			pTmp->~AE();\
 	}\
 	if( pData && nP+1 < nA )\
-		memmove( pData+nP, pData+nP+nL,\
-						(nA-nP-nL) * sizeof( AE ));\
-	nA -= nL;\
-	if( nL > (USHORT)(nIncr - nFree) ) \
-		_grow((( nA / nIncr ) + 1) * nIncr );\
-	else \
-		nFree += (BYTE)nL; \
+		memmove( pData+nP, pData+nP+nL, (nA-nP-nL) * sizeof( AE ));\
+	nA -= nL; nFree += nL;\
+	if (nFree > nA) \
+		_resize (nA);\
 }\
 \
 void nm::_ForEach( USHORT nStt, USHORT nE, \
@@ -567,26 +548,8 @@
 		return;\
 	for( ; nStt < nE && (*fnCall)( *(pData+nStt), pArgs ); nStt++)\
 		;\
-}\
-void nm::InitData( const AE* pE, USHORT nL ) \
-{\
-	_destroy();\
-	pData = (AE*)pE;\
-	nA = nL;\
-	nFree = 0;\
-}\
-void nm::_destroy()\
-{\
-	if(pData)\
-	{\
-		AE* pTmp=pData;\
-		for(USHORT n=0; n < nA; n++,pTmp++ )\
-		{\
-			pTmp->~AE();\
-		}\
-		delete (void*)pData;\
-	}\
 }\
+\
 _SVOBJARR_IMPL_GET_OP_INLINE(nm, AE)\
 
 #define _SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AERef )\
@@ -628,9 +591,6 @@
 	const AE* GetData() const {\
 		return (const AE*)Base::GetData();\
 	}\
-	void InitData( const AE* pE, USHORT nL )\
-	{	Base::InitData( (const VoidPtr*)pE, nL ); } \
-	\
 	void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
 	{\
 		_ForEach( 0, nA, (FnForEach_##Base)fnForEach, pArgs );\
@@ -763,8 +723,6 @@
 	void Remove( const AE& aE, USHORT nL = 1 );\
 	USHORT Count() const  {   return nm##_SAR::Count();	}\
 	const AE* GetData() const { return (const AE*)pData; }\
-	void InitData( const AE* pE, USHORT nL )\
-	{	nm##_SAR::InitData( pE, nL ); }\
 \
 /* Das Ende stehe im DECL-Makro !!! */
 
Index: util/libsvl641ss.so.mapfile
===================================================================
RCS file: /cvs/oo/util/svtools/util/libsvl641ss.so.mapfile,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -B -r1.1.2.1 -r1.1.2.2
--- util/libsvl641ss.so.mapfile	2002/02/15 11:17:42	1.1.2.1
+++ util/libsvl641ss.so.mapfile	2002/05/30 11:46:49	1.1.2.2
@@ -1450,6 +1450,7 @@
 		sHTML_tbody;
 		sHTML_teletype;
 		sHTML_textarea;
+		sHTML_tfoot;
 		sHTML_thead;
 		sHTML_title;
 		sHTML_underline;
@@ -1568,6 +1569,9 @@
 		sRTF_FOOTER;
 		sRTF_FOOTNOTE;
 		sRTF_FPRQ;
+		sRTF_FRMTXTBRL;
+		sRTF_FRMTXTBRLV;
+		sRTF_FRMTXLRTBV;
 		sRTF_FROMAN;
 		sRTF_FS;
 		sRTF_FSCRIPT;
@@ -1706,6 +1710,7 @@
 		sRTF_SLMULT;
 		sRTF_SNEXT;
 		sRTF_SOUTLVL;
+		sRTF_STEXTFLOW;
 		sRTF_STRIKE;
 		sRTF_STRIKED;
 		sRTF_STYLESHEET;
Comment 10 Unknown 2003-03-28 16:00:43 UTC
Sander, can you look at this while doing the solaris build 
for 1.0.3? 
Comment 11 Martin Hollmichel 2003-04-15 06:49:02 UTC
retarget to 1.0.4
Comment 12 pavel 2004-05-19 21:04:46 UTC
This is already fixed, no problems in 1.0.3.
Comment 13 jens-heiner.rechtien 2004-08-12 17:26:26 UTC
Closing ...