From: Marc Maurer (j.m.maurer_at_student.utwente.nl)
Date: Sun Feb 01 2004 - 13:34:41 EST
Forward: Patch from Noah Roberts to make abi compile on AMD64
-- Marc Maurer <j.m.maurer_at_student.utwente.nl>
attached mail follows:
Here it is.
NR
diff -ur abiword-2.1.0.orig/abi/src/af/xap/unix/xap_UnixFont.cpp abiword-2.1.0/abi/src/af/xap/unix/xap_UnixFont.cpp
--- abiword-2.1.0.orig/abi/src/af/xap/unix/xap_UnixFont.cpp 2003-08-22 13:52:07.000000000 -0700
+++ abiword-2.1.0/abi/src/af/xap/unix/xap_UnixFont.cpp 2004-02-01 09:36:39.886001960 -0800
@@ -400,10 +400,10 @@
size_t idx = 0;
for (size_t i = 0; i < coverage.size(); i += 2)
{
- UT_UCSChar c1 = static_cast<UT_UCSChar>(reinterpret_cast<UT_uint32>(coverage[i]));
+ UT_UCSChar c1 = static_cast<UT_UCSChar>(reinterpret_cast<unsigned long>(coverage[i]));
UT_UCSChar c2 =
static_cast<UT_UCSChar>(static_cast<UT_uint32>(c1)) +
- static_cast<UT_UCSChar>(reinterpret_cast<UT_uint32>(coverage[i + 1]));
+ static_cast<UT_UCSChar>(reinterpret_cast<unsigned long>(coverage[i + 1]));
for (UT_UCSChar c = c1; c < c2; ++c)
{
FT_UInt glyph_idx = FT_Get_Char_Index(face, c);
diff -ur abiword-2.1.0.orig/abi/src/af/xap/xp/xap_Draw_Symbol.cpp abiword-2.1.0/abi/src/af/xap/xp/xap_Draw_Symbol.cpp
--- abiword-2.1.0.orig/abi/src/af/xap/xp/xap_Draw_Symbol.cpp 2003-12-13 17:23:58.000000000 -0800
+++ abiword-2.1.0/abi/src/af/xap/xp/xap_Draw_Symbol.cpp 2004-02-01 09:35:44.255459088 -0800
@@ -149,7 +149,7 @@
for (i = 0; i < m_vCharSet.size(); i += 2)
{
- UT_UCSChar base = static_cast<UT_UCSChar>(reinterpret_cast<UT_uint32>(m_vCharSet[i]));
+ UT_UCSChar base = static_cast<UT_UCSChar>(reinterpret_cast<long>(m_vCharSet[i]));
size_t nb_chars = reinterpret_cast<size_t>(m_vCharSet[i + 1]);
for (UT_UCSChar j = base; j < base + nb_chars; ++j)
@@ -185,11 +185,11 @@
UT_DEBUGMSG(("calcSymbolFromCoords(x = [%u], y = [%u]) =", ix, iy));
for (size_t i = 0; i < m_vCharSet.size(); i += 2)
{
- count += reinterpret_cast<UT_uint32>(m_vCharSet[i + 1]);
+ count += reinterpret_cast<unsigned long>(m_vCharSet[i + 1]);
if (count > index)
{
- UT_DEBUGMSG((" %u\n", static_cast<UT_uint32>(reinterpret_cast<UT_uint32>(m_vCharSet[i]) + index - count + reinterpret_cast<UT_uint32>(m_vCharSet[i + 1]))));
- return static_cast<UT_UCSChar>(reinterpret_cast<UT_uint32>(m_vCharSet[i]) + index - count + reinterpret_cast<UT_uint32>(m_vCharSet[i + 1]));
+ UT_DEBUGMSG((" %u\n", static_cast<UT_uint32>(reinterpret_cast<unsigned long>(m_vCharSet[i]) + index - count + reinterpret_cast<unsigned long>(m_vCharSet[i + 1]))));
+ return static_cast<UT_UCSChar>(reinterpret_cast<unsigned long>(m_vCharSet[i]) + index - count + reinterpret_cast<unsigned long>(m_vCharSet[i + 1]));
}
}
@@ -217,8 +217,8 @@
for (size_t i = 0; i < m_vCharSet.size(); i += 2)
{
- UT_uint32 base = reinterpret_cast<UT_uint32>(m_vCharSet[i]);
- UT_uint32 size = reinterpret_cast<UT_uint32>(m_vCharSet[i + 1]);
+ UT_uint32 base = reinterpret_cast<unsigned long>(m_vCharSet[i]);
+ UT_uint32 size = reinterpret_cast<unsigned long>(m_vCharSet[i + 1]);
if (base + size > c)
{
diff -ur abiword-2.1.0.orig/abi/src/other/spell/xp/enchant_checker.h abiword-2.1.0/abi/src/other/spell/xp/enchant_checker.h
--- abiword-2.1.0.orig/abi/src/other/spell/xp/enchant_checker.h 2003-10-02 19:53:24.000000000 -0700
+++ abiword-2.1.0/abi/src/other/spell/xp/enchant_checker.h 2004-02-01 09:40:38.029798600 -0800
@@ -36,7 +36,7 @@
const UT_UCSChar *correct, size_t correctLen);
virtual void ignoreWord (const UT_UCSChar *toCorrect, size_t toCorrectLen);
- virtual bool isIgnored (const UT_UCSChar * pWord, UT_uint32 len) const;
+ virtual bool isIgnored (const UT_UCSChar * pWord, size_t len) const;
protected:
diff -ur abiword-2.1.0.orig/abi/src/other/spell/xp/lookup.cpp abiword-2.1.0/abi/src/other/spell/xp/lookup.cpp
--- abiword-2.1.0.orig/abi/src/other/spell/xp/lookup.cpp 2003-09-02 12:10:56.000000000 -0700
+++ abiword-2.1.0/abi/src/other/spell/xp/lookup.cpp 2004-02-01 09:52:37.093484304 -0800
@@ -340,22 +340,22 @@
if (dp->word == (char *) -1)
dp->word = NULL;
else
- dp->word = &m_hashstrings [ reinterpret_cast<int>(dp->word) ];
+ dp->word = &m_hashstrings [ reinterpret_cast<long>(dp->word) ];
if (dp->next == (struct dent *) -1)
dp->next = NULL;
else
- dp->next = &m_hashtbl [ reinterpret_cast<int>(dp->next) ];
+ dp->next = &m_hashtbl [ reinterpret_cast<long>(dp->next) ];
}
}
for (i = m_numsflags + m_numpflags, entry = m_sflaglist; --i >= 0; entry++)
{
if (entry->stripl)
- entry->strip = reinterpret_cast<ichar_t *>(&m_hashstrings[reinterpret_cast<int>(entry->strip)]);
+ entry->strip = reinterpret_cast<ichar_t *>(&m_hashstrings[reinterpret_cast<long>(entry->strip)]);
else
entry->strip = NULL;
if (entry->affl)
- entry->affix = reinterpret_cast<ichar_t *>(&m_hashstrings[reinterpret_cast<int>(entry->affix)]);
+ entry->affix = reinterpret_cast<ichar_t *>(&m_hashstrings[reinterpret_cast<long>(entry->affix)]);
else
entry->affix = NULL;
}
diff -ur abiword-2.1.0.orig/abi/src/text/ptbl/xp/pp_TableAttrProp.cpp abiword-2.1.0/abi/src/text/ptbl/xp/pp_TableAttrProp.cpp
--- abiword-2.1.0.orig/abi/src/text/ptbl/xp/pp_TableAttrProp.cpp 2003-10-02 06:29:02.000000000 -0700
+++ abiword-2.1.0/abi/src/text/ptbl/xp/pp_TableAttrProp.cpp 2004-02-01 09:38:20.094767912 -0800
@@ -52,7 +52,7 @@
*/
static UT_sint32 compareAPBinary(const void * vX1, const void * vX2)
{
- const UT_uint32 x1 = reinterpret_cast<UT_uint32>(vX1);
+ const UT_uint32 x1 = reinterpret_cast<unsigned long>(vX1);
PP_AttrProp *x2 = *(PP_AttrProp **)(vX2);
UT_uint32 u2 = x2->getCheckSum();
diff -ur abiword-2.1.0.orig/abi/src/wp/ap/unix/ap_UnixDialog_FormatFootnotes.cpp abiword-2.1.0/abi/src/wp/ap/unix/ap_UnixDialog_FormatFootnotes.cpp
--- abiword-2.1.0.orig/abi/src/wp/ap/unix/ap_UnixDialog_FormatFootnotes.cpp 2003-09-25 07:18:42.000000000 -0700
+++ abiword-2.1.0/abi/src/wp/ap/unix/ap_UnixDialog_FormatFootnotes.cpp 2004-02-01 09:46:01.442632376 -0800
@@ -217,7 +217,7 @@
{
/* note to typecast facist: rebuild on every platform before even thinking committing a change
* to the cast below */
- FootnoteType iType = (FootnoteType)reinterpret_cast<int>(g_object_get_data(G_OBJECT(widget), "user_data"));
+ FootnoteType iType = (FootnoteType)reinterpret_cast<long>(g_object_get_data(G_OBJECT(widget), "user_data"));
setFootnoteType(iType);
refreshVals();
}
@@ -227,7 +227,7 @@
{
/* note to typecast facist: rebuild on every platform before even thinking committing a change
* to the cast below */
- FootnoteType iType = (FootnoteType)reinterpret_cast<int>(g_object_get_data(G_OBJECT(widget), "user_data"));
+ FootnoteType iType = (FootnoteType)reinterpret_cast<long>(g_object_get_data(G_OBJECT(widget), "user_data"));
setEndnoteType(iType);
refreshVals();
}
diff -ur abiword-2.1.0.orig/abi/src/wp/impexp/xp/ie_Table.cpp abiword-2.1.0/abi/src/wp/impexp/xp/ie_Table.cpp
--- abiword-2.1.0.orig/abi/src/wp/impexp/xp/ie_Table.cpp 2003-09-25 18:48:17.000000000 -0700
+++ abiword-2.1.0/abi/src/wp/impexp/xp/ie_Table.cpp 2004-02-01 09:49:15.554122944 -0800
@@ -1028,7 +1028,7 @@
UT_sint32 j = 0;
for(j=0; !bMatch && (j < static_cast<UT_sint32>(m_vecCellX.getItemCount())); j++)
{
- UT_sint32 prevX = reinterpret_cast<UT_sint32>(m_vecCellX.getNthItem(j));
+ UT_sint32 prevX = reinterpret_cast<long>(m_vecCellX.getNthItem(j));
UT_DEBUGMSG(("Prev cell %d cellx %d \n",j,prevX));
bool bLast = ((j-1) == szCurRow);
bMatch = doCellXMatch(prevX,curX,bLast);
@@ -1179,7 +1179,7 @@
sColWidth.clear();
for(i=0; i< static_cast<UT_sint32>(m_vecCellX.getItemCount()); i++)
{
- UT_sint32 iCellx = reinterpret_cast<UT_sint32>(m_vecCellX.getNthItem(i));
+ UT_sint32 iCellx = reinterpret_cast<long>(m_vecCellX.getNthItem(i));
xxx_UT_DEBUGMSG(("final cellx import cellx %d iPrev %x \n",iCellx,iPrev));
UT_sint32 iDiffCellx = iCellx - iPrev;
double dCellx = static_cast<double>(iDiffCellx)/1440.0 -dColSpace;
@@ -1377,7 +1377,7 @@
UT_sint32 iSub = 0;
for(i=0; !bFound && (i< static_cast<UT_sint32>(m_vecCellX.getItemCount())); i++)
{
- UT_sint32 icellx = reinterpret_cast<UT_sint32>(m_vecCellX.getNthItem(i));
+ UT_sint32 icellx = reinterpret_cast<long>(m_vecCellX.getNthItem(i));
if(icellx == -1)
{
iSub++;
diff -ur abiword-2.1.0.orig/abi/src/wp/impexp/xp/ie_exp_HTML.cpp abiword-2.1.0/abi/src/wp/impexp/xp/ie_exp_HTML.cpp
--- abiword-2.1.0.orig/abi/src/wp/impexp/xp/ie_exp_HTML.cpp 2003-12-13 13:48:05.000000000 -0800
+++ abiword-2.1.0/abi/src/wp/impexp/xp/ie_exp_HTML.cpp 2004-02-01 09:47:08.014511912 -0800
@@ -777,7 +777,7 @@
void * vptr = 0;
m_tagStack.pop (&vptr);
- if (reinterpret_cast<UT_uint32>(vptr) == tagID) return;
+ if (reinterpret_cast<unsigned long>(vptr) == tagID) return;
UT_DEBUGMSG(("WARNING: possible tag mis-match in XHTML output!\n"));
}
@@ -821,7 +821,7 @@
UT_uint32 s_HTML_Listener::tagTop ()
{
void * vptr = 0;
- if (m_tagStack.viewTop (&vptr)) return reinterpret_cast<UT_uint32>(vptr);
+ if (m_tagStack.viewTop (&vptr)) return reinterpret_cast<unsigned long>(vptr);
return 0;
}
@@ -1898,7 +1898,7 @@
{
void * vptr = 0;
m_utsListType.viewTop (&vptr);
- return static_cast<UT_uint16>(reinterpret_cast<UT_uint32>(vptr));
+ return static_cast<UT_uint16>(reinterpret_cast<unsigned long>(vptr));
}
void s_HTML_Listener::listPush (UT_uint16 type, const char * ClassName)
@@ -1937,7 +1937,7 @@
void * vptr = 0;
m_utsListType.pop (&vptr);
- UT_uint16 type = static_cast<UT_uint16>(reinterpret_cast<UT_uint32>(vptr));
+ UT_uint16 type = static_cast<UT_uint16>(reinterpret_cast<unsigned long>(vptr));
UT_uint32 tagID;
diff -ur abiword-2.1.0.orig/abi/src/wp/impexp/xp/ie_imp_RTF.cpp abiword-2.1.0/abi/src/wp/impexp/xp/ie_imp_RTF.cpp
--- abiword-2.1.0.orig/abi/src/wp/impexp/xp/ie_imp_RTF.cpp 2003-12-13 13:48:06.000000000 -0800
+++ abiword-2.1.0/abi/src/wp/impexp/xp/ie_imp_RTF.cpp 2004-02-01 09:48:42.195194272 -0800
@@ -1211,9 +1211,9 @@
m_iOverrideLevel = other.m_iOverrideLevel;
if(m_tabTypes.getItemCount() > 0)
{
- UT_uint32 dum = reinterpret_cast<UT_uint32>(m_tabTypes.getNthItem(0));
+ UT_uint32 dum = reinterpret_cast<unsigned long>(m_tabTypes.getNthItem(0));
m_curTabType = static_cast<eTabType>(dum);
- dum = reinterpret_cast<UT_uint32>(m_tabLeader.getNthItem(0));
+ dum = reinterpret_cast<unsigned long>(m_tabLeader.getNthItem(0));
m_curTabLeader = static_cast<eTabLeader>(dum);
}
else
@@ -2449,7 +2449,7 @@
{
if (colNum < m_colourTable.getItemCount())
{
- return reinterpret_cast<UT_uint32>(m_colourTable.getNthItem(colNum));
+ return reinterpret_cast<unsigned long>(m_colourTable.getNthItem(colNum));
}
else
{
@@ -2461,7 +2461,7 @@
{
if (colNum < m_colourTable.getItemCount())
{
- return reinterpret_cast<UT_sint32>(m_colourTable.getNthItem(colNum));
+ return reinterpret_cast<long>(m_colourTable.getNthItem(colNum));
}
else
{
@@ -6308,11 +6308,11 @@
if (i > 0)
propBuffer += ",";
- UT_sint32 tabTwips = reinterpret_cast<UT_sint32>(m_currentRTFState.m_paraProps.m_tabStops.getNthItem(i));
+ UT_sint32 tabTwips = reinterpret_cast<long>(m_currentRTFState.m_paraProps.m_tabStops.getNthItem(i));
double tabIn = tabTwips/(20.0*72.);
- UT_uint32 idum = reinterpret_cast<UT_uint32>(m_currentRTFState.m_paraProps.m_tabTypes.getNthItem(i));
+ UT_uint32 idum = reinterpret_cast<unsigned long>(m_currentRTFState.m_paraProps.m_tabTypes.getNthItem(i));
eTabType tabType = static_cast<eTabType>(idum);
- idum = reinterpret_cast<UT_uint32>((m_currentRTFState.m_paraProps.m_tabLeader.getNthItem(i)));
+ idum = reinterpret_cast<unsigned long>((m_currentRTFState.m_paraProps.m_tabLeader.getNthItem(i)));
eTabLeader tabLeader = static_cast<eTabLeader>(idum);
char cType = ' ';
switch(tabType)
@@ -9778,9 +9778,9 @@
if (i > 0)
strcat(propBuffer, ",");
- UT_sint32 tabTwips = reinterpret_cast<UT_sint32>(pParas->m_tabStops.getNthItem(i));
+ UT_sint32 tabTwips = reinterpret_cast<long>(pParas->m_tabStops.getNthItem(i));
double tabIn = tabTwips/(20.0*72.);
- UT_uint32 idum = reinterpret_cast<UT_uint32>(pParas->m_tabTypes.getNthItem(i));
+ UT_uint32 idum = reinterpret_cast<unsigned long>(pParas->m_tabTypes.getNthItem(i));
eTabType tabType = static_cast<eTabType>(idum);
idum = (UT_uint32) (pParas->m_tabLeader.getNthItem(i));
eTabLeader tabLeader = static_cast<eTabLeader>(idum);
--=-KYW1sa5Q7rjyPxbDosJt--
This archive was generated by hypermail 2.1.4 : Sun Feb 01 2004 - 13:30:49 EST