xref: /aoo41x/main/graphite/graphite-2.3.1.patch (revision a0e1cdbc)
1889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/include/graphite/GrCommon.h	Thu Jan 22 00:36:40 2009
2889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/include/graphite/GrCommon.h	Sat Aug 22 19:36:32 2009
3889cced1SEike Rathke@@ -18,6 +18,8 @@
4889cced1SEike Rathke #ifndef GRCOMMON_INCLUDED
5889cced1SEike Rathke #define GRCOMMON_INCLUDED
6889cced1SEike Rathke
7889cced1SEike Rathke+#define _SECURE_SCL 0	// to allow GlyphSetIterator to work, which points off the end of a vector
8889cced1SEike Rathke+#define _HAS_ITERATOR_DEBUGGING 0
9889cced1SEike Rathke
10889cced1SEike Rathke // Standard Headers.
11889cced1SEike Rathke
12889cced1SEike Rathke@@ -33,6 +35,7 @@
13889cced1SEike Rathke #include <vector>
14889cced1SEike Rathke #include <algorithm>
15889cced1SEike Rathke #include <string>
16889cced1SEike Rathke+///#include <stdexcept> -- possibly needed for std::string Xran and Xlen functions??
17889cced1SEike Rathke
18889cced1SEike Rathke // Uncomment this to allow multiple versions of gr to coexist
19889cced1SEike Rathke // in the same program e.g. pangographite with gtk uses namespace gr
20889cced1SEike Rathke@@ -41,7 +44,7 @@
21889cced1SEike Rathke // Provided the client includes GrClient.h first this #define is
22889cced1SEike Rathke // picked up by all files.
23889cced1SEike Rathke
24889cced1SEike Rathke-//#define gr gr2
25889cced1SEike Rathke+#define gr gr3ooo
26889cced1SEike Rathke
27889cced1SEike Rathke // Project headers
28889cced1SEike Rathke #include "GrPlatform.h"
29889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/include/graphite/GrMstypes.h	Thu Jan 22 00:36:40 2009
30889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/include/graphite/GrMstypes.h	Sat Aug 22 19:36:32 2009
31889cced1SEike Rathke@@ -24,11 +24,11 @@
32889cced1SEike Rathke
33889cced1SEike Rathke typedef signed long	    HRESULT;
34889cced1SEike Rathke
35889cced1SEike Rathke-inline const long InterlockedIncrement(long *const intr_lck) {
36889cced1SEike Rathke+inline long InterlockedIncrement(long *const intr_lck) {
37889cced1SEike Rathke 	return ++*intr_lck;
38889cced1SEike Rathke }
39889cced1SEike Rathke
40889cced1SEike Rathke-inline const long InterlockedDecrement(long *const intr_lck) {
41889cced1SEike Rathke+inline long InterlockedDecrement(long *const intr_lck) {
42889cced1SEike Rathke 	return --*intr_lck;
43889cced1SEike Rathke }
44889cced1SEike Rathke
45889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/makefile.vc7	Thu Aug 21 16:24:32 2008
46889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/makefile.vc7	Sat Aug 22 19:36:32 2009
47889cced1SEike Rathke@@ -48,11 +48,7 @@
48889cced1SEike Rathke CPP_DEBUG=/D "TRACING" $(CPP_DEBUG)
49889cced1SEike Rathke !ENDIF
50889cced1SEike Rathke
51889cced1SEike Rathke-!IF "$(OS)" == "Windows_NT"
52889cced1SEike Rathke NULL=
53889cced1SEike Rathke-!ELSE
54889cced1SEike Rathke-NULL=nul
55889cced1SEike Rathke-!ENDIF
56889cced1SEike Rathke
57889cced1SEike Rathke clean :
58889cced1SEike Rathke     @- rd /s/q .\release_temp
59889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/makefile.vc8	Sat Aug 22 21:58:25 2009
60889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/makefile.vc8	Sat Aug 22 21:57:42 2009
61889cced1SEike Rathke@@ -2,11 +2,16 @@
62889cced1SEike Rathke TARGET=graphite
63889cced1SEike Rathke
64889cced1SEike Rathke CPP=cl.exe
65889cced1SEike Rathke-CPPFLAGS=/Zc:wchar_t- /nologo /W4 /GR /EHsc /I "./src/font" /I "./src/painter" /I "./src/segment" /I "./src/textsource" /I "./src/generic" /I "./include/graphite" /I "../wrappers/win32" /D "GR_NAMESPACE" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /D "TRACING"  /Fp"$(INTDIR)\graphite.pch" /Fd"$(INTDIR)\\" /FD /c
66889cced1SEike Rathke+### HDU: disabled building with the normal compile flags
67889cced1SEike Rathke+###CPPFLAGS= /Zc:wchar_t- /nologo /W4 /GR /EHsc /I "./src/font" /I "./src/painter" /I "./src/segment" /I "./src/textsource" /I "./src/generic" /I "./include/graphite" /I "../wrappers/win32" /D "GR_NAMESPACE" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /D "TRACING"  /Fp"$(INTDIR)\graphite.pch" /Fd"$(INTDIR)\\" /FD /c
68889cced1SEike Rathke+### HDU: because for full binary compatibility with the rest of OOo all compile flags must match exactly
69889cced1SEike Rathke+###       which is especially true for template-heavy C++ code with non-default config (e.g. _STLP_DEBUG enabled)
70889cced1SEike Rathke+CPPFLAGS= $(CFLAGS4MSC) /nologo /W4 /I "./src/font" /I "./src/painter" /I "./src/segment" /I "./src/textsource" /I "./src/generic" /I "./include/graphite" /I "../wrappers/win32" /D "GR_NAMESPACE" /D "WIN32" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /D "TRACING"  /Fp"$(INTDIR)\graphite.pch" /FD /c
71889cced1SEike Rathke+
72889cced1SEike Rathke # /Wp62
73889cced1SEike Rathke
74889cced1SEike Rathke LINK=link.exe
75889cced1SEike Rathke-LINK_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /pdb:"$(OUTDIR)\\graphite.pdb" /machine:I386 /out:"$(OUTDIR)\\$(TARGET).dll" /implib:"$(OUTDIR)\\$(TARGET).lib"
76889cced1SEike Rathke+LINK_FLAGS=$(ADDLIBS) kernel32.lib user32.lib gdi32.lib winspool.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /pdb:"$(OUTDIR)\\graphite.pdb" /machine:I386 /out:"$(OUTDIR)\\$(TARGET).dll" /implib:"$(OUTDIR)\\$(TARGET).lib"
77889cced1SEike Rathke
78889cced1SEike Rathke BSC32=bscmake.exe
79889cced1SEike Rathke BSC32_FLAGS=/nologo /o"$(OUTDIR)\\$(TARGET).bsc"
80889cced1SEike Rathke@@ -24,21 +29,21 @@
81889cced1SEike Rathke SBREXT = .sbr
82889cced1SEike Rathke
83889cced1SEike Rathke !IF "$(CFG)" == "DEBUG"
84889cced1SEike Rathke-CPP_DEBUG=/D "DEBUG" /Gm /GR /ZI /Od /RTC1 /FR"$(INTDIR)\\" /$(MLIB)d
85889cced1SEike Rathke+CPP_DEBUG=/D "DEBUG" /Gm /GR /Od /RTC1 /FR"$(INTDIR)\\"
86889cced1SEike Rathke # CPP_DEBUG=/D "DEBUG" /Gm /GR /ZI /Od /RTC1 /FR"$(INTDIR)\\" /MDd
87889cced1SEike Rathke
88889cced1SEike Rathke OUTDIR=.\debug
89889cced1SEike Rathke INTDIR=.\debug_temp
90889cced1SEike Rathke-LINK_DEBUG= MSVCRTD.lib /debug /incremental:yes #/pdbtype:sept
91889cced1SEike Rathke+LINK_DEBUG= /debug
92889cced1SEike Rathke
93889cced1SEike Rathke all : lib lib_dll bsc
94889cced1SEike Rathke
95889cced1SEike Rathke !ELSE
96889cced1SEike Rathke-CPP_DEBUG=/D "NDEBUG" /O2 /$(MLIB)
97889cced1SEike Rathke+CPP_DEBUG=/D "NDEBUG" /O2
98889cced1SEike Rathke # CPP_DEBUG=/D "NDEBUG" /O2 /MD
99889cced1SEike Rathke OUTDIR=.\release
100889cced1SEike Rathke INTDIR=.\release_temp
101889cced1SEike Rathke-LINK_DEBUG= MSVCRT.lib /incremental:no /NODEFAULTLIB:libc
102889cced1SEike Rathke+LINK_DEBUG= /incremental:no /NODEFAULTLIB:libc
103889cced1SEike Rathke
104889cced1SEike Rathke all : lib lib_dll
105889cced1SEike Rathke
106889cced1SEike Rathke@@ -48,11 +53,7 @@
107889cced1SEike Rathke CPP_DEBUG=/D "TRACING" $(CPP_DEBUG)
108889cced1SEike Rathke !ENDIF
109889cced1SEike Rathke
110889cced1SEike Rathke-!IF "$(OS)" == "Windows_NT"
111889cced1SEike Rathke NULL=
112889cced1SEike Rathke-!ELSE
113889cced1SEike Rathke-NULL=nul
114889cced1SEike Rathke-!ENDIF
115889cced1SEike Rathke
116889cced1SEike Rathke clean :
117889cced1SEike Rathke     @- rd /s/q .\release_temp
118889cced1SEike Rathke@@ -779,7 +780,7 @@
119889cced1SEike Rathke 	@- $(CPP) $(CPPFLAGS) $(CPP_DEBUG) /Fo"$(INTDIR)\FileFont$(OBJEXT)" $?
120889cced1SEike Rathke
121889cced1SEike Rathke "$(INTDIR)\FileFont_dll$(OBJEXT)" : "src/font/FileFont.cpp"
122889cced1SEike Rathke-	@- $(CPP) $(CPPFLAGS) /D "_DLL" /Fo"$(INTDIR)\FileFont_dll$(OBJEXT)" $?
123889cced1SEike Rathke+	$(CPP) $(CPPFLAGS) /D "_DLL" /Fo"$(INTDIR)\FileFont_dll$(OBJEXT)" $?
124889cced1SEike Rathke
125889cced1SEike Rathke !ENDIF
126889cced1SEike Rathke
127889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/font/FileFont.cpp	Thu Jan 22 00:36:42 2009
128889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/font/FileFont.cpp	Sat Aug 22 19:36:32 2009
129889cced1SEike Rathke@@ -207,11 +207,11 @@
130889cced1SEike Rathke 				cch16 += cch16Used;
131889cced1SEike Rathke 			}
132889cced1SEike Rathke //		}
133889cced1SEike Rathke-#else
134889cced1SEike Rathke+#elif 1
135889cced1SEike Rathke 		m_stuFaceName.assign(rgchwFace);
136889cced1SEike Rathke-		// VS 2005 needs this:
137889cced1SEike Rathke-		//for (int cch16 = 0; cch16 < cchw; cch16++)
138889cced1SEike Rathke-		//	m_stuFaceName.push_back(rgchwFace[cch16]);
139889cced1SEike Rathke+#else	// VS 2005 needs this:
140889cced1SEike Rathke+		for (int cch16 = 0; cch16 < cchw; cch16++)
141889cced1SEike Rathke+			m_stuFaceName.push_back(rgchwFace[cch16]);
142889cced1SEike Rathke #endif
143889cced1SEike Rathke 		pTable = readTable(ktiHead, lSize);
144889cced1SEike Rathke 		if (!m_fIsValid || !pTable)
145889cced1SEike Rathke@@ -233,7 +233,7 @@
146889cced1SEike Rathke FileFont::readTable(int /*TableId*/ tid, size_t & size)
147889cced1SEike Rathke {
148889cced1SEike Rathke 	const TableId tableId = TableId(tid);
149889cced1SEike Rathke-	bool isValid = true;
150889cced1SEike Rathke+	bool isTableValid = true;
151889cced1SEike Rathke 	size_t lOffset = 0, lSize = 0;
152889cced1SEike Rathke 	if (!m_pTableCache)
153889cced1SEike Rathke 	{
154889cced1SEike Rathke@@ -245,9 +245,9 @@
155889cced1SEike Rathke 	size = m_pTableCache->getTableSize(tableId);
156889cced1SEike Rathke 	// check whether it is already in the cache
157889cced1SEike Rathke 	if (pTable) return pTable;
158889cced1SEike Rathke-	isValid &= TtfUtil::GetTableInfo(tableId, m_pHeader, m_pTableDir,
159889cced1SEike Rathke+	isTableValid &= TtfUtil::GetTableInfo(tableId, m_pHeader, m_pTableDir,
160889cced1SEike Rathke 			lOffset, lSize);
161889cced1SEike Rathke-	if (!isValid)
162889cced1SEike Rathke+	if (!isTableValid)
163889cced1SEike Rathke 		return NULL;
164889cced1SEike Rathke 	fseek(m_pfile, lOffset, SEEK_SET);
165889cced1SEike Rathke 	// only allocate if needed
166889cced1SEike Rathke@@ -255,16 +255,16 @@
167889cced1SEike Rathke
168889cced1SEike Rathke 	if (!pTable)
169889cced1SEike Rathke 	{
170889cced1SEike Rathke-		isValid = false;
171889cced1SEike Rathke+		isTableValid = false;
172889cced1SEike Rathke 		return NULL;
173889cced1SEike Rathke 	}
174889cced1SEike Rathke 	size_t bytesRead = fread(pTable, 1, lSize, m_pfile);
175889cced1SEike Rathke-	isValid = bytesRead == lSize;
176889cced1SEike Rathke-	if (isValid)
177889cced1SEike Rathke+	isTableValid = bytesRead == lSize;
178889cced1SEike Rathke+	if (isTableValid)
179889cced1SEike Rathke 	{
180889cced1SEike Rathke-		isValid &= TtfUtil::CheckTable(tableId, pTable, lSize);
181889cced1SEike Rathke+		isTableValid &= TtfUtil::CheckTable(tableId, pTable, lSize);
182889cced1SEike Rathke 	}
183889cced1SEike Rathke-	if (!isValid)
184889cced1SEike Rathke+	if (!isTableValid)
185889cced1SEike Rathke 	{
186889cced1SEike Rathke 		return 0;
187889cced1SEike Rathke 	}
188889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/font/Font.cpp	Tue May 20 08:04:16 2008
189889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/font/Font.cpp	Sat Aug 22 19:36:33 2009
190889cced1SEike Rathke@@ -626,7 +626,7 @@
191889cced1SEike Rathke 		Assert(false);
192889cced1SEike Rathke 		m_ifeat = m_cfeat;
193889cced1SEike Rathke 	}
194889cced1SEike Rathke-	else if (m_ifeat + n < 0)
195889cced1SEike Rathke+	else if (static_cast<int>(m_ifeat) + n < 0)
196889cced1SEike Rathke 	{
197889cced1SEike Rathke 		// Can't decrement.
198889cced1SEike Rathke 		Assert(false);
199889cced1SEike Rathke@@ -727,7 +727,7 @@
200889cced1SEike Rathke 		Assert(false);
201889cced1SEike Rathke 		m_ifset = m_cfset;
202889cced1SEike Rathke 	}
203889cced1SEike Rathke-	if (m_ifset + n < 0)
204889cced1SEike Rathke+	if (static_cast<int>(m_ifset) + n < 0)
205889cced1SEike Rathke 	{
206889cced1SEike Rathke 		// Can't decrement.
207889cced1SEike Rathke 		Assert(false);
208889cced1SEike Rathke@@ -820,7 +820,7 @@
209889cced1SEike Rathke 		Assert(false);
210889cced1SEike Rathke 		m_ilang = m_clang;
211889cced1SEike Rathke 	}
212889cced1SEike Rathke-	else if (m_ilang + n < 0)
213889cced1SEike Rathke+	else if (static_cast<int>(m_ilang) + n < 0)
214889cced1SEike Rathke 	{
215889cced1SEike Rathke 		// Can't decrement.
216889cced1SEike Rathke 		Assert(false);
217889cced1SEike Rathke@@ -906,7 +906,7 @@
218889cced1SEike Rathke 		Assert(false);
219889cced1SEike Rathke 		m_ilang = m_clang;
220889cced1SEike Rathke 	}
221889cced1SEike Rathke-	else if (m_ilang + n < 0)
222889cced1SEike Rathke+	else if (static_cast<int>(m_ilang) + n < 0)
223889cced1SEike Rathke 	{
224889cced1SEike Rathke 		// Can't decrement.
225889cced1SEike Rathke 		Assert(false);
226889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/font/TtfUtil.cpp	Thu Jan 29 10:33:19 2009
227889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/font/TtfUtil.cpp	Sat Aug 22 19:36:33 2009
228889cced1SEike Rathke@@ -492,7 +492,7 @@
229889cced1SEike Rathke 	const Sfnt::FontHeader * pTable =
230889cced1SEike Rathke 			reinterpret_cast<const Sfnt::FontHeader *>(pHead);
231889cced1SEike Rathke
232889cced1SEike Rathke-	return read(((pTable->mac_style) & 0x00000002) != 0);
233889cced1SEike Rathke+	return ((read(pTable->mac_style) & 0x00000002) != 0);
234889cced1SEike Rathke }
235889cced1SEike Rathke
236889cced1SEike Rathke /*----------------------------------------------------------------------------------------------
237889cced1SEike Rathke@@ -1108,8 +1108,8 @@
238889cced1SEike Rathke 	{ // loca entries are two bytes and have been divided by two
239889cced1SEike Rathke 		if (nGlyphId <= (lLocaSize >> 1) - 1) // allow sentinel value to be accessed
240889cced1SEike Rathke 		{
241889cced1SEike Rathke-			const uint16 * pTable = reinterpret_cast<const uint16 *>(pLoca);
242889cced1SEike Rathke-			return (read(pTable[nGlyphId]) << 1);
243889cced1SEike Rathke+			const uint16 * pTableLoca = reinterpret_cast<const uint16 *>(pLoca);
244889cced1SEike Rathke+			return (read(pTableLoca[nGlyphId]) << 1);
245889cced1SEike Rathke 		}
246889cced1SEike Rathke 	}
247889cced1SEike Rathke
248889cced1SEike Rathke@@ -1117,8 +1117,8 @@
249889cced1SEike Rathke 	{ // loca entries are four bytes
250889cced1SEike Rathke 		if (nGlyphId <= (lLocaSize >> 2) - 1)
251889cced1SEike Rathke 		{
252889cced1SEike Rathke-			const uint32 * pTable = reinterpret_cast<const uint32 *>(pLoca);
253889cced1SEike Rathke-			return read(pTable[nGlyphId]);
254889cced1SEike Rathke+			const uint32 * pTableLoca = reinterpret_cast<const uint32 *>(pLoca);
255889cced1SEike Rathke+			return read(pTableLoca[nGlyphId]);
256889cced1SEike Rathke 		}
257889cced1SEike Rathke 	}
258889cced1SEike Rathke
259889cced1SEike Rathke@@ -1586,7 +1586,7 @@
260889cced1SEike Rathke
261889cced1SEike Rathke 	for (size_t i = 0; i < cCompId; i++)
262889cced1SEike Rathke 	{
263889cced1SEike Rathke-		void * pSimpleGlyf = GlyfLookup(static_cast<gr::gid16>(rgnCompId[i]),
264889cced1SEike Rathke+		pSimpleGlyf = GlyfLookup(static_cast<gr::gid16>(rgnCompId[i]),
265889cced1SEike Rathke 										pGlyf, pLoca, lLocaSize, pHead);
266889cced1SEike Rathke 		if (pSimpleGlyf == NULL) {return false;}
267889cced1SEike Rathke
268889cced1SEike Rathke@@ -1748,7 +1748,7 @@
269889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
270889cced1SEike Rathke bool GlyfPoints(gr::gid16 nGlyphId, const void * pGlyf,
271889cced1SEike Rathke 		const void * pLoca, size_t lLocaSize, const void * pHead,
272889cced1SEike Rathke-		const int * prgnContourEndPoint, size_t cnEndPoints,
273889cced1SEike Rathke+		const int * /*prgnContourEndPoint*/, size_t /*cnEndPoints*/,
274889cced1SEike Rathke 		int * prgnX, int * prgnY, bool * prgfOnCurve, size_t cnPoints)
275889cced1SEike Rathke {
276889cced1SEike Rathke 	std::fill_n(prgnX, cnPoints, INT_MAX);
277889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/painter/SegmentPainter.cpp	Wed Jan 28 04:01:29 2009
278889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/painter/SegmentPainter.cpp	Sat Aug 22 19:36:33 2009
279889cced1SEike Rathke@@ -353,7 +353,7 @@
280889cced1SEike Rathke 	@param bOn				- true if we are turning on (ignored in this implementation)
281889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
282889cced1SEike Rathke bool SegmentPainter::drawSelectionRange(int ichwAnchor, int ichwEnd,
283889cced1SEike Rathke-	float ydLineTop, float ydLineBottom, bool bOn)
284889cced1SEike Rathke+	float ydLineTop, float ydLineBottom, bool /*bOn*/)
285889cced1SEike Rathke {
286889cced1SEike Rathke 	if (g_fDrawing)
287889cced1SEike Rathke 		return true;
288889cced1SEike Rathke@@ -993,7 +993,7 @@
289889cced1SEike Rathke 								an I-beam (std selection)
290889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
291889cced1SEike Rathke void SegmentPainter::CalcOrDrawInsertionPoint(
292889cced1SEike Rathke-	int ichwIP, bool fAssocPrev, bool bOn, bool fForceSplit,
293889cced1SEike Rathke+	int ichwIP, bool fAssocPrev, bool /*bOn*/, bool fForceSplit,
294889cced1SEike Rathke 	Rect * prdPrimary, Rect * prdSecondary)
295889cced1SEike Rathke {
296889cced1SEike Rathke 	GrResult res = kresOk;
297889cced1SEike Rathke@@ -1277,7 +1277,7 @@
298889cced1SEike Rathke 							if NULL, do the drawing
299889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
300889cced1SEike Rathke void SegmentPainter::InvertIBeam(float xs, float ysTop, float ysBottom,
301889cced1SEike Rathke-	bool fAssocPrev, Rect * prdRet)
302889cced1SEike Rathke+	bool /*fAssocPrev*/, Rect * prdRet)
303889cced1SEike Rathke {
304889cced1SEike Rathke 	float xd = ScaleXToDest(xs);
305889cced1SEike Rathke 	float ydTop = ScaleYToDest(ysTop);
306889cced1SEike Rathke@@ -1675,7 +1675,7 @@
307889cced1SEike Rathke }
308889cced1SEike Rathke
309889cced1SEike Rathke bool SegmentPainter::AtEdgeOfCluster(GrSlotOutput * psloutBase, int isloutBase,
310889cced1SEike Rathke-	GrSlotOutput * pslout, int islout, bool fBefore)
311889cced1SEike Rathke+	GrSlotOutput * /*pslout*/, int islout, bool fBefore)
312889cced1SEike Rathke {
313889cced1SEike Rathke 	//	Compare pslout to all the members of the cluster. If it is the minimum or maximum, it
314889cced1SEike Rathke 	//	is at an edge.
315889cced1SEike Rathke@@ -1778,12 +1778,12 @@
316889cced1SEike Rathke 			}
317889cced1SEike Rathke 			for (icomp = 0; icomp < pslout->NumberOfComponents(); icomp++)
318889cced1SEike Rathke 			{
319889cced1SEike Rathke-				for (int ichw = pslout->FirstUnderlyingComponent(icomp) ;
320889cced1SEike Rathke-					ichw <= pslout->LastUnderlyingComponent(icomp) ;
321889cced1SEike Rathke-					ichw++)
322889cced1SEike Rathke+				for (int ichwTemp = pslout->FirstUnderlyingComponent(icomp) ;
323889cced1SEike Rathke+					ichwTemp <= pslout->LastUnderlyingComponent(icomp) ;
324889cced1SEike Rathke+					ichwTemp++)
325889cced1SEike Rathke 				{
326889cced1SEike Rathke-					if (m_pseg->m_prgiComponent[ichw - m_pseg->m_ichwAssocsMin] == icomp)
327889cced1SEike Rathke-						prgfAllSelected[ichw] = fAll;
328889cced1SEike Rathke+					if (m_pseg->m_prgiComponent[ichwTemp - m_pseg->m_ichwAssocsMin] == icomp)
329889cced1SEike Rathke+						prgfAllSelected[ichwTemp] = fAll;
330889cced1SEike Rathke 				}
331889cced1SEike Rathke 			}
332889cced1SEike Rathke 		}
333889cced1SEike Rathke@@ -2304,7 +2304,11 @@
334889cced1SEike Rathke 	Assert that there are no overlaps among all the rectangles in the array, which should
335889cced1SEike Rathke 	be the case if AdjustRectsToNotOverlap is working properly.
336889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
337889cced1SEike Rathke+#ifdef _DEBUG
338889cced1SEike Rathke void SegmentPainter::AssertNoOverlaps(std::vector<Rect> & vrect)
339889cced1SEike Rathke+#else
340889cced1SEike Rathke+void SegmentPainter::AssertNoOverlaps(std::vector<Rect> & /*vrect*/)
341889cced1SEike Rathke+#endif
342889cced1SEike Rathke {
343889cced1SEike Rathke #ifdef _DEBUG
344889cced1SEike Rathke 	for (int irect1 = 0; irect1 < signed(vrect.size() - 1); irect1++)
345889cced1SEike Rathke@@ -2452,7 +2456,11 @@
346889cced1SEike Rathke 	Assert that there are no overlaps among all the rectangles in the array, which should
347889cced1SEike Rathke 	be the case if AdjustRectsToNotOverlap is working properly.
348889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
349889cced1SEike Rathke+#ifdef _DEBUG
350889cced1SEike Rathke void SegmentPainter::AssertNoOverlaps(std::vector<LineSeg> & vls)
351889cced1SEike Rathke+#else
352889cced1SEike Rathke+void SegmentPainter::AssertNoOverlaps(std::vector<LineSeg> & /*vls*/)
353889cced1SEike Rathke+#endif
354889cced1SEike Rathke {
355889cced1SEike Rathke #ifdef _DEBUG
356889cced1SEike Rathke 	for (int ils1 = 0; ils1 < (int)vls.size() - 1; ils1++)
357889cced1SEike Rathke@@ -2884,7 +2892,7 @@
358889cced1SEike Rathke 	{
359889cced1SEike Rathke 		if (icompNext != icompCurr)
360889cced1SEike Rathke 		{
361889cced1SEike Rathke-			float xsHorizNext = (fIPOnRight) ? vxsRights[icompNext] : vxsLefts[icompNext];
362889cced1SEike Rathke+			xsHorizNext = (fIPOnRight) ? vxsRights[icompNext] : vxsLefts[icompNext];
363889cced1SEike Rathke 			if (fMovingRight && xsHorizNext > xsHorizCurr)
364889cced1SEike Rathke 				break;
365889cced1SEike Rathke 			else if (!fMovingRight && xsHorizNext < xsHorizCurr)
366889cced1SEike Rathke@@ -2996,7 +3004,7 @@
367889cced1SEike Rathke /*----------------------------------------------------------------------------------------------
368889cced1SEike Rathke 	Make sure the font is set to use the character properties required by this segment.
369889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
370889cced1SEike Rathke-void SegmentPainter::SetFontProps(unsigned long clrFore, unsigned long clrBack)
371889cced1SEike Rathke+void SegmentPainter::SetFontProps(unsigned long /*clrFore*/, unsigned long /*clrBack*/)
372889cced1SEike Rathke {
373889cced1SEike Rathke 	return;
374889cced1SEike Rathke }
375889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/FileInput.cpp	Thu Jan 22 00:36:42 2009
376889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/FileInput.cpp	Sat Aug 22 19:36:33 2009
377889cced1SEike Rathke@@ -80,7 +80,7 @@
378889cced1SEike Rathke #ifdef GR_FW
379889cced1SEike Rathke bool GrBufferIStream::Open(std::wstring stuFileName, int kMode)
380889cced1SEike Rathke #else
381889cced1SEike Rathke-bool GrBufferIStream::Open(const char * pcFileName, std::ios::openmode kMode)
382889cced1SEike Rathke+bool GrBufferIStream::Open(const char * /*pcFileName*/, std::ios::openmode /*kMode*/)
383889cced1SEike Rathke #endif
384889cced1SEike Rathke {
385889cced1SEike Rathke 	Assert(false); // use OpenBuffer
386889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrCharStream.cpp	Thu Jan 22 00:36:42 2009
387889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrCharStream.cpp	Sat Aug 22 19:36:33 2009
388889cced1SEike Rathke@@ -417,8 +417,11 @@
389889cced1SEike Rathke 	return true;
390889cced1SEike Rathke */
391889cced1SEike Rathke }
392889cced1SEike Rathke-
393889cced1SEike Rathke+#ifdef NDEBUG
394889cced1SEike Rathke+bool GrCharStream::AtUnicodeCharBoundary(utf8 * prgchs, int cchs, int ichs, UtfType /*utf*/)
395889cced1SEike Rathke+#else
396889cced1SEike Rathke bool GrCharStream::AtUnicodeCharBoundary(utf8 * prgchs, int cchs, int ichs, UtfType utf)
397889cced1SEike Rathke+#endif
398889cced1SEike Rathke {
399889cced1SEike Rathke 	Assert(ichs >= 0);
400889cced1SEike Rathke 	Assert(ichs <= cchs);
401889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrClassTable.h	Thu Jan 22 00:36:42 2009
402889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrClassTable.h	Sat Aug 22 19:36:33 2009
403889cced1SEike Rathke@@ -54,7 +54,11 @@
404889cced1SEike Rathke 	/*------------------------------------------------------------------------------------------
405889cced1SEike Rathke 		Copy the raw memory into the instance.
406889cced1SEike Rathke 	------------------------------------------------------------------------------------------*/
407889cced1SEike Rathke+#ifdef NDEBUG
408889cced1SEike Rathke+	void CopyFrom(data16 * pchwStart, int /*cchw*/)
409889cced1SEike Rathke+#else
410889cced1SEike Rathke 	void CopyFrom(data16 * pchwStart, int cchw)
411889cced1SEike Rathke+#endif
412889cced1SEike Rathke 	{
413889cced1SEike Rathke 		m_cgixBIG = pchwStart[0];
414889cced1SEike Rathke 		m_digixBIGInit = pchwStart[1];
415889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrEngine.cpp	Wed Jan 28 04:01:29 2009
416889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrEngine.cpp	Sat Aug 22 19:36:33 2009
417889cced1SEike Rathke@@ -159,12 +159,12 @@
418889cced1SEike Rathke GrEngine::~GrEngine()
419889cced1SEike Rathke {
420889cced1SEike Rathke 	DestroyEverything();
421889cced1SEike Rathke-	#ifdef _MSC_VER
422889cced1SEike Rathke-	if (!_CrtCheckMemory())
423889cced1SEike Rathke-	{
424889cced1SEike Rathke-		OutputDebugString(L"bad memory");
425889cced1SEike Rathke-	}
426889cced1SEike Rathke-	#endif
427889cced1SEike Rathke+//	#ifdef _MSC_VER
428889cced1SEike Rathke+//	if (!_CrtCheckMemory())
429889cced1SEike Rathke+//	{
430889cced1SEike Rathke+//		OutputDebugString(L"bad memory");
431889cced1SEike Rathke+//	}
432889cced1SEike Rathke+//	#endif
433889cced1SEike Rathke }
434889cced1SEike Rathke
435889cced1SEike Rathke /*----------------------------------------------------------------------------------------------
436889cced1SEike Rathke@@ -173,12 +173,12 @@
437889cced1SEike Rathke void GrEngine::DestroyEverything()
438889cced1SEike Rathke {
439889cced1SEike Rathke 	DestroyContents();
440889cced1SEike Rathke-	#ifdef _MSC_VER
441889cced1SEike Rathke-	if (!_CrtCheckMemory())
442889cced1SEike Rathke-	{
443889cced1SEike Rathke-		OutputDebugString(L"bad memory");
444889cced1SEike Rathke-	}
445889cced1SEike Rathke-	#endif
446889cced1SEike Rathke+//	#ifdef _MSC_VER
447889cced1SEike Rathke+//	if (!_CrtCheckMemory())
448889cced1SEike Rathke+//	{
449889cced1SEike Rathke+//		OutputDebugString(L"bad memory");
450889cced1SEike Rathke+//	}
451889cced1SEike Rathke+//	#endif
452889cced1SEike Rathke
453889cced1SEike Rathke 	m_strCtrlFileReg.erase();
454889cced1SEike Rathke 	m_strCtrlFileBold.erase();
455889cced1SEike Rathke@@ -417,7 +417,11 @@
456889cced1SEike Rathke 	@return The supported script direction(s). If more than one, the application is
457889cced1SEike Rathke 	responsible for choosing the most appropriate.
458889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
459889cced1SEike Rathke+#ifdef NDEBUG
460889cced1SEike Rathke+GrResult GrEngine::get_ScriptDirection(unsigned int * pgrfsdc, OLECHAR * /*prgchwErrMsg*/, int /*cchMaxErrMsg*/)
461889cced1SEike Rathke+#else
462889cced1SEike Rathke GrResult GrEngine::get_ScriptDirection(unsigned int * pgrfsdc, OLECHAR * prgchwErrMsg, int cchMaxErrMsg)
463889cced1SEike Rathke+#endif
464889cced1SEike Rathke {
465889cced1SEike Rathke 	ChkGrOutPtr(pgrfsdc);
466889cced1SEike Rathke 	ChkGrArrayArg(prgchwErrMsg, cchMaxErrMsg);
467889cced1SEike Rathke@@ -789,7 +793,7 @@
468889cced1SEike Rathke 	Record a system error indicating a bad error in rendering using a supposedly valid font.
469889cced1SEike Rathke 	OBSOLETE
470889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
471889cced1SEike Rathke-void GrEngine::RecordFontRunError(OLECHAR * prgchwErrMsg, int cchMax, GrResult res)
472889cced1SEike Rathke+void GrEngine::RecordFontRunError(OLECHAR * prgchwErrMsg, int cchMax, GrResult /*res*/)
473889cced1SEike Rathke {
474889cced1SEike Rathke 	if (prgchwErrMsg == NULL || cchMax == 0)
475889cced1SEike Rathke 		return;
476889cced1SEike Rathke@@ -970,7 +974,7 @@
477889cced1SEike Rathke /*----------------------------------------------------------------------------------------------
478889cced1SEike Rathke 	Return whether the text is asking for bold and/or italic text.
479889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
480889cced1SEike Rathke-void GrEngine::GetStyles(Font * pfont, int ichwMin, bool * pfBold, bool * pfItalic)
481889cced1SEike Rathke+void GrEngine::GetStyles(Font * pfont, int /*ichwMin*/, bool * pfBold, bool * pfItalic)
482889cced1SEike Rathke {
483889cced1SEike Rathke 	*pfBold = pfont->bold();
484889cced1SEike Rathke 	*pfItalic = pfont->italic();
485889cced1SEike Rathke@@ -981,7 +985,11 @@
486889cced1SEike Rathke 	Should only be called when we know we are using a base font, or when we are reading
487889cced1SEike Rathke 	the base font to see if it is valid.
488889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
489889cced1SEike Rathke+#ifdef NDEBUG
490889cced1SEike Rathke+void GrEngine::SwitchGraphicsFont(bool /*fBase*/)
491889cced1SEike Rathke+#else
492889cced1SEike Rathke void GrEngine::SwitchGraphicsFont(bool fBase)
493889cced1SEike Rathke+#endif
494889cced1SEike Rathke {
495889cced1SEike Rathke 	Assert(!fBase || m_stuBaseFaceName.size() > 0);
496889cced1SEike Rathke
497889cced1SEike Rathke@@ -1135,7 +1143,7 @@
498889cced1SEike Rathke 		m_chwJShrink0 = 0xffff;
499889cced1SEike Rathke 		m_chwJStep0 = 0xffff;
500889cced1SEike Rathke 		m_chwJWeight0 = 0xffff;
501889cced1SEike Rathke-		for (int i = 0; i < m_cJLevels; i++)
502889cced1SEike Rathke+		for (i = 0; i < m_cJLevels; i++)
503889cced1SEike Rathke 		{
504889cced1SEike Rathke 			//	justification glyph attribute IDs
505889cced1SEike Rathke 			bTmp = grstrm.ReadByteFromFont();
506889cced1SEike Rathke@@ -1210,10 +1218,12 @@
507889cced1SEike Rathke
508889cced1SEike Rathke 	//	rendering behaviors--ignore for now
509889cced1SEike Rathke 	byte cBehaviors = grstrm.ReadByteFromFont();
510889cced1SEike Rathke-	unsigned int nBehaviors[kMaxRenderingBehavior];
511889cced1SEike Rathke+	int nTmp;
512889cced1SEike Rathke+	//unsigned int nBehaviors[kMaxRenderingBehavior]; -- this big buffer causes a stack overflow in Multiscribe; rework eventually
513889cced1SEike Rathke 	for (i = 0; i < cBehaviors; i++)
514889cced1SEike Rathke 	{
515889cced1SEike Rathke-		nBehaviors[i] = unsigned(grstrm.ReadIntFromFont());
516889cced1SEike Rathke+		//nBehaviors[i] = unsigned(grstrm.ReadIntFromFont());
517889cced1SEike Rathke+		nTmp = unsigned(grstrm.ReadIntFromFont());
518889cced1SEike Rathke 	}
519889cced1SEike Rathke
520889cced1SEike Rathke 	//	linebreak glyph ID
521889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrFSM.cpp	Thu Jan 22 00:36:42 2009
522889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrFSM.cpp	Sat Aug 22 19:36:33 2009
523889cced1SEike Rathke@@ -46,7 +46,7 @@
524889cced1SEike Rathke 	Fill in the FSM by reading from the font stream.
525889cced1SEike Rathke 	Assumes the stream is in the correct position.
526889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
527889cced1SEike Rathke-bool GrFSM::ReadFromFont(GrIStream & grstrm, int fxdVersion)
528889cced1SEike Rathke+bool GrFSM::ReadFromFont(GrIStream & grstrm, int /*fxdVersion*/)
529889cced1SEike Rathke {
530889cced1SEike Rathke 	short snTmp;
531889cced1SEike Rathke
532889cced1SEike Rathke@@ -138,7 +138,7 @@
533889cced1SEike Rathke 	Fill in the FSM's state table by reading from the font stream.
534889cced1SEike Rathke 	Assumes the stream is in the correct position.
535889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
536889cced1SEike Rathke-bool GrFSM::ReadStateTableFromFont(GrIStream & grstrm, int fxdVersion)
537889cced1SEike Rathke+bool GrFSM::ReadStateTableFromFont(GrIStream & grstrm, int /*fxdVersion*/)
538889cced1SEike Rathke {
539889cced1SEike Rathke 	int cCells = ((m_crow - m_crowFinal) * m_ccol);
540889cced1SEike Rathke 	m_prgrowTransitions = new short[cCells];
541889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrFeature.cpp	Thu Jan 22 00:36:42 2009
542889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrFeature.cpp	Sat Aug 22 19:36:33 2009
543889cced1SEike Rathke@@ -186,7 +186,7 @@
544889cced1SEike Rathke /*----------------------------------------------------------------------------------------------
545889cced1SEike Rathke 	Read the languages from the font.
546889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
547889cced1SEike Rathke-bool GrLangTable::ReadFromFont(GrIStream * pgrstrm, int fxdVersion)
548889cced1SEike Rathke+bool GrLangTable::ReadFromFont(GrIStream * pgrstrm, int /*fxdVersion*/)
549889cced1SEike Rathke {
550889cced1SEike Rathke 	GrIStream & grstrm = *pgrstrm;
551889cced1SEike Rathke
552889cced1SEike Rathke@@ -206,13 +206,22 @@
553889cced1SEike Rathke
554889cced1SEike Rathke 	m_cbOffset0 = (lsbf)(m_prglang[0].cbOffsetBIG);
555889cced1SEike Rathke
556889cced1SEike Rathke-	Assert((lsbf)(m_prglang[m_clang].cFeaturesBIG) == 0); // bogus entry has no settings
557889cced1SEike Rathke+	if ((lsbf)(m_prglang[m_clang].cFeaturesBIG) == 0) // bogus entry has no settings
558889cced1SEike Rathke+	{
559889cced1SEike Rathke 	cb = (lsbf)(m_prglang[m_clang].cbOffsetBIG) - m_cbOffset0;
560889cced1SEike Rathke-	Assert(cb % sizeof(FeatSet) == 0); // # of bytes fits nicely into FeatSet class
561889cced1SEike Rathke+		if (cb % sizeof(FeatSet) == 0) // # of bytes fits nicely into FeatSet class
562889cced1SEike Rathke+		{
563889cced1SEike Rathke 	int cfset = cb / sizeof(FeatSet);
564889cced1SEike Rathke 	m_prgfset = new FeatSet[cfset];
565889cced1SEike Rathke 	m_cfset = cfset;
566889cced1SEike Rathke 	grstrm.ReadBlockFromFont(m_prgfset, cb);
567889cced1SEike Rathke+		}
568889cced1SEike Rathke+		else return false;
569889cced1SEike Rathke+	}
570889cced1SEike Rathke+	else
571889cced1SEike Rathke+	{
572889cced1SEike Rathke+		return false;
573889cced1SEike Rathke+	}
574889cced1SEike Rathke
575889cced1SEike Rathke 	return true;
576889cced1SEike Rathke }
577889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrPass.cpp	Wed Jan 28 04:01:29 2009
578889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrPass.cpp	Sat Aug 22 19:36:34 2009
579889cced1SEike Rathke@@ -279,9 +279,10 @@
580889cced1SEike Rathke 	@param twsh					- how we are handling trailing white-space
581889cced1SEike Rathke 	@param pnRet				- return value
582889cced1SEike Rathke 	@param pcslotGot			- return the number of slots gotten
583889cced1SEike Rathke-	@param pislotFinalBreak		- return the index of the final slot, when we are removing
584889cced1SEike Rathke-									the trailing white-space and so the end of the segment
585889cced1SEike Rathke-									will be before the any actual line-break slot
586889cced1SEike Rathke+	@param pislotFinalBreak		- index of the final slot (LB or actual glyph), or -1;
587889cced1SEike Rathke+									adjusted when we are removing the trailing white-space and
588889cced1SEike Rathke+									so the end of the segment will be before the any actual
589889cced1SEike Rathke+									line-break slot
590889cced1SEike Rathke
591889cced1SEike Rathke 	@return kNextPass if we were able to generated the number requested, or processing is
592889cced1SEike Rathke 		complete; otherwise return the number of slots needed from the previous pass.
593889cced1SEike Rathke@@ -465,7 +466,7 @@
594889cced1SEike Rathke void GrBidiPass::ExtendOutput(GrTableManager * ptman,
595889cced1SEike Rathke 	GrSlotStream* psstrmIn, GrSlotStream* psstrmOut,
596889cced1SEike Rathke 	int cslotNeededByNext, TrWsHandling twsh,
597889cced1SEike Rathke-	int * pnRet, int * pcslotGot, int * pislotFinalBreak)
598889cced1SEike Rathke+	int * pnRet, int * pcslotGot, int * /*pislotFinalBreak*/)
599889cced1SEike Rathke {
600889cced1SEike Rathke 	Assert(psstrmIn->SlotsToReprocess() == 0);
601889cced1SEike Rathke
602889cced1SEike Rathke@@ -776,7 +777,7 @@
603889cced1SEike Rathke int GrPass::ExtendFinalOutput(GrTableManager * ptman,
604889cced1SEike Rathke 	GrSlotStream * psstrmInput, GrSlotStream * psstrmOutput,
605889cced1SEike Rathke 	float xsSpaceAllotted, bool fWidthIsCharCount, bool fInfiniteWidth,
606889cced1SEike Rathke-	bool fHaveLineBreak, bool fMustBacktrack, LineBrk lbMax, TrWsHandling twsh,
607889cced1SEike Rathke+	bool fHaveLineBreak, bool fMustBacktrack, LineBrk /*lbMax*/, TrWsHandling twsh,
608889cced1SEike Rathke 	int * pislotLB, float * pxsWidth)
609889cced1SEike Rathke {
610889cced1SEike Rathke 	EngineState * pengst = ptman->State();
611889cced1SEike Rathke@@ -897,7 +898,11 @@
612889cced1SEike Rathke 	Remove undesirable trailing white-space.
613889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
614889cced1SEike Rathke int GrPass::RemoveTrailingWhiteSpace(GrTableManager * ptman, GrSlotStream * psstrmOut,
615889cced1SEike Rathke+#ifdef NDEBUG
616889cced1SEike Rathke+	TrWsHandling /*twsh*/, int * pislotFinalBreak)
617889cced1SEike Rathke+#else
618889cced1SEike Rathke 	TrWsHandling twsh, int * pislotFinalBreak)
619889cced1SEike Rathke+#endif
620889cced1SEike Rathke {
621889cced1SEike Rathke 	EngineState * pengst = ptman->State();
622889cced1SEike Rathke
623889cced1SEike Rathke@@ -944,7 +949,7 @@
624889cced1SEike Rathke 	should never be necessary if they've set up their tables right.
625889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
626889cced1SEike Rathke void GrPass::CheckInputProgress(GrSlotStream * psstrmInput, GrSlotStream * psstrmOutput,
627889cced1SEike Rathke-	int islotOrigInput)
628889cced1SEike Rathke+	int /*islotOrigInput*/)
629889cced1SEike Rathke {
630889cced1SEike Rathke 	int islotInput = psstrmInput->ReadPosForNextGet();
631889cced1SEike Rathke //	Assert(islotInput >= islotOrigInput); -- no longer true now that we can back up
632889cced1SEike Rathke@@ -1752,7 +1757,7 @@
633889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
634889cced1SEike Rathke int GrPass::Unwind(GrTableManager * ptman,
635889cced1SEike Rathke 	int islotChanged, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut,
636889cced1SEike Rathke-	bool fFirst)
637889cced1SEike Rathke+	bool /*fFirst*/)
638889cced1SEike Rathke {
639889cced1SEike Rathke 	//	Back up the number of slots required for the longest rule context,
640889cced1SEike Rathke 	//	but if we land in the middle of a chunk, go forward to its boundary.
641889cced1SEike Rathke@@ -1824,7 +1829,7 @@
642889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
643889cced1SEike Rathke int GrBidiPass::Unwind(GrTableManager * ptman,
644889cced1SEike Rathke 	int islotChanged, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut,
645889cced1SEike Rathke-	bool fFirst)
646889cced1SEike Rathke+	bool /*fFirst*/)
647889cced1SEike Rathke {
648889cced1SEike Rathke 	int islotIn;
649889cced1SEike Rathke 	int islotOut;
650889cced1SEike Rathke@@ -1901,8 +1906,8 @@
651889cced1SEike Rathke 	OBSOLETE
652889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
653889cced1SEike Rathke //:Ignore
654889cced1SEike Rathke-void GrPosPass::Unattach(GrSlotStream * psstrmIn, int islotIn,
655889cced1SEike Rathke-	GrSlotStream * psstrmOut, int islotOut, int islotLB)
656889cced1SEike Rathke+void GrPosPass::Unattach(GrSlotStream * /*psstrmIn*/, int /*islotIn*/,
657889cced1SEike Rathke+	GrSlotStream * /*psstrmOut*/, int /*islotOut*/, int /*islotLB*/)
658889cced1SEike Rathke {
659889cced1SEike Rathke 	//	Because this is a positioning pass, there is a one-to-one correspondence between
660889cced1SEike Rathke 	//	the slots in the input and the slots in the output. Thus we can make simplifying
661889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrPass.h	Thu Aug 21 16:24:32 2008
662889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrPass.h	Sat Aug 22 19:36:34 2009
663889cced1SEike Rathke@@ -197,7 +197,7 @@
664889cced1SEike Rathke 	bool ReadFromFont(GrIStream & grstrm, int fxdSilfVersion, int fxdRuleVersion, int nOffset);
665889cced1SEike Rathke 	void InitializeWithNoRules();
666889cced1SEike Rathke
667889cced1SEike Rathke-	virtual void SetTopDirLevel(int n)
668889cced1SEike Rathke+	virtual void SetTopDirLevel(int /*n*/)
669889cced1SEike Rathke 	{	// only GrBidiPass does anything interesting
670889cced1SEike Rathke 	}
671889cced1SEike Rathke
672889cced1SEike Rathke@@ -253,13 +253,13 @@
673889cced1SEike Rathke 		m_pzpst->SetResyncSkip(n);
674889cced1SEike Rathke 	}
675889cced1SEike Rathke
676889cced1SEike Rathke-	virtual void DoCleanUpSegMin(GrTableManager * ptman,
677889cced1SEike Rathke-		GrSlotStream * psstrmIn, int islotInitReadPos, GrSlotStream * psstrmOut)
678889cced1SEike Rathke+	virtual void DoCleanUpSegMin(GrTableManager * /*ptman*/,
679889cced1SEike Rathke+		GrSlotStream * /*psstrmIn*/, int /*islotInitReadPos*/, GrSlotStream * /*psstrmOut*/)
680889cced1SEike Rathke 	{
681889cced1SEike Rathke 	}
682889cced1SEike Rathke
683889cced1SEike Rathke-	virtual void DoCleanUpSegLim(GrTableManager * ptman, GrSlotStream * psstrmOut,
684889cced1SEike Rathke-		TrWsHandling twsh)
685889cced1SEike Rathke+	virtual void DoCleanUpSegLim(GrTableManager * /*ptman*/, GrSlotStream * /*psstrmOut*/,
686889cced1SEike Rathke+		TrWsHandling /*twsh*/)
687889cced1SEike Rathke 	{
688889cced1SEike Rathke 	}
689889cced1SEike Rathke
690889cced1SEike Rathke@@ -383,8 +383,8 @@
691889cced1SEike Rathke 	void MapChunks(GrSlotStream * psstrmIn, GrSlotStream * psstrmOut,
692889cced1SEike Rathke 		int islotChunkI, int islotChunkO, int cslotReprocessed);
693889cced1SEike Rathke
694889cced1SEike Rathke-	virtual void Unattach(GrSlotStream * psstrmIn, int islotIn,	// GrPosPass overrides
695889cced1SEike Rathke-		GrSlotStream * psstrmOut, int islotOut, int islotLB)
696889cced1SEike Rathke+	virtual void Unattach(GrSlotStream * /*psstrmIn*/, int /*islotIn*/,	// GrPosPass overrides
697889cced1SEike Rathke+		GrSlotStream * /*psstrmOut*/, int /*islotOut*/, int /*islotLB*/)
698889cced1SEike Rathke 	{
699889cced1SEike Rathke 	}
700889cced1SEike Rathke
701889cced1SEike Rathke@@ -500,8 +500,8 @@
702889cced1SEike Rathke
703889cced1SEike Rathke protected:
704889cced1SEike Rathke 	//	Irrelevant when generating glyphs.
705889cced1SEike Rathke-	virtual void RunRule(GrTableManager *, int ruln,
706889cced1SEike Rathke-		GrSlotStream * psstrmInput, GrSlotStream * psstrmOutput)
707889cced1SEike Rathke+	virtual void RunRule(GrTableManager *, int /*ruln*/,
708889cced1SEike Rathke+		GrSlotStream * /*psstrmInput*/, GrSlotStream * /*psstrmOutput*/)
709889cced1SEike Rathke 	{
710889cced1SEike Rathke 		Assert(false);
711889cced1SEike Rathke 	}
712889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrPassActionCode.cpp	Wed Jan 28 04:01:29 2009
713889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrPassActionCode.cpp	Sat Aug 22 19:36:34 2009
714889cced1SEike Rathke@@ -632,8 +632,13 @@
715889cced1SEike Rathke /*----------------------------------------------------------------------------------------------
716889cced1SEike Rathke 	We are finished processing a slot; go on to the next slot, or possibly go backwards.
717889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
718889cced1SEike Rathke-void GrPass::DoNext(GrTableManager * ptman,
719889cced1SEike Rathke-	int cslot, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
720889cced1SEike Rathke+#ifdef NDEBUG
721889cced1SEike Rathke+void GrPass::DoNext(GrTableManager * /*ptman*/,
722889cced1SEike Rathke+	int /*cslot*/, GrSlotStream * /*psstrmIn*/, GrSlotStream * /*psstrmOut*/)
723889cced1SEike Rathke+#else
724889cced1SEike Rathke+void GrPass::DoNext(GrTableManager * /*ptman*/,
725889cced1SEike Rathke+	int cslot, GrSlotStream * /*psstrmIn*/, GrSlotStream * /*psstrmOut*/)
726889cced1SEike Rathke+#endif
727889cced1SEike Rathke {
728889cced1SEike Rathke 	gAssert(cslot == 1);	// for now anyway
729889cced1SEike Rathke }
730889cced1SEike Rathke@@ -690,6 +695,7 @@
731889cced1SEike Rathke 		psstrmOut->SetSegMinToWritePos(false);
732889cced1SEike Rathke 	if (fSetSegLim)
733889cced1SEike Rathke 		psstrmOut->SetSegLimToWritePos(false);
734889cced1SEike Rathke+	//gid16 chw; chw = pslotNew->GlyphID();
735889cced1SEike Rathke 	psstrmOut->NextPut(pslotNew);
736889cced1SEike Rathke }
737889cced1SEike Rathke
738889cced1SEike Rathke@@ -729,6 +735,7 @@
739889cced1SEike Rathke 		psstrmOut->SetSegMinToWritePos(false);
740889cced1SEike Rathke 	if (fSetSegLim)
741889cced1SEike Rathke 		psstrmOut->SetSegLimToWritePos(false);
742889cced1SEike Rathke+	//gid16 chw; chw = pslotNew->GlyphID();
743889cced1SEike Rathke 	psstrmOut->NextPut(pslotNew);
744889cced1SEike Rathke }
745889cced1SEike Rathke
746889cced1SEike Rathke@@ -825,7 +832,7 @@
747889cced1SEike Rathke 	@param psstrmIn / Out		- input/output streams
748889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
749889cced1SEike Rathke void GrPass::DoPutSubs3(GrTableManager * ptman, bool fInserting,
750889cced1SEike Rathke-	int cslotSel1, int nSelClass1, int cslotSel2, int nSelClass2, int cslotSel3, int nSelClass3,
751889cced1SEike Rathke+	int cslotSel1, int nSelClass1, int cslotSel2, int nSelClass2, int /*cslotSel3*/, int nSelClass3,
752889cced1SEike Rathke 	int nReplacementClass,
753889cced1SEike Rathke 	GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
754889cced1SEike Rathke {
755889cced1SEike Rathke@@ -888,7 +895,7 @@
756889cced1SEike Rathke 	Common part of all the DoPutSubs... methods.
757889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
758889cced1SEike Rathke void GrPass::DoPutSubsAux(GrTableManager * ptman, bool fInserting, gid16 nGlyphReplacement,
759889cced1SEike Rathke-	GrSlotStream * psstrmIn, GrSlotStream * psstrmOut, GrSlotState * pslotNextInput,
760889cced1SEike Rathke+	GrSlotStream * /*psstrmIn*/, GrSlotStream * psstrmOut, GrSlotState * pslotNextInput,
761889cced1SEike Rathke 	bool fAtSegMin, bool fAtSegLim)
762889cced1SEike Rathke {
763889cced1SEike Rathke 	EngineState * pengst = ptman->State();
764889cced1SEike Rathke@@ -915,6 +922,7 @@
765889cced1SEike Rathke 		psstrmOut->SetSegMinToWritePos(false);
766889cced1SEike Rathke 	if (fSetSegLim)
767889cced1SEike Rathke 		psstrmOut->SetSegLimToWritePos(false);
768889cced1SEike Rathke+	//gid16 chw; chw = pslotNew->GlyphID();
769889cced1SEike Rathke 	psstrmOut->NextPut(pslotNew);
770889cced1SEike Rathke }
771889cced1SEike Rathke
772889cced1SEike Rathke@@ -924,7 +932,7 @@
773889cced1SEike Rathke 	and its after-assoc to the slot before it. This makes it basically unselectable.
774889cced1SEike Rathke 	OBSOLETE - handled by slot initialization code
775889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
776889cced1SEike Rathke-void GrPass::SetNeutralAssocs(GrSlotState * pslotNew, GrSlotStream * psstrmIn)
777889cced1SEike Rathke+void GrPass::SetNeutralAssocs(GrSlotState * pslotNew, GrSlotStream * /*psstrmIn*/)
778889cced1SEike Rathke {
779889cced1SEike Rathke 	pslotNew->ClearAssocs();
780889cced1SEike Rathke }
781889cced1SEike Rathke@@ -943,6 +951,7 @@
782889cced1SEike Rathke 		psstrmOut->SetSegLimToWritePos();
783889cced1SEike Rathke
784889cced1SEike Rathke 	GrSlotState * pslot = psstrmIn->NextGet();
785889cced1SEike Rathke+	//gid16 chw; chw = pslotNew->GlyphID();
786889cced1SEike Rathke 	pslot->MarkDeleted();
787889cced1SEike Rathke
788889cced1SEike Rathke 	if (ptman->LoggingTransduction())
789889cced1SEike Rathke@@ -957,7 +966,7 @@
790889cced1SEike Rathke 	@param fInserting			- whether current slot was inserted
791889cced1SEike Rathke 	@param psstrmIn / Out		- input/output streams
792889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
793889cced1SEike Rathke-void GrPass::DoAssoc(int cnAssocs, std::vector<int> & vnAssocs, bool fInserting,
794889cced1SEike Rathke+void GrPass::DoAssoc(int cnAssocs, std::vector<int> & vnAssocs, bool /*fInserting*/,
795889cced1SEike Rathke 	GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
796889cced1SEike Rathke {
797889cced1SEike Rathke 	gAssert((unsigned)cnAssocs == vnAssocs.size());
798889cced1SEike Rathke@@ -997,7 +1006,11 @@
799889cced1SEike Rathke 	@param vnStack				- stack to read value from
800889cced1SEike Rathke 	@param psstrmIn / Out		- input/output streams
801889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
802889cced1SEike Rathke+#ifdef NDEBUG
803889cced1SEike Rathke+void GrPass::DoSetAttr(GrTableManager * ptman, ActionCommand op, bool /*fInserting*/,
804889cced1SEike Rathke+#else
805889cced1SEike Rathke void GrPass::DoSetAttr(GrTableManager * ptman, ActionCommand op, bool fInserting,
806889cced1SEike Rathke+#endif
807889cced1SEike Rathke 	SlotAttrName slat, int slati, std::vector<int> & vnStack,
808889cced1SEike Rathke 	GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
809889cced1SEike Rathke {
810889cced1SEike Rathke@@ -1192,7 +1205,7 @@
811889cced1SEike Rathke 	@param psstrmIn				- input stream
812889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
813889cced1SEike Rathke void GrPass::DoPushSlotAttr(GrTableManager * ptman,
814889cced1SEike Rathke-	int nSlotRef, bool fInserting,
815889cced1SEike Rathke+	int nSlotRef, bool /*fInserting*/,
816889cced1SEike Rathke 	SlotAttrName slat, int slati, std::vector<int> & vnStack,
817889cced1SEike Rathke 	GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
818889cced1SEike Rathke {
819889cced1SEike Rathke@@ -1236,16 +1249,16 @@
820889cced1SEike Rathke
821889cced1SEike Rathke 	case kslatAttTo:		nVal = pslot->AttachTo();			break;
822889cced1SEike Rathke 	case kslatAttLevel:		nVal = pslot->AttachLevel();		break;
823889cced1SEike Rathke-	case kslatAttAtX:		nVal = pslot->AttachAtX(ptman, psstrmIn); break;
824889cced1SEike Rathke 	case kslatAttAtY:		nVal = pslot->AttachAtY();			break;
825889cced1SEike Rathke 	case kslatAttAtGpt:		nVal = pslot->AttachAtGpoint();		break;
826889cced1SEike Rathke 	case kslatAttAtXoff:	nVal = pslot->AttachAtXOffset();	break;
827889cced1SEike Rathke 	case kslatAttAtYoff:	nVal = pslot->AttachAtYOffset();	break;
828889cced1SEike Rathke-	case kslatAttWithX:		nVal = pslot->AttachWithX(ptman, psstrmIn); break;
829889cced1SEike Rathke 	case kslatAttWithY:		nVal = pslot->AttachWithY();		break;
830889cced1SEike Rathke 	case kslatAttWithGpt:	nVal = pslot->AttachWithGpoint();	break;
831889cced1SEike Rathke 	case kslatAttWithXoff:	nVal = pslot->AttachWithXOffset();	break;
832889cced1SEike Rathke 	case kslatAttWithYoff:	nVal = pslot->AttachWithYOffset();	break;
833889cced1SEike Rathke+	case kslatAttAtX:		nVal = pslot->AttachAtX(ptman, psstrmIn);	break;
834889cced1SEike Rathke+	case kslatAttWithX:		nVal = pslot->AttachWithX(ptman, psstrmIn);	break;
835889cced1SEike Rathke
836889cced1SEike Rathke 	case kslatMeasureSol:	nVal = pslot->MeasureSol();			break;
837889cced1SEike Rathke 	case kslatMeasureEol:	nVal = pslot->MeasureEol();			break;
838889cced1SEike Rathke@@ -1282,7 +1295,7 @@
839889cced1SEike Rathke 	@param vnStack				- stack to push onto
840889cced1SEike Rathke 	@param psstrmIn				- input stream
841889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
842889cced1SEike Rathke-void GrPass::DoPushGlyphAttr(GrTableManager * ptman, int nSlotRef, bool fInserting,
843889cced1SEike Rathke+void GrPass::DoPushGlyphAttr(GrTableManager * ptman, int nSlotRef, bool /*fInserting*/,
844889cced1SEike Rathke 	int nGlyphAttr,
845889cced1SEike Rathke 	std::vector<int> & vnStack, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
846889cced1SEike Rathke {
847889cced1SEike Rathke@@ -1307,7 +1320,7 @@
848889cced1SEike Rathke 	@param vnStack				- stack to push onto
849889cced1SEike Rathke 	@param psstrmIn				- input stream
850889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
851889cced1SEike Rathke-void GrPass::DoPushAttToGlyphAttr(GrTableManager * ptman, int nSlotRef, bool fInserting,
852889cced1SEike Rathke+void GrPass::DoPushAttToGlyphAttr(GrTableManager * ptman, int nSlotRef, bool /*fInserting*/,
853889cced1SEike Rathke 	int nGlyphAttr, std::vector<int> & vnStack,
854889cced1SEike Rathke 	GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
855889cced1SEike Rathke {
856889cced1SEike Rathke@@ -1337,7 +1350,7 @@
857889cced1SEike Rathke 	@param vnStack				- stack to push onto
858889cced1SEike Rathke 	@param psstrmIn				- input stream
859889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
860889cced1SEike Rathke-void GrPass::DoPushGlyphMetric(GrTableManager * ptman, int nSlotRef, bool fInserting,
861889cced1SEike Rathke+void GrPass::DoPushGlyphMetric(GrTableManager * ptman, int nSlotRef, bool /*fInserting*/,
862889cced1SEike Rathke 	int nGlyphAttr, int nAttLevel,
863889cced1SEike Rathke 	std::vector<int> & vnStack, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
864889cced1SEike Rathke {
865889cced1SEike Rathke@@ -1364,7 +1377,7 @@
866889cced1SEike Rathke 	@param psstrmIn				- input stream
867889cced1SEike Rathke 	@param psstrmOut			- output stream
868889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
869889cced1SEike Rathke-void GrPass::DoPushAttToGlyphMetric(GrTableManager * ptman, int nSlotRef, bool fInserting,
870889cced1SEike Rathke+void GrPass::DoPushAttToGlyphMetric(GrTableManager * ptman, int nSlotRef, bool /*fInserting*/,
871889cced1SEike Rathke 	int nGlyphAttr, int nAttLevel,
872889cced1SEike Rathke 	std::vector<int> & vnStack,
873889cced1SEike Rathke 	GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
874889cced1SEike Rathke@@ -1399,7 +1412,7 @@
875889cced1SEike Rathke 	}
876889cced1SEike Rathke 	else
877889cced1SEike Rathke 	{
878889cced1SEike Rathke-		pslot->CalcCompositeMetrics(ptman, psstrmIn, nAttLevel, true);
879889cced1SEike Rathke+		pslot->CalcCompositeMetrics(ptman, psstrmIn, NULL, nAttLevel, true);
880889cced1SEike Rathke
881889cced1SEike Rathke 		float xy;
882889cced1SEike Rathke 		switch (gmet)
883889cced1SEike Rathke@@ -1435,7 +1448,11 @@
884889cced1SEike Rathke 	@param psstrmIn				- input stream
885889cced1SEike Rathke 	@param psstrmOut			- output stream
886889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
887889cced1SEike Rathke-void GrPass::DoPushFeatValue(GrTableManager * ptman, int nSlotRef, bool fInserting,
888889cced1SEike Rathke+#ifdef NDEBUG
889889cced1SEike Rathke+void GrPass::DoPushFeatValue(GrTableManager * /*ptman*/, int nSlotRef, bool /*fInserting*/,
890889cced1SEike Rathke+#else
891889cced1SEike Rathke+void GrPass::DoPushFeatValue(GrTableManager * /*ptman*/, int nSlotRef, bool fInserting,
892889cced1SEike Rathke+#endif
893889cced1SEike Rathke 	int nFeat, std::vector<int> & vnStack, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
894889cced1SEike Rathke {
895889cced1SEike Rathke 	gAssert(!fInserting);
896889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrSlotState.cpp	Wed Jan 28 04:01:29 2009
897889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrSlotState.cpp	Sat Aug 22 19:36:34 2009
898889cced1SEike Rathke@@ -261,7 +261,7 @@
899889cced1SEike Rathke 	root or attached leaf slots.
900889cced1SEike Rathke 	OBSOLETE
901889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
902889cced1SEike Rathke-void GrSlotState::FixAttachmentTree(GrSlotState * pslotOld)
903889cced1SEike Rathke+void GrSlotState::FixAttachmentTree(GrSlotState * /*pslotOld*/)
904889cced1SEike Rathke {
905889cced1SEike Rathke #if 0
906889cced1SEike Rathke 	pslotOld->m_vpslotAttLeaves.CopyTo(m_vpslotAttLeaves);
907889cced1SEike Rathke@@ -524,13 +524,13 @@
908889cced1SEike Rathke 		GrSlotState * pslot;
909889cced1SEike Rathke 		if (HasComponents())
910889cced1SEike Rathke 		{
911889cced1SEike Rathke-			for (int iComponent = 0; iComponent < m_cnCompPerLig; iComponent++)
912889cced1SEike Rathke+			for (int iLigComponent = 0; iLigComponent < m_cnCompPerLig; iLigComponent++)
913889cced1SEike Rathke 			{
914889cced1SEike Rathke-				pslot = CompRefSlot(iComponent);
915889cced1SEike Rathke+				pslot = CompRefSlot(iLigComponent);
916889cced1SEike Rathke 				if (pslot)
917889cced1SEike Rathke 				{
918889cced1SEike Rathke 					Assert(PassModified() >= pslot->PassModified());
919889cced1SEike Rathke-					pslot->AllComponentRefs(vichw, vicomp, iComponent);
920889cced1SEike Rathke+					pslot->AllComponentRefs(vichw, vicomp, iLigComponent);
921889cced1SEike Rathke 				}
922889cced1SEike Rathke 			}
923889cced1SEike Rathke 		}
924889cced1SEike Rathke@@ -1024,7 +1024,7 @@
925889cced1SEike Rathke 	NOTE: the caller is responsible to zap the cached positions of following glyphs
926889cced1SEike Rathke 	in the stream.
927889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
928889cced1SEike Rathke-void GrSlotState::AttachToRoot(GrTableManager * ptman, GrSlotStream * psstrm,
929889cced1SEike Rathke+void GrSlotState::AttachToRoot(GrTableManager * /*ptman*/, GrSlotStream * psstrm,
930889cced1SEike Rathke 	GrSlotState * pslotNewRoot)
931889cced1SEike Rathke {
932889cced1SEike Rathke 	GrSlotState * pslotOldRoot = (m_dislotRootFixed == 0) ?
933889cced1SEike Rathke@@ -1063,7 +1063,7 @@
934889cced1SEike Rathke
935889cced1SEike Rathke 	float xsWidth, xsVisWidth;
936889cced1SEike Rathke 	if (m_xsPositionX == kNegInfFloat || m_ysPositionY == kNegInfFloat)
937889cced1SEike Rathke-		ptman->CalcPositionsUpTo(psstrmOut->m_ipass, this, &xsWidth, &xsVisWidth);
938889cced1SEike Rathke+		ptman->CalcPositionsUpTo(psstrmOut->m_ipass, this, true, &xsWidth, &xsVisWidth);
939889cced1SEike Rathke
940889cced1SEike Rathke 	*pmXPos = ptman->LogToEmUnits(m_xsPositionX);
941889cced1SEike Rathke 	*pmYPos = ptman->LogToEmUnits(m_ysPositionY);
942889cced1SEike Rathke@@ -1077,7 +1077,7 @@
943889cced1SEike Rathke {
944889cced1SEike Rathke 	Assert(m_dislotRootFixed == m_srAttachTo);
945889cced1SEike Rathke 	GrSlotState * pslotRoot = AttachRoot(psstrm);
946889cced1SEike Rathke-	CalcRootMetrics(ptman, psstrm, kPosInfinity);
947889cced1SEike Rathke+	CalcRootMetrics(ptman, psstrm, NULL, kPosInfinity);
948889cced1SEike Rathke 	if (pslotRoot)
949889cced1SEike Rathke 		pslotRoot->AdjustRootMetrics(ptman, psstrm);
950889cced1SEike Rathke }
951889cced1SEike Rathke@@ -1086,13 +1086,15 @@
952889cced1SEike Rathke 	Calculate the composite metrics for this slot.
953889cced1SEike Rathke
954889cced1SEike Rathke 	@param psstrm			- stream for which we are calculating it
955889cced1SEike Rathke+	@param psstrmNext		- because when processing in the middle of a pass, we may need to
956889cced1SEike Rathke+								get the slot from the following (output) stream
957889cced1SEike Rathke 	@param nLevel			- attachment level we are asking for; kPosInifinity means all levels
958889cced1SEike Rathke 	@param fThorough		- true: do a thorough recalculation; false: don't recalculate
959889cced1SEike Rathke 								metrics for leaves (are they assumed to be accurate???)
960889cced1SEike Rathke 								--currently not used
961889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
962889cced1SEike Rathke void GrSlotState::CalcCompositeMetrics(GrTableManager * ptman, GrSlotStream * psstrm,
963889cced1SEike Rathke-	int nLevel, bool fThorough)
964889cced1SEike Rathke+	GrSlotStream * psstrmNext, int nLevel, bool fThorough)
965889cced1SEike Rathke {
966889cced1SEike Rathke 	if (m_nCompositeLevel == nLevel)
967889cced1SEike Rathke 		return;
968889cced1SEike Rathke@@ -1101,19 +1103,38 @@
969889cced1SEike Rathke 	{
970889cced1SEike Rathke 		Assert(m_dislotRootFixed == m_srAttachTo);
971889cced1SEike Rathke 		GrSlotState * pslotRoot = AttachRoot(psstrm);
972889cced1SEike Rathke+		// Kludge to handle the fact that we might have gotten the root from the wrong stream.
973889cced1SEike Rathke+		// Calling MidPassSlotAt finds the right one.
974889cced1SEike Rathke+		if (psstrmNext && pslotRoot)
975889cced1SEike Rathke+		{
976889cced1SEike Rathke+			int islotRoot = pslotRoot->PosPassIndex();
977889cced1SEike Rathke+			pslotRoot = psstrm->MidPassSlotAt(islotRoot, psstrmNext);
978889cced1SEike Rathke+		}
979889cced1SEike Rathke
980889cced1SEike Rathke 		InitMetrics(ptman, pslotRoot);
981889cced1SEike Rathke
982889cced1SEike Rathke 		for (size_t islot = 0; islot < m_vdislotAttLeaves.size(); islot++)
983889cced1SEike Rathke 		{
984889cced1SEike Rathke-			GrSlotState * pslotLeaf = SlotAtOffset(psstrm, m_vdislotAttLeaves[islot]);
985889cced1SEike Rathke+			GrSlotState * pslotLeaf;
986889cced1SEike Rathke+			if (psstrmNext)
987889cced1SEike Rathke+			{
988889cced1SEike Rathke+				// Calculating a position in the middle of processing a pass.
989889cced1SEike Rathke+				pslotLeaf = psstrm->MidPassSlotAt(PosPassIndex() + m_vdislotAttLeaves[islot],
990889cced1SEike Rathke+					psstrmNext);
991889cced1SEike Rathke+			}
992889cced1SEike Rathke+			else
993889cced1SEike Rathke+			{
994889cced1SEike Rathke+				// Calculating the final position.
995889cced1SEike Rathke+				pslotLeaf = SlotAtOffset(psstrm, m_vdislotAttLeaves[islot]);
996889cced1SEike Rathke+			}
997889cced1SEike Rathke+
998889cced1SEike Rathke 			if (pslotLeaf->AttachLevel() <= nLevel)
999889cced1SEike Rathke-				pslotLeaf->CalcCompositeMetrics(ptman, psstrm, nLevel, fThorough);
1000889cced1SEike Rathke+				pslotLeaf->CalcCompositeMetrics(ptman, psstrm, psstrmNext, nLevel, fThorough);
1001889cced1SEike Rathke 			else
1002889cced1SEike Rathke 				//	this slot will be ignored in the composite metrics
1003889cced1SEike Rathke 				pslotLeaf->ZapRootMetrics();
1004889cced1SEike Rathke 		}
1005889cced1SEike Rathke-		CalcRootMetrics(ptman, psstrm, nLevel);
1006889cced1SEike Rathke+		CalcRootMetrics(ptman, psstrm, psstrmNext, nLevel);
1007889cced1SEike Rathke
1008889cced1SEike Rathke 		m_nCompositeLevel = nLevel;
1009889cced1SEike Rathke 	}
1010889cced1SEike Rathke@@ -1129,25 +1150,33 @@
1011889cced1SEike Rathke /*----------------------------------------------------------------------------------------------
1012889cced1SEike Rathke 	Calculate the metrics for this node and all its leaf nodes.
1013889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1014889cced1SEike Rathke-void GrSlotState::CalcRootMetrics(GrTableManager * ptman, GrSlotStream * psstrm, int nLevel)
1015889cced1SEike Rathke+void GrSlotState::CalcRootMetrics(GrTableManager * /*ptman*/, GrSlotStream * psstrm,
1016889cced1SEike Rathke+	GrSlotStream * psstrmNext, int nLevel)
1017889cced1SEike Rathke {
1018889cced1SEike Rathke 	for (size_t idislot = 0; idislot < m_vdislotAttLeaves.size(); idislot++)
1019889cced1SEike Rathke 	{
1020889cced1SEike Rathke-		GrSlotState * pslot = SlotAtOffset(psstrm, m_vdislotAttLeaves[idislot]);
1021889cced1SEike Rathke-		if (pslot->AttachLevel() > nLevel)
1022889cced1SEike Rathke+		GrSlotState * pslotLeaf = SlotAtOffset(psstrm, m_vdislotAttLeaves[idislot]);
1023889cced1SEike Rathke+		// Kludge to handle the fact that we might have gotten the leaf from the wrong stream.
1024889cced1SEike Rathke+		// Calling MidPassSlotAt finds the right one.
1025889cced1SEike Rathke+		if (psstrmNext)
1026889cced1SEike Rathke+		{
1027889cced1SEike Rathke+			int islot = pslotLeaf->PosPassIndex();
1028889cced1SEike Rathke+			pslotLeaf = psstrm->MidPassSlotAt(islot, psstrmNext);
1029889cced1SEike Rathke+		}
1030889cced1SEike Rathke+		if (pslotLeaf->AttachLevel() > nLevel)
1031889cced1SEike Rathke 			continue;
1032889cced1SEike Rathke
1033889cced1SEike Rathke-		m_xsClusterXOffset = min(m_xsClusterXOffset, pslot->m_xsClusterXOffset);
1034889cced1SEike Rathke-		if (!pslot->m_fIgnoreAdvance)
1035889cced1SEike Rathke+		m_xsClusterXOffset = min(m_xsClusterXOffset, pslotLeaf->m_xsClusterXOffset);
1036889cced1SEike Rathke+		if (!pslotLeaf->m_fIgnoreAdvance)
1037889cced1SEike Rathke 		{
1038889cced1SEike Rathke 			m_xsClusterAdv = max(
1039889cced1SEike Rathke 				m_xsClusterAdv,
1040889cced1SEike Rathke-				pslot->m_xsClusterAdv + m_xsRootShiftX);
1041889cced1SEike Rathke+				pslotLeaf->m_xsClusterAdv + m_xsRootShiftX);
1042889cced1SEike Rathke 		}
1043889cced1SEike Rathke-		m_xsClusterBbLeft = min(m_xsClusterBbLeft, pslot->m_xsClusterBbLeft);
1044889cced1SEike Rathke-		m_xsClusterBbRight = max(m_xsClusterBbRight, pslot->m_xsClusterBbRight);
1045889cced1SEike Rathke-		m_ysClusterBbTop = max(m_ysClusterBbTop, pslot->m_ysClusterBbTop);
1046889cced1SEike Rathke-		m_ysClusterBbBottom = min(m_ysClusterBbBottom, pslot->m_ysClusterBbBottom);
1047889cced1SEike Rathke+		m_xsClusterBbLeft = min(m_xsClusterBbLeft, pslotLeaf->m_xsClusterBbLeft);
1048889cced1SEike Rathke+		m_xsClusterBbRight = max(m_xsClusterBbRight, pslotLeaf->m_xsClusterBbRight);
1049889cced1SEike Rathke+		m_ysClusterBbTop = max(m_ysClusterBbTop, pslotLeaf->m_ysClusterBbTop);
1050889cced1SEike Rathke+		m_ysClusterBbBottom = min(m_ysClusterBbBottom, pslotLeaf->m_ysClusterBbBottom);
1051889cced1SEike Rathke 	}
1052889cced1SEike Rathke }
1053889cced1SEike Rathke
1054889cced1SEike Rathke@@ -1263,7 +1292,7 @@
1055889cced1SEike Rathke /*----------------------------------------------------------------------------------------------
1056889cced1SEike Rathke 	Y-offsets of a single glyph relative to the previous advance position.
1057889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1058889cced1SEike Rathke-float GrSlotState::GlyphYOffset(GrSlotStream * psstrm)
1059889cced1SEike Rathke+float GrSlotState::GlyphYOffset(GrSlotStream * /*psstrm*/)
1060889cced1SEike Rathke {
1061889cced1SEike Rathke 	return m_ysOffsetY;
1062889cced1SEike Rathke }
1063889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrSlotState.h	Wed Jan 28 04:01:29 2009
1064889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrSlotState.h	Sat Aug 22 19:36:34 2009
1065889cced1SEike Rathke@@ -308,7 +308,11 @@
1066889cced1SEike Rathke 	{
1067889cced1SEike Rathke 		return m_islotPosPass;
1068889cced1SEike Rathke 	}
1069889cced1SEike Rathke+#ifdef NDEBUG
1070889cced1SEike Rathke+	void SetPosPassIndex(int islot, bool /*fInputToPosPass1*/)
1071889cced1SEike Rathke+#else
1072889cced1SEike Rathke 	void SetPosPassIndex(int islot, bool fInputToPosPass1)
1073889cced1SEike Rathke+#endif
1074889cced1SEike Rathke 	{
1075889cced1SEike Rathke 		// If we're resetting it, it should be to the same value as before:
1076889cced1SEike Rathke 		Assert(fInputToPosPass1 || m_islotPosPass == kNotYetSet || m_islotPosPass == islot);
1077889cced1SEike Rathke@@ -386,12 +390,12 @@
1078889cced1SEike Rathke 		return (IsInitialLineBreak(chwLB) || IsFinalLineBreak(chwLB));
1079889cced1SEike Rathke 		//return (m_chwGlyphID == chwLB); // TODO: remove
1080889cced1SEike Rathke 	}
1081889cced1SEike Rathke-	bool IsInitialLineBreak(gid16 chwLB)
1082889cced1SEike Rathke+	bool IsInitialLineBreak(gid16 /*chwLB*/)
1083889cced1SEike Rathke 	{
1084889cced1SEike Rathke 		return (m_spsl == kspslLbInitial);
1085889cced1SEike Rathke 		//return (IsLineBreak(chwLB) && m_fInitialLB == true); // TODO: remove
1086889cced1SEike Rathke 	}
1087889cced1SEike Rathke-	bool IsFinalLineBreak(gid16 chwLB)
1088889cced1SEike Rathke+	bool IsFinalLineBreak(gid16 /*chwLB*/)
1089889cced1SEike Rathke 	{
1090889cced1SEike Rathke 		return (m_spsl == kspslLbFinal);
1091889cced1SEike Rathke 		//return (IsLineBreak(chwLB) && m_fInitialLB == false); // TODO: remove
1092889cced1SEike Rathke@@ -475,7 +479,7 @@
1093889cced1SEike Rathke 		return m_mAttachAtX;
1094889cced1SEike Rathke 	}
1095889cced1SEike Rathke
1096889cced1SEike Rathke-	int AttachWithX(GrTableManager * ptman, GrSlotStream * psstrm)
1097889cced1SEike Rathke+	int AttachWithX(GrTableManager * /*ptman*/, GrSlotStream * /*psstrm*/)
1098889cced1SEike Rathke 	{
1099889cced1SEike Rathke 		if (m_mAttachAtX == kNotYetSet)
1100889cced1SEike Rathke 		{
1101889cced1SEike Rathke@@ -615,7 +619,7 @@
1102889cced1SEike Rathke 		GrSlotStream * psstrmIn, GrSlotStream * psstrmOut, int islotThis);
1103889cced1SEike Rathke
1104889cced1SEike Rathke 	void CalcCompositeMetrics(GrTableManager * ptman, GrSlotStream * psstrm,
1105889cced1SEike Rathke-		int nLevel, bool fThorough = false);
1106889cced1SEike Rathke+		GrSlotStream * psstrmNext, int nLevel, bool fThorough = false);
1107889cced1SEike Rathke
1108889cced1SEike Rathke 	void Position(GrTableManager * ptman,
1109889cced1SEike Rathke 		GrSlotStream * psstrmOut, int * pmXPos, int * pmYPos);
1110889cced1SEike Rathke@@ -646,7 +650,7 @@
1111889cced1SEike Rathke 	{
1112889cced1SEike Rathke 		return ClusterBbLeft(psstrm) + xs;
1113889cced1SEike Rathke 	}
1114889cced1SEike Rathke-	float ClusterRsb(GrSlotStream * psstrm, float xs)
1115889cced1SEike Rathke+	float ClusterRsb(GrSlotStream * /*psstrm*/, float xs)
1116889cced1SEike Rathke 	{
1117889cced1SEike Rathke 		return ClusterAdvWidthFrom(xs) - ClusterBbRightFrom(xs);
1118889cced1SEike Rathke 	}
1119889cced1SEike Rathke@@ -668,19 +672,19 @@
1120889cced1SEike Rathke 	{
1121889cced1SEike Rathke 		return ClusterBbRightFrom(Base(psstrm)->ClusterRootOffset());
1122889cced1SEike Rathke 	}
1123889cced1SEike Rathke-	float ClusterBbTop(GrSlotStream * psstrm)
1124889cced1SEike Rathke+	float ClusterBbTop(GrSlotStream * /*psstrm*/)
1125889cced1SEike Rathke 	{
1126889cced1SEike Rathke 		return m_ysClusterBbTop;
1127889cced1SEike Rathke 	}
1128889cced1SEike Rathke-	float ClusterBbBottom(GrSlotStream * psstrm)
1129889cced1SEike Rathke+	float ClusterBbBottom(GrSlotStream * /*psstrm*/)
1130889cced1SEike Rathke 	{
1131889cced1SEike Rathke 		return m_ysClusterBbBottom;
1132889cced1SEike Rathke 	}
1133889cced1SEike Rathke-	float ClusterBbWidth(GrSlotStream * psstrm)
1134889cced1SEike Rathke+	float ClusterBbWidth(GrSlotStream * /*psstrm*/)
1135889cced1SEike Rathke 	{
1136889cced1SEike Rathke 		return m_xsClusterBbRight - m_xsClusterBbLeft + 1;
1137889cced1SEike Rathke 	}
1138889cced1SEike Rathke-	float ClusterBbHeight(GrSlotStream * psstrm)
1139889cced1SEike Rathke+	float ClusterBbHeight(GrSlotStream * /*psstrm*/)
1140889cced1SEike Rathke 	{
1141889cced1SEike Rathke 		return m_ysClusterBbTop - m_ysClusterBbBottom + 1;
1142889cced1SEike Rathke 	}
1143889cced1SEike Rathke@@ -990,7 +994,8 @@
1144889cced1SEike Rathke 	void InitMetrics(GrTableManager * ptman, GrSlotState * pslotRoot);
1145889cced1SEike Rathke 	void InitLeafMetrics(GrTableManager * ptman, GrSlotState * pslotRoot);
1146889cced1SEike Rathke 	void InitRootMetrics(GrTableManager * ptman);
1147889cced1SEike Rathke-	void CalcRootMetrics(GrTableManager * ptman, GrSlotStream *, int nLevel);
1148889cced1SEike Rathke+	void CalcRootMetrics(GrTableManager * ptman, GrSlotStream * psstrm,
1149889cced1SEike Rathke+		GrSlotStream * psstrmNext, int nLevel);
1150889cced1SEike Rathke 	void AttachToRoot(GrTableManager * ptman, GrSlotStream *, GrSlotState * pslotNewRoot);
1151889cced1SEike Rathke 	void AttachLogUnits(GrTableManager * ptman,
1152889cced1SEike Rathke 		GrSlotState * pslotRoot,
1153889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrSlotStream.cpp	Wed Feb 04 07:53:26 2009
1154889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrSlotStream.cpp	Sat Aug 22 19:36:34 2009
1155889cced1SEike Rathke@@ -189,12 +189,16 @@
1156889cced1SEike Rathke 	stream position when the rule is being run.
1157889cced1SEike Rathke
1158889cced1SEike Rathke 	@param dislot		- how far back to peek before the write position
1159889cced1SEike Rathke-							when the rule started; a negative number
1160889cced1SEike Rathke+							WHEN THE RULE STARTED; a negative number
1161889cced1SEike Rathke 							(NOTE: the current write position is irrelevant)
1162889cced1SEike Rathke 	@param fNullOkay	- true if it's okay to return NULL in the situation where we're asking
1163889cced1SEike Rathke 							for something before the beginning of the stream
1164889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1165889cced1SEike Rathke+#ifdef NDEBUG
1166889cced1SEike Rathke+GrSlotState * GrSlotStream::PeekBack(int dislot, bool /*fNullOkay*/)
1167889cced1SEike Rathke+#else
1168889cced1SEike Rathke GrSlotState * GrSlotStream::PeekBack(int dislot, bool fNullOkay)
1169889cced1SEike Rathke+#endif
1170889cced1SEike Rathke {
1171889cced1SEike Rathke 	Assert(dislot < 0);
1172889cced1SEike Rathke 	if (dislot < m_islotRuleStartWrite * -1)
1173889cced1SEike Rathke@@ -1104,6 +1108,7 @@
1174889cced1SEike Rathke 	case kdircRLO:
1175889cced1SEike Rathke 	case kdircRLE:
1176889cced1SEike Rathke 	case kdircPdfR:
1177889cced1SEike Rathke+	case kdircRlb:
1178889cced1SEike Rathke 		return true;
1179889cced1SEike Rathke
1180889cced1SEike Rathke 	case kdircNeutral:
1181889cced1SEike Rathke@@ -1212,7 +1217,7 @@
1182889cced1SEike Rathke 			return true;
1183889cced1SEike Rathke
1184889cced1SEike Rathke 		float xsWidth, xsVisWidth;
1185889cced1SEike Rathke-		ptman->CalcPositionsUpTo(m_ipass, NULL, &xsWidth, &xsVisWidth);
1186889cced1SEike Rathke+		ptman->CalcPositionsUpTo(m_ipass, NULL, false, &xsWidth, &xsVisWidth);
1187889cced1SEike Rathke
1188889cced1SEike Rathke 		*pxsWidth = (fIgnoreTrailingWS || twsh == ktwshOnlyWs) ? xsVisWidth : xsWidth;
1189889cced1SEike Rathke         return (*pxsWidth < xsSpaceAllotted);
1190889cced1SEike Rathke@@ -1322,7 +1327,7 @@
1191889cced1SEike Rathke 	@param islotMin			- first slot that is officially part of the segment (after initial LB)
1192889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1193889cced1SEike Rathke int GrSlotStream::MakeSegmentBreak(GrTableManager * ptman,
1194889cced1SEike Rathke-	int islotPrevBreak, bool fInsertedLB, int islotStartTry,
1195889cced1SEike Rathke+	int /*islotPrevBreak*/, bool /*fInsertedLB*/, int islotStartTry,
1196889cced1SEike Rathke 	LineBrk lb, TrWsHandling twsh, int islotMin,
1197889cced1SEike Rathke 	LineBrk * plbNextToTry)
1198889cced1SEike Rathke {
1199889cced1SEike Rathke@@ -1576,7 +1581,11 @@
1200889cced1SEike Rathke 	Return the break weight of the given slot, which should be a line-break.
1201889cced1SEike Rathke 	OBSOLETE??
1202889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1203889cced1SEike Rathke+#ifdef NDEBUG
1204889cced1SEike Rathke+LineBrk GrSlotStream::BreakWeightAt(gid16 /*chwLB*/, int islot)
1205889cced1SEike Rathke+#else
1206889cced1SEike Rathke LineBrk GrSlotStream::BreakWeightAt(gid16 chwLB, int islot)
1207889cced1SEike Rathke+#endif
1208889cced1SEike Rathke {
1209889cced1SEike Rathke 	GrSlotState * pslot = GetSlotAt(islot);
1210889cced1SEike Rathke 	Assert(pslot->IsLineBreak(chwLB));
1211889cced1SEike Rathke@@ -1769,7 +1778,7 @@
1212889cced1SEike Rathke 	@param fBackingUp		- this chunk results in the stream position moving backwards,
1213889cced1SEike Rathke 								so clear anything we're backing over
1214889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1215889cced1SEike Rathke-void GrSlotStream::MapInputChunk(int islotInputMin, int islotOutputMin, int islotInputLim,
1216889cced1SEike Rathke+void GrSlotStream::MapInputChunk(int islotInputMin, int islotOutputMin, int /*islotInputLim*/,
1217889cced1SEike Rathke 	bool fSkipChunkStart, bool fBackingUp)
1218889cced1SEike Rathke {
1219889cced1SEike Rathke 	Assert(AssertValid());
1220889cced1SEike Rathke@@ -1828,7 +1837,7 @@
1221889cced1SEike Rathke 	@param fBackingUp		- this chunk results in the stream position moving backwards,
1222889cced1SEike Rathke 								so clear anything we're backing over
1223889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1224889cced1SEike Rathke-void GrSlotStream::MapOutputChunk(int islotOutputMin, int islotInputMin, int islotOutputLim,
1225889cced1SEike Rathke+void GrSlotStream::MapOutputChunk(int islotOutputMin, int islotInputMin, int /*islotOutputLim*/,
1226889cced1SEike Rathke 	bool fSkipChunkStart, int cslotReprocess, bool fBackingUp)
1227889cced1SEike Rathke {
1228889cced1SEike Rathke 	Assert(AssertValid());
1229889cced1SEike Rathke@@ -1863,7 +1872,11 @@
1230889cced1SEike Rathke 	Ensure that the chunk maps for a pair of streams match properly. The recipient is
1231889cced1SEike Rathke 	the input stream.
1232889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1233889cced1SEike Rathke+#ifdef _DEBUG
1234889cced1SEike Rathke void GrSlotStream::AssertChunkMapsValid(GrSlotStream * psstrmOut)
1235889cced1SEike Rathke+#else
1236889cced1SEike Rathke+void GrSlotStream::AssertChunkMapsValid(GrSlotStream * )
1237889cced1SEike Rathke+#endif
1238889cced1SEike Rathke {
1239889cced1SEike Rathke #ifdef _DEBUG
1240889cced1SEike Rathke 	GrSlotStream * psstrmIn = this;
1241889cced1SEike Rathke@@ -1915,7 +1924,11 @@
1242889cced1SEike Rathke 	Ensure that corresponding items in the streams of a positioning pass have matching
1243889cced1SEike Rathke 	stream indices. The recipient is the output stream.
1244889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1245889cced1SEike Rathke+#ifdef _DEBUG
1246889cced1SEike Rathke void GrSlotStream::AssertStreamIndicesValid(GrSlotStream * psstrmIn)
1247889cced1SEike Rathke+#else
1248889cced1SEike Rathke+void GrSlotStream::AssertStreamIndicesValid(GrSlotStream * )
1249889cced1SEike Rathke+#endif
1250889cced1SEike Rathke {
1251889cced1SEike Rathke #ifdef _DEBUG
1252889cced1SEike Rathke 	if (!GotIndexOffset())
1253889cced1SEike Rathke@@ -1939,7 +1948,11 @@
1254889cced1SEike Rathke 	in the output stream. (Currently the compiler ensures this by making it an error
1255889cced1SEike Rathke 	to write rules that don't do this.)
1256889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1257889cced1SEike Rathke+#ifdef _DEBUG
1258889cced1SEike Rathke void GrSlotStream::AssertAttachmentsInOutput(int islotMin, int islotLim)
1259889cced1SEike Rathke+#else
1260889cced1SEike Rathke+void GrSlotStream::AssertAttachmentsInOutput(int , int )
1261889cced1SEike Rathke+#endif
1262889cced1SEike Rathke {
1263889cced1SEike Rathke #ifdef _DEBUG
1264889cced1SEike Rathke 	for (int islot = islotMin; islot < islotLim; islot++)
1265889cced1SEike Rathke@@ -2007,7 +2016,11 @@
1266889cced1SEike Rathke 	Record the number of slots in the stream that are previous to the official start of the
1267889cced1SEike Rathke 	segment.
1268889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1269889cced1SEike Rathke+#ifdef _DEBUG
1270889cced1SEike Rathke void GrSlotStream::CalcIndexOffset(GrTableManager * ptman)
1271889cced1SEike Rathke+#else
1272889cced1SEike Rathke+void GrSlotStream::CalcIndexOffset(GrTableManager * )
1273889cced1SEike Rathke+#endif
1274889cced1SEike Rathke {
1275889cced1SEike Rathke 	if (GotIndexOffset())
1276889cced1SEike Rathke 		return; // already figured it
1277889cced1SEike Rathke@@ -2203,6 +2212,21 @@
1278889cced1SEike Rathke }
1279889cced1SEike Rathke
1280889cced1SEike Rathke /*----------------------------------------------------------------------------------------------
1281889cced1SEike Rathke+	In the middle of running a pass, return the given slot to use in processing.
1282889cced1SEike Rathke+	Read it from the reprocess buffer if appropriate, or for slots previous to the current
1283889cced1SEike Rathke+	position, read from the output stream (psstrmNext).
1284889cced1SEike Rathke+
1285889cced1SEike Rathke+	psstrmNext may be NULL when processing is complete, therefore we only have one stream to
1286889cced1SEike Rathke+	deal with.
1287889cced1SEike Rathke+----------------------------------------------------------------------------------------------*/
1288889cced1SEike Rathke+GrSlotState * GrSlotStream::MidPassSlotAt(int islot, GrSlotStream * psstrmNext)
1289889cced1SEike Rathke+{
1290889cced1SEike Rathke+	int islotInput = islot - ReadPosForNextGet() + 1; // +1 because RuleInputSlot takes 0 to mean the previously read slot
1291889cced1SEike Rathke+	GrSlotState * pslot = RuleInputSlot(islotInput, psstrmNext);
1292889cced1SEike Rathke+	return pslot;
1293889cced1SEike Rathke+}
1294889cced1SEike Rathke+
1295889cced1SEike Rathke+/*----------------------------------------------------------------------------------------------
1296889cced1SEike Rathke 	Return the "current" input item from the rule's perspective, ie, the last slot read.
1297889cced1SEike Rathke 	So dislotOffset = 0 means not the slot at the read position but one slot earlier.
1298889cced1SEike Rathke
1299889cced1SEike Rathke@@ -2214,7 +2238,6 @@
1300889cced1SEike Rathke 	@param fNullOkay	- true if it's okay to return NULL in the situation where we're asking
1301889cced1SEike Rathke 							for something before the beginning of the stream
1302889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1303889cced1SEike Rathke-
1304889cced1SEike Rathke GrSlotState * GrSlotStream::RuleInputSlot(int dislotOffset, GrSlotStream * psstrmOutput,
1305889cced1SEike Rathke 	bool fNullOkay)
1306889cced1SEike Rathke {
1307889cced1SEike Rathke@@ -2244,8 +2267,10 @@
1308889cced1SEike Rathke
1309889cced1SEike Rathke 			if (cslotOffsetBack >= cslotPostReproc + cslotValidReproc)
1310889cced1SEike Rathke 			{
1311889cced1SEike Rathke-				// Read from the output stream.
1312889cced1SEike Rathke-				int dislotTmp = dislotOffset - 1 + cslotPostReproc + cslotValidReproc;
1313889cced1SEike Rathke+				// Read from the output stream. (Remember that PeekBack works relative to
1314889cced1SEike Rathke+				// the rule-start write position, not the current write position.)
1315889cced1SEike Rathke+				int dislotTmp = dislotOffset - 1 + cslotPostReproc
1316889cced1SEike Rathke+					+ cslotValidReproc - SlotsToReprocess();
1317889cced1SEike Rathke 				Assert(dislotTmp < 0);
1318889cced1SEike Rathke 				return psstrmOutput->PeekBack(dislotTmp);
1319889cced1SEike Rathke 			}
1320889cced1SEike Rathke@@ -2253,7 +2278,7 @@
1321889cced1SEike Rathke 			{
1322889cced1SEike Rathke 				if (m_islotReprocPos > -1)
1323889cced1SEike Rathke 				{
1324889cced1SEike Rathke-					//	Current read pos is inside reprocess buffer.
1325889cced1SEike Rathke+					//	Current read pos could be inside reprocess buffer.
1326889cced1SEike Rathke 					Assert(cslotPostReproc == 0);
1327889cced1SEike Rathke 					int islotStartReadReprocBuf = m_vpslotReproc.size() - cslotValidReproc;
1328889cced1SEike Rathke 					Assert(islotStartReadReprocBuf >= 0);
1329889cced1SEike Rathke@@ -2342,9 +2367,10 @@
1330889cced1SEike Rathke 			else if (pslotAfter)
1331889cced1SEike Rathke 				pslot->Associate(pslotAfter);
1332889cced1SEike Rathke 			else
1333889cced1SEike Rathke+			{
1334889cced1SEike Rathke 				// Weird, but can happen with an empty segment.
1335889cced1SEike Rathke 				Warn("No assocations");
1336889cced1SEike Rathke-
1337889cced1SEike Rathke+			}
1338889cced1SEike Rathke //			Assert(pslot->m_vpslotAssoc.Size() > 0);
1339889cced1SEike Rathke 			pslot->m_fNeutralAssocs = true;
1340889cced1SEike Rathke 		}
1341889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrSlotStream.h	Thu Jan 22 00:36:42 2009
1342889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrSlotStream.h	Sat Aug 22 19:36:34 2009
1343889cced1SEike Rathke@@ -107,7 +107,7 @@
1344889cced1SEike Rathke 		ReleaseSlots(0, m_vpslot.size());
1345889cced1SEike Rathke 	}
1346889cced1SEike Rathke
1347889cced1SEike Rathke-	void ReleaseSlots(int islotMin, int islotLim)
1348889cced1SEike Rathke+	void ReleaseSlots(int /*islotMin*/, int /*islotLim*/)
1349889cced1SEike Rathke 	{
1350889cced1SEike Rathke 		//	A slot stream is responsible for deleting the slot states that it created,
1351889cced1SEike Rathke 		//	that is, the ones whose modified tag equals this stream's pass index.
1352889cced1SEike Rathke@@ -182,6 +182,7 @@
1353889cced1SEike Rathke 		return Peek(islot - ReadPosForNextGet());
1354889cced1SEike Rathke 	}
1355889cced1SEike Rathke
1356889cced1SEike Rathke+	//	Return the functional read position, taking into account the reprocess buffer.
1357889cced1SEike Rathke 	int ReadPosForNextGet()
1358889cced1SEike Rathke 	{
1359889cced1SEike Rathke 		return ReadPos() - SlotsToReprocess();
1360889cced1SEike Rathke@@ -260,12 +261,16 @@
1361889cced1SEike Rathke
1362889cced1SEike Rathke 	void MarkFullyWritten();
1363889cced1SEike Rathke
1364889cced1SEike Rathke+#ifdef NDEBUG
1365889cced1SEike Rathke+	void SetSegMin(int islot, bool /*fAdjusting*/ = false)
1366889cced1SEike Rathke+#else
1367889cced1SEike Rathke 	void SetSegMin(int islot, bool fAdjusting = false)
1368889cced1SEike Rathke+#endif
1369889cced1SEike Rathke 	{
1370889cced1SEike Rathke 		Assert(fAdjusting || m_islotSegMin == -1 || m_islotSegMin == islot);
1371889cced1SEike Rathke 		m_islotSegMin = islot;
1372889cced1SEike Rathke 	}
1373889cced1SEike Rathke-	void SetSegMinToWritePos(bool fMod = true)
1374889cced1SEike Rathke+	void SetSegMinToWritePos(bool /*fMod*/ = true)
1375889cced1SEike Rathke 	{
1376889cced1SEike Rathke 		if (m_islotSegMin == -1)
1377889cced1SEike Rathke 			m_islotSegMin = m_islotWritePos;
1378889cced1SEike Rathke@@ -456,6 +461,7 @@
1379889cced1SEike Rathke 		}
1380889cced1SEike Rathke 	}
1381889cced1SEike Rathke
1382889cced1SEike Rathke+	GrSlotState * MidPassSlotAt(int islot, GrSlotStream * psstrmNext = NULL);
1383889cced1SEike Rathke 	GrSlotState * RuleInputSlot(int dislot = 0, GrSlotStream * psstrmOut = NULL,
1384889cced1SEike Rathke 		bool fNullOkay = false);
1385889cced1SEike Rathke 	GrSlotState * RuleOutputSlot(int dislot = 0);
1386889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrTableManager.cpp	Wed Jan 28 04:01:29 2009
1387889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrTableManager.cpp	Sat Aug 22 19:36:34 2009
1388889cced1SEike Rathke@@ -25,8 +25,8 @@
1389889cced1SEike Rathke DEFINE_THIS_FILE
1390889cced1SEike Rathke #ifndef _WIN32
1391889cced1SEike Rathke #include <stdlib.h>
1392889cced1SEike Rathke-#include <math.h>
1393889cced1SEike Rathke #endif
1394889cced1SEike Rathke+#include <math.h>
1395889cced1SEike Rathke
1396889cced1SEike Rathke //:>********************************************************************************************
1397889cced1SEike Rathke //:>	Forward declarations
1398889cced1SEike Rathke@@ -572,7 +572,7 @@
1399889cced1SEike Rathke 		else
1400889cced1SEike Rathke 		{
1401889cced1SEike Rathke 			Assert(!m_engst.m_fInsertedLB);
1402889cced1SEike Rathke-			Assert(islotUnderBreak == -1 || m_engst.m_fFinalLB);
1403889cced1SEike Rathke+			//Assert(islotUnderBreak == -1 || m_engst.m_fFinalLB); -- no, ExtendGlyphIDOutput clearly sets islotUnderBreak regardless
1404889cced1SEike Rathke 		}
1405889cced1SEike Rathke 		int islotTmp = OutputStream(m_cpass - 1)->WritePos();
1406889cced1SEike Rathke 		GrSlotState * pslotTmp;
1407889cced1SEike Rathke@@ -931,7 +931,7 @@
1408889cced1SEike Rathke 	@param plbFound			- kind of line-break created
1409889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1410889cced1SEike Rathke bool GrTableManager::Backtrack(int * pislotPrevBreak,
1411889cced1SEike Rathke-	LineBrk * plbMin, LineBrk lbMax, TrWsHandling twsh, bool fMoreText,
1412889cced1SEike Rathke+	LineBrk * plbMin, LineBrk lbMax, TrWsHandling twsh, bool /*fMoreText*/,
1413889cced1SEike Rathke 	int ichwCallerBtLim, bool fEndLine,
1414889cced1SEike Rathke 	LineBrk * plbFound)
1415889cced1SEike Rathke {
1416889cced1SEike Rathke@@ -1343,7 +1343,7 @@
1417889cced1SEike Rathke 	Calculate the associations, and record the output slots in the segment.
1418889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1419889cced1SEike Rathke void GrTableManager::RecordAssocsAndOutput(Font * pfont,
1420889cced1SEike Rathke-	Segment * pseg, bool fWidthIsCharCount,
1421889cced1SEike Rathke+	Segment * pseg, bool /*fWidthIsCharCount*/,
1422889cced1SEike Rathke 	TrWsHandling twsh, bool fParaRtl, int nDirDepth)
1423889cced1SEike Rathke {
1424889cced1SEike Rathke 	int cchwUnderlying = pseg->stopCharacter() - pseg->startCharacter();
1425889cced1SEike Rathke@@ -1362,7 +1362,7 @@
1426889cced1SEike Rathke #endif // OLD_TEST_STUFF
1427889cced1SEike Rathke
1428889cced1SEike Rathke 	//	Make sure the final positions are set for every glyph.
1429889cced1SEike Rathke-	CalcPositionsUpTo(m_cpass-1, reinterpret_cast<GrSlotState *>(NULL),
1430889cced1SEike Rathke+	CalcPositionsUpTo(m_cpass-1, reinterpret_cast<GrSlotState *>(NULL), false,
1431889cced1SEike Rathke 		&xsTotalWidth, &xsVisWidth);
1432889cced1SEike Rathke 	pseg->SetWidths(xsVisWidth, xsTotalWidth);
1433889cced1SEike Rathke
1434889cced1SEike Rathke@@ -1377,7 +1377,7 @@
1435889cced1SEike Rathke 	Calculate the underlying-to-surface associations and ligature mappings.
1436889cced1SEike Rathke 	Assumes the arrays have been properly initialized.
1437889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1438889cced1SEike Rathke-void GrTableManager::CalculateAssociations(Segment * pseg, int csloutSurface)
1439889cced1SEike Rathke+void GrTableManager::CalculateAssociations(Segment * pseg, int /*csloutSurface*/)
1440889cced1SEike Rathke {
1441889cced1SEike Rathke 	GrSlotStream * psstrmFinal = OutputStream(m_cpass-1);
1442889cced1SEike Rathke
1443889cced1SEike Rathke@@ -2350,18 +2350,20 @@
1444889cced1SEike Rathke 								final pass, but it could be another if positions are
1445889cced1SEike Rathke 								requested by the rules themselves
1446889cced1SEike Rathke 	@param pslotLast		- last slot that needs to be positioned, or NULL
1447889cced1SEike Rathke+	@param fMidPass			- calculating the position of some slot in the middle of the pass
1448889cced1SEike Rathke 	@param pxsWidth			- return the total width used so far
1449889cced1SEike Rathke 	@param psxVisibleWidth	- return the visible width so far
1450889cced1SEike Rathke
1451889cced1SEike Rathke 	MOVE to EngineState
1452889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1453889cced1SEike Rathke-void GrTableManager::CalcPositionsUpTo(int ipass, GrSlotState * pslotLast,
1454889cced1SEike Rathke+void GrTableManager::CalcPositionsUpTo(int ipass, GrSlotState * pslotLast, bool fMidPass,
1455889cced1SEike Rathke 	float * pxsWidth, float * pxsVisibleWidth)
1456889cced1SEike Rathke {
1457889cced1SEike Rathke 	Assert(ipass >= m_ipassPos1 - 1);
1458889cced1SEike Rathke
1459889cced1SEike Rathke 	int isstrm = ipass;
1460889cced1SEike Rathke 	GrSlotStream * psstrm = OutputStream(isstrm);
1461889cced1SEike Rathke+	GrSlotStream * psstrmNext = (isstrm >= m_cpass - 1) ? NULL : OutputStream(isstrm + 1);
1462889cced1SEike Rathke 	Assert(psstrm->GotIndexOffset());
1463889cced1SEike Rathke 	if (psstrm->WritePos() <= psstrm->IndexOffset())
1464889cced1SEike Rathke 	{
1465889cced1SEike Rathke@@ -2399,7 +2401,9 @@
1466889cced1SEike Rathke 	//	to be later in the stream than the last actual slot passed in.
1467889cced1SEike Rathke 	if (!psstrm->HasSlotAtPosPassIndex(pslotLast->AttachRootPosPassIndex()))
1468889cced1SEike Rathke 		return;
1469889cced1SEike Rathke-	GrSlotState * pslotLastBase = pslotLast->Base(psstrm);
1470889cced1SEike Rathke+	GrSlotState * pslotLastBase = (fMidPass && pslotLast->PosPassIndex() < psstrm->WritePos())
1471889cced1SEike Rathke+		? pslotLast->Base(psstrmNext)
1472889cced1SEike Rathke+		: pslotLast->Base(psstrm);
1473889cced1SEike Rathke
1474889cced1SEike Rathke 	if (ipass == m_cpass - 1 && m_engst.m_islotPosNext > -1)
1475889cced1SEike Rathke 	{
1476889cced1SEike Rathke@@ -2428,6 +2432,7 @@
1477889cced1SEike Rathke 	}
1478889cced1SEike Rathke
1479889cced1SEike Rathke 	std::vector<GrSlotState *> vpslotAttached;
1480889cced1SEike Rathke+	std::vector<GrSlotStream *> vpsstrmAttached;
1481889cced1SEike Rathke
1482889cced1SEike Rathke 	bool fRtl = RightToLeft();
1483889cced1SEike Rathke
1484889cced1SEike Rathke@@ -2435,13 +2440,24 @@
1485889cced1SEike Rathke 	{
1486889cced1SEike Rathke 		Assert(islot < psstrm->SlotsPresent());
1487889cced1SEike Rathke
1488889cced1SEike Rathke-		pslot = (isstrm == ipass) ?	psstrm->SlotAt(islot) :	psstrm->OutputSlotAt(islot);
1489889cced1SEike Rathke+		GrSlotStream * psstrmThis = psstrm;
1490889cced1SEike Rathke+		if (fMidPass && islot < psstrm->WritePos())
1491889cced1SEike Rathke+		{
1492889cced1SEike Rathke+			pslot = psstrm->MidPassSlotAt(islot, psstrmNext);
1493889cced1SEike Rathke+			psstrmThis = psstrmNext;
1494889cced1SEike Rathke+		}
1495889cced1SEike Rathke+		else
1496889cced1SEike Rathke+		{
1497889cced1SEike Rathke+			//pslot = (isstrm == ipass) ?	psstrm->SlotAt(islot) :	psstrm->OutputSlotAt(islot);
1498889cced1SEike Rathke+			pslot = psstrm->SlotAt(islot);
1499889cced1SEike Rathke+		}
1500889cced1SEike Rathke
1501889cced1SEike Rathke 		if (!pslot->IsBase())
1502889cced1SEike Rathke 		{
1503889cced1SEike Rathke 			//	This slot is attached to another; it will be positioned strictly
1504889cced1SEike Rathke 			//	relative to that one. This happens in the loop below.
1505889cced1SEike Rathke 			vpslotAttached.push_back(pslot);
1506889cced1SEike Rathke+			vpsstrmAttached.push_back(psstrmThis);
1507889cced1SEike Rathke 		}
1508889cced1SEike Rathke 		else
1509889cced1SEike Rathke 		{
1510889cced1SEike Rathke@@ -2455,7 +2471,7 @@
1511889cced1SEike Rathke 			}
1512889cced1SEike Rathke
1513889cced1SEike Rathke 			//	Make sure the metrics are the complete ones.
1514889cced1SEike Rathke-			pslot->CalcCompositeMetrics(this, psstrm, kPosInfinity, true);
1515889cced1SEike Rathke+			pslot->CalcCompositeMetrics(this, psstrm, psstrmNext, kPosInfinity, true);
1516889cced1SEike Rathke
1517889cced1SEike Rathke 			float xsInc = pslot->GlyphXOffset(psstrm, fakeItalicRatio);
1518889cced1SEike Rathke 			float ysInc = pslot->GlyphYOffset(psstrm);
1519889cced1SEike Rathke@@ -2514,8 +2530,9 @@
1520889cced1SEike Rathke
1521889cced1SEike Rathke 	for (size_t ipslot = 0; ipslot < vpslotAttached.size(); ipslot++)
1522889cced1SEike Rathke 	{
1523889cced1SEike Rathke-		GrSlotState * pslot = vpslotAttached[ipslot];
1524889cced1SEike Rathke-		GrSlotState * pslotBase = pslot->Base(psstrm);
1525889cced1SEike Rathke+		GrSlotState * pslotAtt = vpslotAttached[ipslot];
1526889cced1SEike Rathke+		GrSlotStream * psstrmAtt = vpsstrmAttached[ipslot];
1527889cced1SEike Rathke+		GrSlotState * pslotBase = pslotAtt->Base(psstrmAtt);
1528889cced1SEike Rathke 		if (pslotBase->XPosition() == kNegInfinity || pslotBase->YPosition() == kNegInfinity)
1529889cced1SEike Rathke 		{
1530889cced1SEike Rathke 			Assert(false);
1531889cced1SEike Rathke@@ -2523,10 +2540,10 @@
1532889cced1SEike Rathke 		}
1533889cced1SEike Rathke 		float xsCluster = pslotBase->XPosition() - pslotBase->GlyphXOffset(psstrm, fakeItalicRatio);
1534889cced1SEike Rathke 		float ysCluster = pslotBase->YPosition() - pslotBase->GlyphYOffset(psstrm);
1535889cced1SEike Rathke-		float xsInc = pslot->GlyphXOffset(psstrm, fakeItalicRatio);
1536889cced1SEike Rathke-		float ysInc = pslot->GlyphYOffset(psstrm);
1537889cced1SEike Rathke-		pslot->SetXPos(xsCluster + xsInc);
1538889cced1SEike Rathke-		pslot->SetYPos(ysCluster + ysInc);
1539889cced1SEike Rathke+		float xsInc = pslotAtt->GlyphXOffset(psstrm, fakeItalicRatio);
1540889cced1SEike Rathke+		float ysInc = pslotAtt->GlyphYOffset(psstrm);
1541889cced1SEike Rathke+		pslotAtt->SetXPos(xsCluster + xsInc);
1542889cced1SEike Rathke+		pslotAtt->SetYPos(ysCluster + ysInc);
1543889cced1SEike Rathke
1544889cced1SEike Rathke 		//	My theory is that we don't need to adjust *pxsWidth here, because the width of
1545889cced1SEike Rathke 		//	any non-base slots should be factored into the advance width of their cluster
1546889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/GrTableManager.h	Wed Jan 28 04:01:29 2009
1547889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrTableManager.h	Sat Aug 22 19:36:35 2009
1548889cced1SEike Rathke@@ -442,7 +442,7 @@
1549889cced1SEike Rathke 	int LogToEmUnits(float xys);
1550889cced1SEike Rathke 	bool GPointToXY(gid16 chwGlyphID, int nGPoint, float * xs, float * ys);
1551889cced1SEike Rathke
1552889cced1SEike Rathke-	void CalcPositionsUpTo(int ipass, GrSlotState * pslotLast,
1553889cced1SEike Rathke+	void CalcPositionsUpTo(int ipass, GrSlotState * pslotLast, bool fMidPass,
1554889cced1SEike Rathke 		float * pxsWidth, float * pxsVisibleWidth);
1555889cced1SEike Rathke
1556889cced1SEike Rathke 	void InitPosCache()
1557889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/Platform.cpp	Thu Jan 22 00:36:42 2009
1558889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/Platform.cpp	Sat Aug 22 19:36:35 2009
1559889cced1SEike Rathke@@ -103,7 +103,7 @@
1560889cced1SEike Rathke {
1561889cced1SEike Rathke 	// assumes NULL terminated strings
1562889cced1SEike Rathke 	const utf16 *start = s;
1563889cced1SEike Rathke-	for (; *s; ++s);
1564889cced1SEike Rathke+	for (; *s; ++s) {};
1565889cced1SEike Rathke
1566889cced1SEike Rathke 	return s - start;
1567889cced1SEike Rathke }
1568889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/Segment.cpp	Thu Aug 21 16:24:32 2008
1569889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/Segment.cpp	Sat Aug 22 19:36:35 2009
1570889cced1SEike Rathke@@ -1178,7 +1178,7 @@
1571889cced1SEike Rathke 	part of the segment.
1572889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1573889cced1SEike Rathke float Segment::getRangeWidth(int ichMin, int ichLim,
1574889cced1SEike Rathke-	bool fStartLine, bool fEndLine, bool fSkipSpace)
1575889cced1SEike Rathke+	bool /*fStartLine*/, bool /*fEndLine*/, bool fSkipSpace)
1576889cced1SEike Rathke {
1577889cced1SEike Rathke 	if (m_dxsWidth < 0)
1578889cced1SEike Rathke 	{
1579889cced1SEike Rathke@@ -1549,7 +1549,11 @@
1580889cced1SEike Rathke void Segment::SetUpOutputArrays(Font * pfont, GrTableManager * ptman,
1581889cced1SEike Rathke 	GrSlotStream * psstrmFinal,
1582889cced1SEike Rathke 	int cchwInThisSeg, int csloutSurface, gid16 chwLB,
1583889cced1SEike Rathke+#ifdef NDEBUG
1584889cced1SEike Rathke+	TrWsHandling twsh, bool fParaRtl, int nDirDepth, bool /*fEmpty*/)
1585889cced1SEike Rathke+#else
1586889cced1SEike Rathke 	TrWsHandling twsh, bool fParaRtl, int nDirDepth, bool fEmpty)
1587889cced1SEike Rathke+#endif
1588889cced1SEike Rathke {
1589889cced1SEike Rathke 	m_mFontEmUnits = EngineImpl()->GetFontEmUnits();
1590889cced1SEike Rathke
1591889cced1SEike Rathke@@ -1725,7 +1729,7 @@
1592889cced1SEike Rathke 	Set up the data structures that represent the actual rendered glyphs for the new segment.
1593889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1594889cced1SEike Rathke void Segment::SetUpGlyphInfo(GrTableManager * ptman, GrSlotStream * psstrmFinal,
1595889cced1SEike Rathke-	gid16 chwLB, int nDirDepth, int islotMin, int cslot)
1596889cced1SEike Rathke+	gid16 chwLB, int /*nDirDepth*/, int islotMin, int cslot)
1597889cced1SEike Rathke {
1598889cced1SEike Rathke 	//int paraDirLevel = (ptman->State()->ParaRightToLeft()) ? 1 : 0;
1599889cced1SEike Rathke
1600889cced1SEike Rathke@@ -1751,7 +1755,7 @@
1601889cced1SEike Rathke
1602889cced1SEike Rathke 	m_isloutGinf0 = -1;
1603889cced1SEike Rathke 	int iginf = 0;
1604889cced1SEike Rathke-	for (int islot = islotMin; islot < cslot; islot++)
1605889cced1SEike Rathke+	for (islot = islotMin; islot < cslot; islot++)
1606889cced1SEike Rathke 	{
1607889cced1SEike Rathke 		GrSlotState * pslot = psstrmFinal->SlotAt(islot);
1608889cced1SEike Rathke
1609889cced1SEike Rathke@@ -2160,7 +2164,7 @@
1610889cced1SEike Rathke 	@param ichwUnder		- character index relative to the official beginning of the segment
1611889cced1SEike Rathke 	@param islot			- processed glyph it maps to
1612889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1613889cced1SEike Rathke-void Segment::MarkSlotInPrevSeg(int ichwUnder, int islot)
1614889cced1SEike Rathke+void Segment::MarkSlotInPrevSeg(int ichwUnder, int /*islot*/)
1615889cced1SEike Rathke {
1616889cced1SEike Rathke 	if (ichwUnder >= m_ichwAssocsMin)
1617889cced1SEike Rathke 		m_prgisloutBefore[ichwUnder - m_ichwAssocsMin] = kNegInfinity;
1618889cced1SEike Rathke@@ -2174,7 +2178,7 @@
1619889cced1SEike Rathke 	@param ichwUnder		- character index relative to the official beginning of the segment
1620889cced1SEike Rathke 	@param islot			- processed glyph it maps to
1621889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1622889cced1SEike Rathke-void Segment::MarkSlotInNextSeg(int ichwUnder, int islot)
1623889cced1SEike Rathke+void Segment::MarkSlotInNextSeg(int ichwUnder, int /*islot*/)
1624889cced1SEike Rathke {
1625889cced1SEike Rathke 	if (ichwUnder < m_ichwAssocsLim)
1626889cced1SEike Rathke 		m_prgisloutAfter[ichwUnder - m_ichwAssocsMin] = kPosInfinity;
1627889cced1SEike Rathke@@ -2351,7 +2355,7 @@
1628889cced1SEike Rathke 	@param pfAfter			- return true if they clicked on trailing side; possibly NULL
1629889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1630889cced1SEike Rathke int Segment::LogicalSurfaceToUnderlying(int islout, float xsOffset, float ysClick,
1631889cced1SEike Rathke-	float dxsGlyphWidth, float dysGlyphHeight, bool * pfAfter)
1632889cced1SEike Rathke+	float dxsGlyphWidth, float /*dysGlyphHeight*/, bool * pfAfter)
1633889cced1SEike Rathke {
1634889cced1SEike Rathke 	Assert(islout >= 0);
1635889cced1SEike Rathke 	Assert(islout < m_cslout);
1636889cced1SEike Rathke@@ -2529,31 +2533,31 @@
1637889cced1SEike Rathke 	else if (fBefore)
1638889cced1SEike Rathke 	{
1639889cced1SEike Rathke 		int isloutRet;
1640889cced1SEike Rathke-		int ichw = ichwSegOffset;
1641889cced1SEike Rathke+		int ichwTemp = ichwSegOffset;
1642889cced1SEike Rathke 		//	If no association has been made, loop forward to the next slot
1643889cced1SEike Rathke 		//	we are before. As a last resort, answer kPosInfinity, meaning we
1644889cced1SEike Rathke 		//	aren't before anything.
1645889cced1SEike Rathke 		do
1646889cced1SEike Rathke 		{
1647889cced1SEike Rathke-			isloutRet = m_prgisloutBefore[ichw - m_ichwAssocsMin];
1648889cced1SEike Rathke-			do { ++ichw; }
1649889cced1SEike Rathke-			while (!GrCharStream::AtUnicodeCharBoundary(m_pgts, ichw));
1650889cced1SEike Rathke-		} while (isloutRet == kPosInfinity && ichw < m_ichwAssocsLim);
1651889cced1SEike Rathke+			isloutRet = m_prgisloutBefore[ichwTemp - m_ichwAssocsMin];
1652889cced1SEike Rathke+			do { ++ichwTemp; }
1653889cced1SEike Rathke+			while (!GrCharStream::AtUnicodeCharBoundary(m_pgts, ichwTemp));
1654889cced1SEike Rathke+		} while (isloutRet == kPosInfinity && ichwTemp < m_ichwAssocsLim);
1655889cced1SEike Rathke 		return isloutRet;
1656889cced1SEike Rathke 	}
1657889cced1SEike Rathke 	else
1658889cced1SEike Rathke 	{
1659889cced1SEike Rathke 		int isloutRet;
1660889cced1SEike Rathke-		int ichw = ichwSegOffset;
1661889cced1SEike Rathke+		int ichwTemp = ichwSegOffset;
1662889cced1SEike Rathke 		//	If no association has been made, loop backward to the previous slot
1663889cced1SEike Rathke 		//	we are after. As a last resort, answer kNegInfinity, meaning we
1664889cced1SEike Rathke 		//	aren't after anything.
1665889cced1SEike Rathke 		do
1666889cced1SEike Rathke 		{
1667889cced1SEike Rathke-			isloutRet = m_prgisloutAfter[ichw - m_ichwAssocsMin];
1668889cced1SEike Rathke-			do { --ichw; }
1669889cced1SEike Rathke-			while (!GrCharStream::AtUnicodeCharBoundary(m_pgts, ichw));
1670889cced1SEike Rathke-		} while (isloutRet == kNegInfinity && ichw >= 0);
1671889cced1SEike Rathke+			isloutRet = m_prgisloutAfter[ichwTemp - m_ichwAssocsMin];
1672889cced1SEike Rathke+			do { --ichwTemp; }
1673889cced1SEike Rathke+			while (!GrCharStream::AtUnicodeCharBoundary(m_pgts, ichwTemp));
1674889cced1SEike Rathke+		} while (isloutRet == kNegInfinity && ichwTemp >= 0);
1675889cced1SEike Rathke 		return isloutRet;
1676889cced1SEike Rathke 	}
1677889cced1SEike Rathke 	Assert(false); // should never reach here
1678889cced1SEike Rathke@@ -2748,7 +2752,11 @@
1679889cced1SEike Rathke 	that root glyph as one of its roots.
1680889cced1SEike Rathke 	OBSOLETE
1681889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1682889cced1SEike Rathke+#ifdef _DEBUG
1683889cced1SEike Rathke void Segment::AssertValidClusters(GrSlotStream * psstrm)
1684889cced1SEike Rathke+#else
1685889cced1SEike Rathke+void Segment::AssertValidClusters(GrSlotStream * /*psstrm*/)
1686889cced1SEike Rathke+#endif
1687889cced1SEike Rathke {
1688889cced1SEike Rathke #ifdef _DEBUG
1689889cced1SEike Rathke 	for (int islot = 0; islot < psstrm->WritePos(); islot++)
1690889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/src/segment/TransductionLog.cpp	Wed Jan 28 04:01:29 2009
1691889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/TransductionLog.cpp	Sat Aug 22 19:36:35 2009
1692889cced1SEike Rathke@@ -175,7 +175,7 @@
1693889cced1SEike Rathke 	Output a file showing a log of the transduction process and the resulting segment.
1694889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1695889cced1SEike Rathke void GrTableManager::WriteXductnLog(std::ostream & strmOut,
1696889cced1SEike Rathke-	GrCharStream * pchstrm, Segment * psegRet,
1697889cced1SEike Rathke+	GrCharStream * pchstrm, Segment * /*psegRet*/,
1698889cced1SEike Rathke 	int cbPrevSegDat, byte * pbPrevSegDat)
1699889cced1SEike Rathke {
1700889cced1SEike Rathke 	if (cbPrevSegDat == 0)
1701889cced1SEike Rathke@@ -416,8 +416,8 @@
1702889cced1SEike Rathke 	the raw (UTF-16 or UTF-8) chars for display. To do this we get the raw characters
1703889cced1SEike Rathke 	directly from the text source.
1704889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1705889cced1SEike Rathke-void GrCharStream::GetLogDataRaw(GrTableManager * ptman, int cchl, int cchrBackup,
1706889cced1SEike Rathke-	int cchrMaxRaw, int * prgchl,
1707889cced1SEike Rathke+void GrCharStream::GetLogDataRaw(GrTableManager * /*ptman*/, int cchl, int cchrBackup,
1708889cced1SEike Rathke+	int /*cchrMaxRaw*/, int * prgchl,
1709889cced1SEike Rathke 	utf16 * prgchw2, utf16 * prgchw3, utf16 * prgchw4, utf16 * prgchw5, utf16 * prgchw6,
1710889cced1SEike Rathke 	int * prgcchr)
1711889cced1SEike Rathke {
1712889cced1SEike Rathke@@ -441,7 +441,7 @@
1713889cced1SEike Rathke 	case kutf8:
1714889cced1SEike Rathke 		prgchsRunText8 = new utf8[cchrRange];
1715889cced1SEike Rathke 		m_pgts->fetch(ichrMin, cchrRange, prgchsRunText8);
1716889cced1SEike Rathke-		for (int ichr = 0; ichr < cchrRange; ichr++)
1717889cced1SEike Rathke+		for (ichr = 0; ichr < cchrRange; ichr++)
1718889cced1SEike Rathke 			prgchwRunText[ichr] = (utf16)prgchsRunText8[ichr];	// zero-extend into UTF-16 buffer
1719889cced1SEike Rathke 		break;
1720889cced1SEike Rathke 	case kutf16:
1721889cced1SEike Rathke@@ -634,7 +634,7 @@
1722889cced1SEike Rathke 	m_pzpst->LogRulesFiredAndFailed(strmOut, psstrmIn);
1723889cced1SEike Rathke }
1724889cced1SEike Rathke
1725889cced1SEike Rathke-void PassState::LogRulesFiredAndFailed(std::ostream & strmOut, GrSlotStream * psstrmIn)
1726889cced1SEike Rathke+void PassState::LogRulesFiredAndFailed(std::ostream & strmOut, GrSlotStream * /*psstrmIn*/)
1727889cced1SEike Rathke {
1728889cced1SEike Rathke
1729889cced1SEike Rathke 	strmOut << "PASS " << m_ipass << "\n\n" << "Rules matched: ";
1730889cced1SEike Rathke@@ -1193,7 +1193,7 @@
1731889cced1SEike Rathke 	if (fAnyPseudos)
1732889cced1SEike Rathke 	{
1733889cced1SEike Rathke 		strmOut << "Actual glyphs: ";
1734889cced1SEike Rathke-		for (int islout = 0; islout < m_cslout; islout++)
1735889cced1SEike Rathke+		for (islout = 0; islout < m_cslout; islout++)
1736889cced1SEike Rathke 		{
1737889cced1SEike Rathke 			GrSlotOutput * psloutTmp = m_prgslout + islout;
1738889cced1SEike Rathke 			if (psloutTmp->GlyphID() != psloutTmp->ActualGlyphForOutput(ptman))
1739889cced1SEike Rathke@@ -1319,7 +1319,7 @@
1740889cced1SEike Rathke 	Write out the header lines for the slot contents.
1741889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1742889cced1SEike Rathke void GrTableManager::LogSlotHeader(std::ostream & strmOut, int islotLim,
1743889cced1SEike Rathke-	int cspPerSlot, int cspLeading, int islotMin)
1744889cced1SEike Rathke+	int /*cspPerSlot*/, int cspLeading, int islotMin)
1745889cced1SEike Rathke {
1746889cced1SEike Rathke 	islotLim = min(islotLim, MAX_SLOTS);
1747889cced1SEike Rathke
1748889cced1SEike Rathke@@ -1721,7 +1721,7 @@
1749889cced1SEike Rathke
1750889cced1SEike Rathke 	case kslatAttAtX:	// always do these in pairs
1751889cced1SEike Rathke 	case kslatAttAtY:
1752889cced1SEike Rathke-		if (m_mAttachAtX != (pslotPrev ? pslotPrev->m_mAttachAtX : kNotYetSet) ||
1753889cced1SEike Rathke+		if (m_mAttachAtX != (pslotPrev ? pslotPrev->m_mAttachAtX : static_cast<short>(kNotYetSet)) ||
1754889cced1SEike Rathke 			m_mAttachAtY != (pslotPrev ? pslotPrev->m_mAttachAtY : 0))
1755889cced1SEike Rathke 		{
1756889cced1SEike Rathke 			ptman->LogInTable(strmOut,
1757889cced1SEike Rathke@@ -1730,7 +1730,7 @@
1758889cced1SEike Rathke 		}
1759889cced1SEike Rathke 		break;
1760889cced1SEike Rathke 	case kslatAttAtGpt:
1761889cced1SEike Rathke-		if (m_nAttachAtGpoint != (pslotPrev ? pslotPrev->m_nAttachAtGpoint : kNotYetSet))
1762889cced1SEike Rathke+		if (m_nAttachAtGpoint != (pslotPrev ? pslotPrev->m_nAttachAtGpoint : static_cast<short>(kNotYetSet)))
1763889cced1SEike Rathke 		{
1764889cced1SEike Rathke 			ptman->LogInTable(strmOut,
1765889cced1SEike Rathke 				((m_nAttachAtGpoint == kGpointZero) ? 0 : m_nAttachAtGpoint));
1766889cced1SEike Rathke@@ -1750,7 +1750,7 @@
1767889cced1SEike Rathke
1768889cced1SEike Rathke 	case kslatAttWithX:	// always do these in pairs
1769889cced1SEike Rathke 	case kslatAttWithY:
1770889cced1SEike Rathke-		if (m_mAttachWithX != (pslotPrev ? pslotPrev->m_mAttachWithX : kNotYetSet) ||
1771889cced1SEike Rathke+		if (m_mAttachWithX != (pslotPrev ? pslotPrev->m_mAttachWithX : static_cast<short>(kNotYetSet)) ||
1772889cced1SEike Rathke 			m_mAttachWithY != (pslotPrev ? pslotPrev->m_mAttachWithY : 0))
1773889cced1SEike Rathke 		{
1774889cced1SEike Rathke 			ptman->LogInTable(strmOut,
1775889cced1SEike Rathke@@ -1759,7 +1759,7 @@
1776889cced1SEike Rathke 		}
1777889cced1SEike Rathke 		break;
1778889cced1SEike Rathke 	case kslatAttWithGpt:
1779889cced1SEike Rathke-		if (m_nAttachWithGpoint != (pslotPrev ? pslotPrev->m_nAttachWithGpoint : kNotYetSet))
1780889cced1SEike Rathke+		if (m_nAttachWithGpoint != (pslotPrev ? pslotPrev->m_nAttachWithGpoint : static_cast<short>(kNotYetSet)))
1781889cced1SEike Rathke 		{
1782889cced1SEike Rathke 			ptman->LogInTable(strmOut,
1783889cced1SEike Rathke 				((m_nAttachWithGpoint == kGpointZero) ? 0 : m_nAttachWithGpoint));
1784889cced1SEike Rathke@@ -1786,14 +1786,14 @@
1785889cced1SEike Rathke 		break;
1786889cced1SEike Rathke
1787889cced1SEike Rathke 	case kslatBreak:
1788889cced1SEike Rathke-		if (m_lb != (pslotPrev ? pslotPrev->m_lb : kNotYetSet8))
1789889cced1SEike Rathke+		if (m_lb != (pslotPrev ? pslotPrev->m_lb : static_cast<sdata8>(kNotYetSet8)))
1790889cced1SEike Rathke 		{
1791889cced1SEike Rathke 			ptman->LogBreakWeightInTable(strmOut, m_lb);
1792889cced1SEike Rathke 			return;
1793889cced1SEike Rathke 		}
1794889cced1SEike Rathke 		break;
1795889cced1SEike Rathke 	case kslatDir:
1796889cced1SEike Rathke-		if (m_dirc != (pslotPrev ? pslotPrev->m_dirc : kNotYetSet8))
1797889cced1SEike Rathke+		if (m_dirc != (pslotPrev ? pslotPrev->m_dirc : static_cast<sdata8>(kNotYetSet8)))
1798889cced1SEike Rathke 		{
1799889cced1SEike Rathke 			ptman->LogDirCodeInTable(strmOut, m_dirc);
1800889cced1SEike Rathke 			return;
1801889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/test/ProfileHarness/GrUtfTextSrc.cpp	Thu Jan 22 00:36:42 2009
1802889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/ProfileHarness/GrUtfTextSrc.cpp	Sat Aug 22 19:36:35 2009
1803889cced1SEike Rathke@@ -210,12 +210,12 @@
1804889cced1SEike Rathke }
1805889cced1SEike Rathke
1806889cced1SEike Rathke
1807889cced1SEike Rathke-bool GrUtfTextSrc::getRightToLeft(gr::toffset ich)
1808889cced1SEike Rathke+bool GrUtfTextSrc::getRightToLeft(gr::toffset /*ich*/)
1809889cced1SEike Rathke {
1810889cced1SEike Rathke 	return mRtl; // assumes src only contains one direction
1811889cced1SEike Rathke }
1812889cced1SEike Rathke
1813889cced1SEike Rathke-unsigned int GrUtfTextSrc::getDirectionDepth(gr::toffset ich)
1814889cced1SEike Rathke+unsigned int GrUtfTextSrc::getDirectionDepth(gr::toffset /*ich*/)
1815889cced1SEike Rathke {
1816889cced1SEike Rathke 	return (mRtl) ? 1 : 0; // TBD
1817889cced1SEike Rathke }
1818889cced1SEike Rathke@@ -254,7 +254,7 @@
1819889cced1SEike Rathke 	return range;
1820889cced1SEike Rathke }
1821889cced1SEike Rathke
1822889cced1SEike Rathke-size_t GrUtfTextSrc::getFontFeatures(gr::toffset ich, gr::FeatureSetting * prgfset)
1823889cced1SEike Rathke+size_t GrUtfTextSrc::getFontFeatures(gr::toffset /*ich*/, gr::FeatureSetting * /*prgfset*/)
1824889cced1SEike Rathke {
1825889cced1SEike Rathke 	return 0;
1826889cced1SEike Rathke }
1827889cced1SEike Rathke@@ -277,14 +277,14 @@
1828889cced1SEike Rathke
1829889cced1SEike Rathke // these should be called I hope
1830889cced1SEike Rathke float
1831889cced1SEike Rathke-GrUtfTextSrc::getFontSize(gr::toffset ich)
1832889cced1SEike Rathke+GrUtfTextSrc::getFontSize(gr::toffset /*ich*/)
1833889cced1SEike Rathke {
1834889cced1SEike Rathke 	assert(mFont);
1835889cced1SEike Rathke 	return mPointSize;
1836889cced1SEike Rathke }
1837889cced1SEike Rathke
1838889cced1SEike Rathke bool
1839889cced1SEike Rathke-GrUtfTextSrc::getBold(gr::toffset ich)
1840889cced1SEike Rathke+GrUtfTextSrc::getBold(gr::toffset /*ich*/)
1841889cced1SEike Rathke {
1842889cced1SEike Rathke 	assert(mFont);
1843889cced1SEike Rathke //	NS_ASSERTION(false, "unexpected call to getBold");
1844889cced1SEike Rathke@@ -293,7 +293,7 @@
1845889cced1SEike Rathke }
1846889cced1SEike Rathke
1847889cced1SEike Rathke bool
1848889cced1SEike Rathke-GrUtfTextSrc::getItalic(gr::toffset ich)
1849889cced1SEike Rathke+GrUtfTextSrc::getItalic(gr::toffset /*ich*/)
1850889cced1SEike Rathke {
1851889cced1SEike Rathke 	assert(mFont);
1852889cced1SEike Rathke 	//NS_ASSERTION(false, "unexpected call to getItalic");
1853889cced1SEike Rathke@@ -301,7 +301,7 @@
1854889cced1SEike Rathke 	return mFont->italic();
1855889cced1SEike Rathke }
1856889cced1SEike Rathke
1857889cced1SEike Rathke-gr::isocode GrUtfTextSrc::getLanguage(gr::toffset ich)
1858889cced1SEike Rathke+gr::isocode GrUtfTextSrc::getLanguage(gr::toffset /*ich*/)
1859889cced1SEike Rathke {
1860889cced1SEike Rathke   gr::isocode unknown;
1861889cced1SEike Rathke   std::fill_n(unknown.rgch, 4, '\0');
1862889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/test/ProfileHarness/GrUtfTextSrc.h	Thu Jan 22 00:36:42 2009
1863889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/ProfileHarness/GrUtfTextSrc.h	Sat Aug 22 19:36:35 2009
1864889cced1SEike Rathke@@ -79,7 +79,7 @@
1865889cced1SEike Rathke   virtual size_t fetch(gr::toffset ichMin, size_t cch, gr::utf32 * prgchBuffer);
1866889cced1SEike Rathke   virtual size_t fetch(gr::toffset ichMin, size_t cch, gr::utf16 * prgchwBuffer);
1867889cced1SEike Rathke   virtual size_t fetch(gr::toffset ichMin, size_t cch, gr::utf8  * prgchsBuffer);
1868889cced1SEike Rathke-  virtual gr::GrResult getFaceName(int ich, unsigned int cchMax,
1869889cced1SEike Rathke+  virtual gr::GrResult getFaceName(int /*ich*/, unsigned int /*cchMax*/,
1870889cced1SEike Rathke     gr::utf16 * prgchFaceName, unsigned int * pcchLen)
1871889cced1SEike Rathke   {
1872889cced1SEike Rathke     prgchFaceName[0] = 0;
1873889cced1SEike Rathke@@ -92,12 +92,12 @@
1874889cced1SEike Rathke   virtual bool getItalic(gr::toffset ich);
1875889cced1SEike Rathke   virtual bool getRightToLeft(gr::toffset ich);
1876889cced1SEike Rathke   virtual unsigned int getDirectionDepth(gr::toffset ich);
1877889cced1SEike Rathke-  virtual float getVerticalOffset(gr::toffset ich) { return 0;};
1878889cced1SEike Rathke+  virtual float getVerticalOffset(gr::toffset /*ich*/) { return 0;};
1879889cced1SEike Rathke   virtual gr::isocode getLanguage(gr::toffset ich);
1880889cced1SEike Rathke
1881889cced1SEike Rathke   virtual std::pair<gr::toffset, gr::toffset> propertyRange(gr::toffset ich);
1882889cced1SEike Rathke   virtual size_t getFontFeatures(gr::toffset ich, gr::FeatureSetting * prgfset);
1883889cced1SEike Rathke-  virtual bool sameSegment(gr::toffset ich1, gr::toffset ich2) { return true; };
1884889cced1SEike Rathke+  virtual bool sameSegment(gr::toffset /*ich1*/, gr::toffset /*ich2*/) { return true; };
1885889cced1SEike Rathke
1886889cced1SEike Rathke protected:
1887889cced1SEike Rathke   bool checkBuffer8();
1888889cced1SEike Rathke@@ -129,11 +129,11 @@
1889889cced1SEike Rathke   virtual void getColors(gr::toffset ich, int * pclrFore, int * pclrBack);
1890889cced1SEike Rathke
1891889cced1SEike Rathke   // Shouldn't be here!
1892889cced1SEike Rathke-  virtual gr::GrResult Fetch(int ichMin, int ichLim, gr::utf16 * prgchBuf) { return gr::kresNotImpl; };
1893889cced1SEike Rathke-  virtual gr::GrResult get_Length(int * pcch) { return gr::kresNotImpl; };
1894889cced1SEike Rathke-  virtual gr::GrResult GetFontVariations(int ich,
1895889cced1SEike Rathke-    wchar_t * prgchFontVar, int ichMax, int * pich,
1896889cced1SEike Rathke-    int * pichMin, int * pichLim) { return gr::kresNotImpl; };
1897889cced1SEike Rathke+  virtual gr::GrResult Fetch(int /*ichMin*/, int /*ichLim*/, gr::utf16 * /*prgchBuf*/) { return gr::kresNotImpl; };
1898889cced1SEike Rathke+  virtual gr::GrResult get_Length(int * /*pcch*/) { return gr::kresNotImpl; };
1899889cced1SEike Rathke+  virtual gr::GrResult GetFontVariations(int /*ich*/,
1900889cced1SEike Rathke+    wchar_t * /*prgchFontVar*/, int /*ichMax*/, int * /*pich*/,
1901889cced1SEike Rathke+    int * /*pichMin*/, int * /*pichLim*/) { return gr::kresNotImpl; };
1902889cced1SEike Rathke
1903889cced1SEike Rathke };
1904889cced1SEike Rathke
1905889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/test/ProfileHarness/ProfileHarness.cpp	Thu Jan 22 00:36:42 2009
1906889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/ProfileHarness/ProfileHarness.cpp	Sat Aug 22 19:36:35 2009
1907889cced1SEike Rathke@@ -39,14 +39,14 @@
1908889cced1SEike Rathke typedef std::pair< gr::GlyphIterator, gr::GlyphIterator > GlyphRange;
1909889cced1SEike Rathke
1910889cced1SEike Rathke #ifndef HAVE_STRTOF
1911889cced1SEike Rathke-float strtof(char * text, char ** ignore)
1912889cced1SEike Rathke+float strtof(char * text, char ** /*ignore*/)
1913889cced1SEike Rathke {
1914889cced1SEike Rathke   return static_cast<float>(atof(text));
1915889cced1SEike Rathke }
1916889cced1SEike Rathke #endif
1917889cced1SEike Rathke
1918889cced1SEike Rathke #ifndef HAVE_STRTOL
1919889cced1SEike Rathke-long strtol(char * text, char ** ignore)
1920889cced1SEike Rathke+long strtol(char * text, char ** /*ignore*/)
1921889cced1SEike Rathke {
1922889cced1SEike Rathke   return atol(text);
1923889cced1SEike Rathke }
1924889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/test/RegressionTest/GrJustifier.cpp	Thu Jan 22 00:36:42 2009
1925889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/GrJustifier.cpp	Sat Aug 22 19:36:35 2009
1926889cced1SEike Rathke@@ -327,7 +327,7 @@
1927889cced1SEike Rathke 					&dxStretchAchieved);
1928889cced1SEike Rathke 				for (int iiiGlyph = 0; iiiGlyph < cStretchable; iiiGlyph++)
1929889cced1SEike Rathke 				{
1930889cced1SEike Rathke-					int iiGlyph = viiGlyphsRem[iiiGlyph];
1931889cced1SEike Rathke+					iiGlyph = viiGlyphsRem[iiiGlyph];
1932889cced1SEike Rathke 					vdxStretchLeft[iiGlyph] = vdxStretchRem[iiiGlyph];
1933889cced1SEike Rathke 					vdxWidth[iiGlyph] = vdxWidthRem[iiiGlyph];
1934889cced1SEike Rathke 				}
1935889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/test/RegressionTest/RegressionTest.cpp	Thu Jan 22 00:36:42 2009
1936889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/RegressionTest.cpp	Sat Aug 22 19:36:35 2009
1937889cced1SEike Rathke@@ -675,7 +675,7 @@
1938889cced1SEike Rathke 	OutputErrorAux(ptcase, strErr, i, true, valueFound, valueExpected);
1939889cced1SEike Rathke }
1940889cced1SEike Rathke
1941889cced1SEike Rathke-void OutputErrorAux(TestCase * ptcase, std::string strErr, int i,
1942889cced1SEike Rathke+void OutputErrorAux(TestCase * /*ptcase*/, std::string strErr, int i,
1943889cced1SEike Rathke 	bool showValues, int valueFound, int valueExpected)
1944889cced1SEike Rathke {
1945889cced1SEike Rathke //	if (g_debugMode)
1946889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.cpp	Thu Jan 22 00:36:42 2009
1947889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.cpp	Sat Aug 22 19:36:36 2009
1948889cced1SEike Rathke@@ -70,7 +70,7 @@
1949889cced1SEike Rathke /*----------------------------------------------------------------------------------------------
1950889cced1SEike Rathke 	Return true if the text uses a right-to-left writing system.
1951889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1952889cced1SEike Rathke-bool SimpleTextSrc::getRightToLeft(toffset ich)
1953889cced1SEike Rathke+bool SimpleTextSrc::getRightToLeft(toffset /*ich*/)
1954889cced1SEike Rathke {
1955889cced1SEike Rathke 	return false;
1956889cced1SEike Rathke }
1957889cced1SEike Rathke@@ -78,7 +78,7 @@
1958889cced1SEike Rathke /*----------------------------------------------------------------------------------------------
1959889cced1SEike Rathke 	Return the depth of embedding of the writing system.
1960889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1961889cced1SEike Rathke-unsigned int SimpleTextSrc::getDirectionDepth(toffset ich)
1962889cced1SEike Rathke+unsigned int SimpleTextSrc::getDirectionDepth(toffset /*ich*/)
1963889cced1SEike Rathke {
1964889cced1SEike Rathke 	return 0;
1965889cced1SEike Rathke }
1966889cced1SEike Rathke@@ -87,7 +87,7 @@
1967889cced1SEike Rathke 	Return the vertical offset of the text. This simple implementation provides no
1968889cced1SEike Rathke 	vertical offset.
1969889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
1970889cced1SEike Rathke-float SimpleTextSrc::getVerticalOffset(toffset ich)
1971889cced1SEike Rathke+float SimpleTextSrc::getVerticalOffset(toffset /*ich*/)
1972889cced1SEike Rathke {
1973889cced1SEike Rathke 	return 0;
1974889cced1SEike Rathke }
1975889cced1SEike Rathke--- misc/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.h	Thu Jan 22 00:36:42 2009
1976889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.h	Sat Aug 22 19:36:36 2009
1977889cced1SEike Rathke@@ -59,12 +59,12 @@
1978889cced1SEike Rathke 	{
1979889cced1SEike Rathke 		return m_cchLength;
1980889cced1SEike Rathke 	}
1981889cced1SEike Rathke-	virtual size_t fetch(toffset ichMin, size_t cch, utf32 * prgchBuffer)
1982889cced1SEike Rathke+	virtual size_t fetch(toffset /*ichMin*/, size_t /*cch*/, utf32 * /*prgchBuffer*/)
1983889cced1SEike Rathke 	{
1984889cced1SEike Rathke 		throw;
1985889cced1SEike Rathke 	}
1986889cced1SEike Rathke 	virtual size_t fetch(toffset ichMin, size_t cch, gr::utf16 * prgchwBuffer);
1987889cced1SEike Rathke-	virtual size_t fetch(toffset ichMin, size_t cch, utf8  * prgchsBuffer)
1988889cced1SEike Rathke+	virtual size_t fetch(toffset /*ichMin*/, size_t /*cch*/, utf8  * /*prgchsBuffer*/)
1989889cced1SEike Rathke 	{
1990889cced1SEike Rathke 		throw;
1991889cced1SEike Rathke 	};
1992889cced1SEike Rathke@@ -73,14 +73,14 @@
1993889cced1SEike Rathke 	virtual unsigned int getDirectionDepth(toffset ich);
1994889cced1SEike Rathke 	virtual float getVerticalOffset(toffset ich);
1995889cced1SEike Rathke
1996889cced1SEike Rathke-	virtual isocode getLanguage(toffset ich)
1997889cced1SEike Rathke+	virtual isocode getLanguage(toffset /*ich*/)
1998889cced1SEike Rathke 	{
1999889cced1SEike Rathke 		isocode ret;
2000889cced1SEike Rathke 		ret.rgch[0] = 'e'; ret.rgch[1] = 'n'; ret.rgch[2] = 0; ret.rgch[3] = 0;
2001889cced1SEike Rathke 		return ret;
2002889cced1SEike Rathke 	}
2003889cced1SEike Rathke
2004889cced1SEike Rathke-	virtual std::pair<toffset, toffset> propertyRange(toffset ich)
2005889cced1SEike Rathke+	virtual std::pair<toffset, toffset> propertyRange(toffset /*ich*/)
2006889cced1SEike Rathke 	{
2007889cced1SEike Rathke 		std::pair<toffset, toffset> pairRet;
2008889cced1SEike Rathke 		pairRet.first = 0;
2009889cced1SEike Rathke@@ -88,16 +88,16 @@
2010889cced1SEike Rathke 		return pairRet;
2011889cced1SEike Rathke 	}
2012889cced1SEike Rathke
2013889cced1SEike Rathke-	virtual size_t getFontFeatures(toffset ich, FeatureSetting * prgfset)
2014889cced1SEike Rathke+	virtual size_t getFontFeatures(toffset /*ich*/, FeatureSetting * /*prgfset*/)
2015889cced1SEike Rathke 	{
2016889cced1SEike Rathke 		return 0; // no features in this simple implementation
2017889cced1SEike Rathke 	}
2018889cced1SEike Rathke-	virtual bool sameSegment(toffset ich1, toffset ich2)
2019889cced1SEike Rathke+	virtual bool sameSegment(toffset /*ich1*/, toffset /*ich2*/)
2020889cced1SEike Rathke 	{
2021889cced1SEike Rathke 		return true;
2022889cced1SEike Rathke 	}
2023889cced1SEike Rathke
2024889cced1SEike Rathke-	virtual void getColors(toffset ich, int * pclrFore, int * pclrBack)
2025889cced1SEike Rathke+	virtual void getColors(toffset /*ich*/, int * pclrFore, int * pclrBack)
2026889cced1SEike Rathke 	{
2027889cced1SEike Rathke 		*pclrFore = kclrBlack;
2028889cced1SEike Rathke 		*pclrBack = kclrTransparent;
2029889cced1SEike Rathke--- misc/silgraphite-2.3.1/wrappers/win32/WinFont.cpp	Thu Jan 29 10:33:19 2009
2030889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/wrappers/win32/WinFont.cpp	Sat Aug 22 19:36:36 2009
2031889cced1SEike Rathke@@ -70,6 +72,7 @@
2032889cced1SEike Rathke 	// But don't store m_hfont, because we don't really "own" it; the client is
2033889cced1SEike Rathke 	// responsible for releasing it.
2034889cced1SEike Rathke 	m_hfont = 0;
2035889cced1SEike Rathke+    m_pGlyphMetricMap = NULL;
2036889cced1SEike Rathke 	memset(&m_fpropSet, 0, sizeof(m_fpropSet));
2037889cced1SEike Rathke
2038889cced1SEike Rathke 	m_pbCmapTbl = NULL;
2039889cced1SEike Rathke@@ -196,6 +198,7 @@
2040889cced1SEike Rathke 	m_hdc = 0;
2041889cced1SEike Rathke 	m_hfont = 0;
2042889cced1SEike Rathke 	m_hfontClient = 0;
2043889cced1SEike Rathke+    m_pGlyphMetricMap = NULL;
2044889cced1SEike Rathke 	memset(&m_fpropSet, 0, sizeof(FontProps));
2045889cced1SEike Rathke
2046889cced1SEike Rathke 	m_pbCmapTbl = NULL;
2047889cced1SEike Rathke@@ -408,7 +410,7 @@
2048889cced1SEike Rathke 					if (pPolyCurve->wType == TT_PRIM_QSPLINE &&
2049889cced1SEike Rathke 						// test if this is the last curve
2050889cced1SEike Rathke 						pPolyHdr->cb - (int)((byte *)(&pPolyCurve->apfx[j]) - (byte *)(pPolyHdr))
2051889cced1SEike Rathke-							== sizeof POINTFX &&
2052889cced1SEike Rathke+							== sizeof (POINTFX) &&
2053889cced1SEike Rathke 						// and the two points are identical
2054889cced1SEike Rathke 						CompareFixed(pPolyCurve->apfx[j].x, pPolyHdr->pfxStart.x) &&
2055889cced1SEike Rathke 						CompareFixed(pPolyCurve->apfx[j].y, pPolyHdr->pfxStart.y))
2056889cced1SEike Rathke@@ -457,6 +459,16 @@
2057889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
2058889cced1SEike Rathke void WinFont::getGlyphMetrics(gid16 chw, gr::Rect & boundingBox, gr::Point & advances)
2059889cced1SEike Rathke {
2060889cced1SEike Rathke+    if (m_pGlyphMetricMap)
2061889cced1SEike Rathke+    {
2062889cced1SEike Rathke+        GlyphMetricMap::iterator i = m_pGlyphMetricMap->find(chw);
2063889cced1SEike Rathke+        if (i != m_pGlyphMetricMap->end())
2064889cced1SEike Rathke+        {
2065889cced1SEike Rathke+            boundingBox = i->second.first;
2066889cced1SEike Rathke+            advances = i->second.second;
2067889cced1SEike Rathke+            return;
2068889cced1SEike Rathke+        }
2069889cced1SEike Rathke+    }
2070889cced1SEike Rathke 	GLYPHMETRICS gm;
2071889cced1SEike Rathke 	const MAT2 mat2 = {{0,1}, {0,0}, {0,0}, {0,1}};
2072889cced1SEike Rathke 	if (GDI_ERROR == ::GetGlyphOutline(m_hdc, chw, GGO_GLYPH_INDEX | GGO_METRICS,
2073889cced1SEike Rathke@@ -474,6 +476,10 @@
2074889cced1SEike Rathke 	boundingBox.bottom = (float)gm.gmptGlyphOrigin.y - gm.gmBlackBoxY;
2075889cced1SEike Rathke 	advances.x = gm.gmCellIncX;
2076889cced1SEike Rathke 	advances.y = gm.gmCellIncY;
2077889cced1SEike Rathke+    if (m_pGlyphMetricMap)
2078889cced1SEike Rathke+    {
2079889cced1SEike Rathke+        (*m_pGlyphMetricMap)[chw] = std::pair<gr::Rect,gr::Point>(boundingBox, advances);
2080889cced1SEike Rathke+    }
2081889cced1SEike Rathke }
2082889cced1SEike Rathke
2083889cced1SEike Rathke /*----------------------------------------------------------------------------------------------
2084889cced1SEike Rathke@@ -618,7 +620,10 @@
2085889cced1SEike Rathke
2086889cced1SEike Rathke 		static int cCreateFontCalls = 0;
2087889cced1SEike Rathke 		static int cCreateFontZero = 0;
2088889cced1SEike Rathke-		HFONT hfont = g_fhc.GetFont(lf);
2089889cced1SEike Rathke+        FontHandleCache::FontCacheValue cache = g_fhc.GetCache(lf);
2090889cced1SEike Rathke+        HFONT hfont = cache.hfont;
2091889cced1SEike Rathke+        m_pGlyphMetricMap = cache.pGlyphMetricMap;
2092889cced1SEike Rathke+		//HFONT hfont = g_fhc.GetFont(lf);
2093889cced1SEike Rathke 		//char ch1[200];
2094889cced1SEike Rathke 		//if (hfont == 0)
2095889cced1SEike Rathke 		//{
2096889cced1SEike Rathke@@ -731,7 +733,7 @@
2097889cced1SEike Rathke 	@param lf LOGFONT value that describes the desired font
2098889cced1SEike Rathke 	@return Font handle
2099889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
2100889cced1SEike Rathke-HFONT WinFont::FontHandleCache::GetFont(LOGFONT & lf)
2101889cced1SEike Rathke+WinFont::FontHandleCache::FontCacheValue WinFont::FontHandleCache::GetCache(LOGFONT & lf)
2102889cced1SEike Rathke {
2103889cced1SEike Rathke 	FontCacheValue fcv;
2104889cced1SEike Rathke 	FontHandleHashMap::iterator itFound = m_hmlffcv.find(lf);
2105889cced1SEike Rathke@@ -752,11 +754,12 @@
2106889cced1SEike Rathke 			THROW(kresFail);
2107889cced1SEike Rathke
2108889cced1SEike Rathke 		fcv.nRefs = 1;
2109889cced1SEike Rathke+        fcv.pGlyphMetricMap = new GlyphMetricMap();
2110889cced1SEike Rathke
2111889cced1SEike Rathke 		m_hmlffcv.insert(std::pair<LOGFONT, FontCacheValue>(lf, fcv));
2112889cced1SEike Rathke 	}
2113889cced1SEike Rathke
2114889cced1SEike Rathke-	return fcv.hfont;
2115889cced1SEike Rathke+	return fcv;
2116889cced1SEike Rathke }
2117889cced1SEike Rathke
2118889cced1SEike Rathke /*----------------------------------------------------------------------------------------------
2119889cced1SEike Rathke@@ -767,7 +767,7 @@
2120889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
2121889cced1SEike Rathke void WinFont::FontHandleCache::DeleteFont(HFONT hfont)
2122889cced1SEike Rathke {
2123889cced1SEike Rathke-	if (!hfont || !m_bValid)
2124889cced1SEike Rathke+	if (!hfont || !m_bValid || m_hmlffcv.size() == 0)
2125889cced1SEike Rathke 		return;
2126889cced1SEike Rathke
2127889cced1SEike Rathke 	// find the font in the hash map
2128889cced1SEike Rathke@@ -782,6 +784,8 @@
2129889cced1SEike Rathke 			{
2130889cced1SEike Rathke 				// delete font
2131889cced1SEike Rathke 				::DeleteObject(hfont);
2132889cced1SEike Rathke+                if (fcv.pGlyphMetricMap)
2133889cced1SEike Rathke+                    delete fcv.pGlyphMetricMap;
2134889cced1SEike Rathke 				m_hmlffcv.erase(it);
2135889cced1SEike Rathke 			}
2136889cced1SEike Rathke 			else
2137889cced1SEike Rathke@@ -832,7 +832,8 @@
2138889cced1SEike Rathke bool WinFont::LogFontHashFuncs::operator() (const WinFont::LogFontWrapper & key1,
2139889cced1SEike Rathke 	const WinFont::LogFontWrapper & key2) const
2140889cced1SEike Rathke {
2141889cced1SEike Rathke-	return (key1 == key2);
2142889cced1SEike Rathke+    // return true if key1 should be ordered before key2
2143889cced1SEike Rathke+    return (operator()(key1) < operator()(key2));
2144889cced1SEike Rathke }
2145889cced1SEike Rathke
2146889cced1SEike Rathke /*--------------------------------------------------------------------------------------
2147889cced1SEike Rathke--- misc/silgraphite-2.3.1/wrappers/win32/WinFont.h	Thu Jan 29 10:33:19 2009
2148889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/wrappers/win32/WinFont.h	Sat Aug 22 19:36:36 2009
2149889cced1SEike Rathke@@ -27,7 +27,13 @@
2150889cced1SEike Rathke #include "GrClient.h"
2151889cced1SEike Rathke #include "Font.h"
2152889cced1SEike Rathke+#include <map>
2153889cced1SEike Rathke
2154889cced1SEike Rathke+#ifdef _STLPORT_VERSION
2155889cced1SEike Rathke+namespace stdext = _STLP_STD;
2156889cced1SEike Rathke+#endif
2157889cced1SEike Rathke+
2158889cced1SEike Rathke namespace gr
2159889cced1SEike Rathke {
2160889cced1SEike Rathke+typedef std::map<gid16, std::pair<gr::Rect, gr::Point> > GlyphMetricMap;
2161889cced1SEike Rathke
2162889cced1SEike Rathke class FontFace;
2163889cced1SEike Rathke@@ -100,6 +110,7 @@
2164889cced1SEike Rathke 	HFONT m_hfontClient;	// need to replace this HFONT into the DC when we are finished
2165889cced1SEike Rathke 							// with it
2166889cced1SEike Rathke
2167889cced1SEike Rathke+    GlyphMetricMap * m_pGlyphMetricMap;
2168889cced1SEike Rathke 	// Debugging:
2169889cced1SEike Rathke 	//OLECHAR m_rgchTemp[32];
2170889cced1SEike Rathke
2171889cced1SEike Rathke@@ -185,11 +196,13 @@
2172889cced1SEike Rathke 	class FontHandleCache // hungarian: fhc
2173889cced1SEike Rathke 	{
2174889cced1SEike Rathke 	public:
2175889cced1SEike Rathke-		struct FontCacheValue
2176889cced1SEike Rathke+        struct FontCacheValue
2177889cced1SEike Rathke 		{
2178889cced1SEike Rathke 			int nRefs;   // reference count
2179889cced1SEike Rathke 			HFONT hfont; // font handle
2180889cced1SEike Rathke
2181889cced1SEike Rathke+            GlyphMetricMap * pGlyphMetricMap; // glyph metrics
2182889cced1SEike Rathke+
2183889cced1SEike Rathke 			bool operator==(const FontCacheValue & val) const
2184889cced1SEike Rathke 			{
2185889cced1SEike Rathke 				return (hfont == val.hfont);
2186889cced1SEike Rathke@@ -199,7 +212,8 @@
2187889cced1SEike Rathke         FontHandleCache() : m_bValid(true) {};
2188889cced1SEike Rathke 		~FontHandleCache();
2189889cced1SEike Rathke
2190889cced1SEike Rathke-		HFONT GetFont(LOGFONT & lf);
2191889cced1SEike Rathke+		//HFONT GetFont(LOGFONT & lf);
2192889cced1SEike Rathke+        FontCacheValue GetCache(LOGFONT & lf);
2193889cced1SEike Rathke 		void DeleteFont(HFONT hfont);
2194889cced1SEike Rathke
2195889cced1SEike Rathke 		typedef stdext::hash_map<LogFontWrapper, FontCacheValue, LogFontHashFuncs> FontHandleHashMap;
2196889cced1SEike Rathke--- misc/build/silgraphite-2.3.1/engine/test/RegressionTest/RtTextSrc.h~	2009-01-22 05:06:42.000000000 +0630
2197889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/RtTextSrc.h	2010-04-30 23:14:49.000000000 +0630
2198889cced1SEike Rathke@@ -44,18 +44,18 @@
2199889cced1SEike Rathke 		}
2200889cced1SEike Rathke 	}
2201889cced1SEike Rathke
2202889cced1SEike Rathke-	virtual size_t getFontFeatures(toffset ich, FeatureSetting * prgfset)
2203889cced1SEike Rathke+	virtual size_t getFontFeatures(toffset /*ich*/, FeatureSetting * prgfset)
2204889cced1SEike Rathke 	{
2205889cced1SEike Rathke 		// Note: size of prgfset buffer = gr::kMaxFeatures = 64
2206889cced1SEike Rathke 		std::copy(m_fset, m_fset + MAXFEAT, prgfset);
2207889cced1SEike Rathke 		return m_cFeats;
2208889cced1SEike Rathke 	}
2209889cced1SEike Rathke
2210889cced1SEike Rathke-	virtual bool getRightToLeft(toffset ich)
2211889cced1SEike Rathke+	virtual bool getRightToLeft(toffset /*ich*/)
2212889cced1SEike Rathke 	{
2213889cced1SEike Rathke 		return m_fRtl;
2214889cced1SEike Rathke 	}
2215889cced1SEike Rathke-	virtual unsigned int getDirectionDepth(toffset ich)
2216889cced1SEike Rathke+	virtual unsigned int getDirectionDepth(toffset /*ich*/)
2217889cced1SEike Rathke 	{
2218889cced1SEike Rathke 		return ((m_fRtl == 1) ? 1 : 0);
2219889cced1SEike Rathke 	}
2220889cced1SEike Rathke
2221889cced1SEike Rathke--- misc/build/silgraphite-2.3.1/engine/test/RegressionTest/GrJustifier.cpp	2010-06-21 12:55:34.000000000 +0630
2222889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/GrJustifier.cpp	2010-06-21 13:16:59.000000000 +0630
2223889cced1SEike Rathke@@ -16,8 +16,9 @@
2224889cced1SEike Rathke //:>	Include files
2225889cced1SEike Rathke //:>********************************************************************************************
2226889cced1SEike Rathke //#include "main.h" // This is used by clients, so main.h is not available
2227889cced1SEike Rathke-
2228889cced1SEike Rathke+#ifdef _MSC_VER
2229889cced1SEike Rathke #pragma hdrstop
2230889cced1SEike Rathke+#endif
2231889cced1SEike Rathke // any other headers (not precompiled)
2232889cced1SEike Rathke #include "GrClient.h"
2233889cced1SEike Rathke #include "ITextSource.h"
2234889cced1SEike Rathke@@ -31,9 +32,6 @@
2235889cced1SEike Rathke #include <string>
2236889cced1SEike Rathke #endif
2237889cced1SEike Rathke
2238889cced1SEike Rathke-#undef THIS_FILE
2239889cced1SEike Rathke-DEFINE_THIS_FILE
2240889cced1SEike Rathke-
2241889cced1SEike Rathke //:>********************************************************************************************
2242889cced1SEike Rathke //:>	Global constants
2243889cced1SEike Rathke //:>********************************************************************************************
2244889cced1SEike Rathke@@ -327,9 +325,9 @@
2245889cced1SEike Rathke 					&dxStretchAchieved);
2246889cced1SEike Rathke 				for (int iiiGlyph = 0; iiiGlyph < cStretchable; iiiGlyph++)
2247889cced1SEike Rathke 				{
2248889cced1SEike Rathke-					iiGlyph = viiGlyphsRem[iiiGlyph];
2249889cced1SEike Rathke-					vdxStretchLeft[iiGlyph] = vdxStretchRem[iiiGlyph];
2250889cced1SEike Rathke-					vdxWidth[iiGlyph] = vdxWidthRem[iiiGlyph];
2251889cced1SEike Rathke+					int ivGlyph = viiGlyphsRem[iiiGlyph];
2252889cced1SEike Rathke+					vdxStretchLeft[ivGlyph] = vdxStretchRem[iiiGlyph];
2253889cced1SEike Rathke+					vdxWidth[ivGlyph] = vdxWidthRem[iiiGlyph];
2254889cced1SEike Rathke 				}
2255889cced1SEike Rathke 			}
2256889cced1SEike Rathke 			else
2257889cced1SEike Rathke@@ -366,12 +364,12 @@
2258889cced1SEike Rathke 	{
2259889cced1SEike Rathke #ifdef WIN32
2260889cced1SEike Rathke 		wchar_t rgchw[20];
2261889cced1SEike Rathke-		std::fill_n(rgchw, 20, 0);
2262889cced1SEike Rathke+		std::fill_n(rgchw, 20, L'\0');
2263889cced1SEike Rathke 		_itow(dxStretchNeeded - dxStretchAchieved, rgchw, 10);
2264889cced1SEike Rathke 		std::wstring strTmp(L"justification failed by ");
2265889cced1SEike Rathke 		strTmp += rgchw;
2266889cced1SEike Rathke 		strTmp += L" units (width needed = ";
2267889cced1SEike Rathke-		std::fill_n(rgchw, 10, 0);
2268889cced1SEike Rathke+		std::fill_n(rgchw, 10, L'\0');
2269889cced1SEike Rathke 		_itow(dxDesiredWidth, rgchw, 10);
2270889cced1SEike Rathke 		strTmp += rgchw;
2271889cced1SEike Rathke 		strTmp += L")\n";
2272889cced1SEike Rathke--- misc/build/silgraphite-2.3.1/engine/test/RegressionTest/GrJustifier.h	2009-01-22 05:06:42.000000000 +0630
2273889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/GrJustifier.h	2010-06-21 13:16:49.000000000 +0630
2274889cced1SEike Rathke@@ -11,7 +11,9 @@
2275889cced1SEike Rathke Description:
2276889cced1SEike Rathke 	A default justification agent for Graphite.
2277889cced1SEike Rathke -------------------------------------------------------------------------------*//*:End Ignore*/
2278889cced1SEike Rathke+#ifdef _MSC_VER
2279889cced1SEike Rathke #pragma once
2280889cced1SEike Rathke+#endif
2281889cced1SEike Rathke #ifndef GRJUSTIFIER_INCLUDED
2282889cced1SEike Rathke #define GRJUSTIFIER_INCLUDED
2283889cced1SEike Rathke
2284889cced1SEike Rathke--- misc/build/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.h	2010-06-21 12:55:34.000000000 +0630
2285889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.h	2010-06-21 13:18:12.000000000 +0630
2286889cced1SEike Rathke@@ -11,7 +11,9 @@
2287889cced1SEike Rathke Description:
2288889cced1SEike Rathke 	A simple text source that shows how to use this interface within Graphite.
2289889cced1SEike Rathke -------------------------------------------------------------------------------*//*:End Ignore*/
2290889cced1SEike Rathke+#ifdef _MSC_VER
2291889cced1SEike Rathke #pragma once
2292889cced1SEike Rathke+#endif
2293889cced1SEike Rathke #ifndef GRTXTSRC_INCLUDED
2294889cced1SEike Rathke #define GRTXTSRC_INCLUDED
2295889cced1SEike Rathke
2296889cced1SEike Rathke
2297889cced1SEike Rathke--- misc/build/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.cpp	2010-06-21 12:55:34.000000000 +0630
2298889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.cpp	2010-06-21 13:18:24.000000000 +0630
2299889cced1SEike Rathke@@ -15,7 +15,9 @@
2300889cced1SEike Rathke //:>********************************************************************************************
2301889cced1SEike Rathke //:>	Include files
2302889cced1SEike Rathke //:>********************************************************************************************
2303889cced1SEike Rathke+#ifdef _MSC_VER
2304889cced1SEike Rathke #pragma hdrstop
2305889cced1SEike Rathke+#endif
2306889cced1SEike Rathke // any other headers (not precompiled)
2307889cced1SEike Rathke
2308889cced1SEike Rathke #include "GrClient.h"
2309889cced1SEike Rathke@@ -23,9 +25,6 @@
2310889cced1SEike Rathke #include "ITextSource.h"
2311889cced1SEike Rathke #include "SimpleTextSrc.h"
2312889cced1SEike Rathke
2313889cced1SEike Rathke-#undef THIS_FILE
2314889cced1SEike Rathke-DEFINE_THIS_FILE
2315889cced1SEike Rathke-
2316889cced1SEike Rathke //:>********************************************************************************************
2317889cced1SEike Rathke //:>	Initialization and destruction
2318889cced1SEike Rathke //:>********************************************************************************************
2319889cced1SEike Rathke--- misc/build/silgraphite-2.3.1/engine/src/segment/MemoryUsage.cpp	2009-01-22 05:06:42.000000000 +0630
2320889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/MemoryUsage.cpp	2010-06-21 13:36:36.000000000 +0630
2321889cced1SEike Rathke@@ -11,10 +11,10 @@
2322889cced1SEike Rathke Description:
2323889cced1SEike Rathke     Calculates memory usage for the engine and segments.
2324889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
2325889cced1SEike Rathke-
2326889cced1SEike Rathke+#ifdef _MSC_VER
2327889cced1SEike Rathke #pragma warning(disable: 4244)	// conversion from wchar_t to char
2328889cced1SEike Rathke #pragma warning(disable: 4702)	// unreachable code
2329889cced1SEike Rathke-
2330889cced1SEike Rathke+#endif
2331889cced1SEike Rathke //:>********************************************************************************************
2332889cced1SEike Rathke //:>	Include files
2333889cced1SEike Rathke //:>********************************************************************************************
2334889cced1SEike Rathke@@ -54,8 +54,6 @@
2335889cced1SEike Rathke #ifdef _MSC_VER
2336889cced1SEike Rathke #pragma hdrstop
2337889cced1SEike Rathke #endif
2338889cced1SEike Rathke-#undef THIS_FILE
2339889cced1SEike Rathke-DEFINE_THIS_FILE
2340889cced1SEike Rathke
2341889cced1SEike Rathke //:End Ignore
2342889cced1SEike Rathke
2343889cced1SEike Rathke--- misc/build/silgraphite-2.3.1/engine/src/segment/GrSlotState.h	2010-06-23 19:52:56.429060400 +0700
2344889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/GrSlotState.h	2010-05-25 11:51:15.195066300 +0700
2345889cced1SEike Rathke@@ -48,7 +48,7 @@
2346889cced1SEike Rathke 	{
2347889cced1SEike Rathke 	}
2348889cced1SEike Rathke
2349889cced1SEike Rathke-	~GrSlotAbstract()
2350d3e0dd8eSSteve Yin+	virtual ~GrSlotAbstract()
2351889cced1SEike Rathke 	{
2352889cced1SEike Rathke 		// the table manager is responsible for destroying the contents of m_prgnVarLenBuf
2353889cced1SEike Rathke 	}
2354889cced1SEike Rathke@@ -231,7 +231,7 @@
2355889cced1SEike Rathke 		ZapCompositeMetrics();
2356889cced1SEike Rathke 	}
2357889cced1SEike Rathke
2358889cced1SEike Rathke-	~GrSlotState()
2359d3e0dd8eSSteve Yin+	virtual ~GrSlotState()
2360889cced1SEike Rathke 	{
2361889cced1SEike Rathke 	}
2362889cced1SEike Rathke
2363d2be754aSHerbert Dürr--- misc/silgraphite-2.3.1/engine/include/graphite/Segment.h	2009-01-29 09:33:19.000000000 +0100
2364d2be754aSHerbert Dürr+++ misc/build/silgraphite-2.3.1/engine/include/graphite/Segment.h	2013-08-14 15:10:53.363864046 +0200
2365d2be754aSHerbert Dürr@@ -64,7 +64,7 @@
2366d2be754aSHerbert Dürr 	virtual ~Segment();
2367d2be754aSHerbert Dürr
2368d2be754aSHerbert Dürr 	// Basic copy constructor:
2369d2be754aSHerbert Dürr-	Segment(Segment & seg);
2370d2be754aSHerbert Dürr+	Segment( const Segment&);
2371d2be754aSHerbert Dürr
2372d2be754aSHerbert Dürr 	// For making modified copies of segments:
2373d2be754aSHerbert Dürr 	static Segment * LineContextSegment(Segment & seg, bool fStartLine, bool fEndLine);
2374889cced1SEike Rathke--- misc/build/silgraphite-2.3.1/engine/src/segment/Segment.cpp.bak	2010-06-23 19:59:54.611660400 +0700
2375889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/engine/src/segment/Segment.cpp	2010-06-23 21:30:16.335460400 +0700
2376889cced1SEike Rathke@@ -246,6 +246,8 @@
2377889cced1SEike Rathke
2378889cced1SEike Rathke 	m_dxsVisibleWidth = -1;
2379889cced1SEike Rathke 	m_dxsTotalWidth = -1;
2380889cced1SEike Rathke+	m_ichwAssocsMin = 0;
2381889cced1SEike Rathke+	m_ichwAssocsLim = 0;
2382889cced1SEike Rathke
2383889cced1SEike Rathke //	m_psstrm = NULL;
2384889cced1SEike Rathke 	m_prgslout = NULL;
2385d2be754aSHerbert Dürr@@ -435,7 +435,7 @@
2386d2be754aSHerbert Dürr /*----------------------------------------------------------------------------------------------
2387d2be754aSHerbert Dürr 	Basic copy method.
2388d2be754aSHerbert Dürr ----------------------------------------------------------------------------------------------*/
2389d2be754aSHerbert Dürr-Segment::Segment(Segment & seg)
2390d2be754aSHerbert Dürr+Segment::Segment( const Segment& seg)
2391d2be754aSHerbert Dürr {
2392d2be754aSHerbert Dürr 	int islout;
2393d2be754aSHerbert Dürr
2394889cced1SEike Rathke@@ -2988,9 +2988,10 @@
2395889cced1SEike Rathke 	return kresOk;
2396889cced1SEike Rathke }
2397889cced1SEike Rathke
2398889cced1SEike Rathke-
2399889cced1SEike Rathke+#ifdef __GNUC__
2400889cced1SEike Rathke // suppress GCC 4.3 warning for optimized min()/max() when called with (ich, ich+1) or similar
2401889cced1SEike Rathke #pragma GCC diagnostic ignored "-Wstrict-overflow"
2402889cced1SEike Rathke+#endif
2403889cced1SEike Rathke
2404889cced1SEike Rathke /*----------------------------------------------------------------------------------------------
2405889cced1SEike Rathke 	Merge the given characters into the same Uniscribe cluster. This means merging any
2406889cced1SEike Rathke--- misc/build/silgraphite-2.3.1/wrappers/win32/win32_dll.cpp.bak	2008-05-09 18:10:30.000000000 +0700
2407889cced1SEike Rathke+++ misc/build/silgraphite-2.3.1/wrappers/win32/win32_dll.cpp	2010-05-10 15:46:54.291818000 +0700
2408889cced1SEike Rathke@@ -14,7 +14,7 @@
2409889cced1SEike Rathke 	DllMain. This is the main DLL entry point for a non-MFC DLL. For an MFC DLL, DllMain is
2410889cced1SEike Rathke 		in DllModul.cpp. Both DllMains call ModuleEntry::DllMain.
2411889cced1SEike Rathke ----------------------------------------------------------------------------------------------*/
2412889cced1SEike Rathke-extern "C" BOOL WINAPI DllMain(HMODULE hmod, DWORD dwReason, PVOID pvReserved)
2413889cced1SEike Rathke+extern "C" BOOL WINAPI DllMain(HMODULE hmod, DWORD dwReason, PVOID /*pvReserved*/)
2414889cced1SEike Rathke {
2415889cced1SEike Rathke 	bool fRet = true;
2416889cced1SEike Rathke
2417c2801fd2SPedro Giffuni--- misc/silgraphite-2.3.1/engine/include/graphite/GrFeature.h		2009-01-21 17:36:40.000000000 -0500
2418c2801fd2SPedro Giffuni+++ misc/build/silgraphite-2.3.1/engine/include/graphite/GrFeature.h	2013-01-15 15:38:54.000000000 -0500
2419c2801fd2SPedro Giffuni@@ -21,6 +21,10 @@
2420c2801fd2SPedro Giffuni
2421c2801fd2SPedro Giffuni //:End Ignore
2422c2801fd2SPedro Giffuni
2423c2801fd2SPedro Giffuni+#ifdef __FreeBSD__
2424c2801fd2SPedro Giffuni+#define wstring basic_string<wchar_t> //quick dirty hack for not finding _STL::wstring
2425c2801fd2SPedro Giffuni+#endif
2426c2801fd2SPedro Giffuni+
2427c2801fd2SPedro Giffuni #include "GrAppData.h"
2428c2801fd2SPedro Giffuni
2429c2801fd2SPedro Giffuni namespace gr
2430*a0e1cdbcSHerbert Dürr--- misc/silgraphite-2.3.1/engine/include/graphite/SegmentAux.h	Thu Jan 22 00:36:40 2009
2431*a0e1cdbcSHerbert Dürr+++ misc/build/silgraphite-2.3.1/engine/include/graphite/SegmentAux.h	Sat Aug 22 19:36:32 2009
2432*a0e1cdbcSHerbert Dürr@@ -232,8 +232,12 @@
2433*a0e1cdbcSHerbert Dürr protected:
2434*a0e1cdbcSHerbert Dürr 	// Constructor that includes output-slot mapping list, used for non-contiguous lists:
2435*a0e1cdbcSHerbert Dürr 	GlyphSetIterator(Segment & seg, size_t islout, RcVector * qvislout)
2436*a0e1cdbcSHerbert Dürr-		: m_pseg(&seg), m_vit(qvislout->Vector().begin() + islout)
2437*a0e1cdbcSHerbert Dürr+		: m_pseg(&seg), m_vit(qvislout->Vector().begin())
2438*a0e1cdbcSHerbert Dürr 	{
2439*a0e1cdbcSHerbert Dürr+		if( islout < qvislout->Vector().size())
2440*a0e1cdbcSHerbert Dürr+			m_vit += islout;
2441*a0e1cdbcSHerbert Dürr+		else
2442*a0e1cdbcSHerbert Dürr+			m_vit = qvislout->Vector().end();
2443*a0e1cdbcSHerbert Dürr 		m_qvislout = qvislout;
2444*a0e1cdbcSHerbert Dürr 		m_qvislout->IncRefCount();
2445*a0e1cdbcSHerbert Dürr 	}
2446*a0e1cdbcSHerbert Dürr@@ -289,7 +293,7 @@
2447*a0e1cdbcSHerbert Dürr
2448*a0e1cdbcSHerbert Dürr 	// Relational operators.
2449*a0e1cdbcSHerbert Dürr   	// Forward iterator requirements
2450*a0e1cdbcSHerbert Dürr-	bool operator==(const GlyphSetIterator & rhs) const throw()	{ return m_vit == rhs.m_vit; }
2451*a0e1cdbcSHerbert Dürr+	bool operator==(const GlyphSetIterator & rhs) const throw()	{ return (m_qvislout == NULL) || (m_vit == rhs.m_vit); }
2452*a0e1cdbcSHerbert Dürr 	bool operator!=(const GlyphSetIterator & rhs) const throw()	{ return !(*this == rhs); }
2453*a0e1cdbcSHerbert Dürr
2454*a0e1cdbcSHerbert Dürr 	// Random access iterator requirements
2455