update dev300-m58
[ooovba.git] / graphite / graphite-2.3.1.patch
blobbadbd92ae74099a527602c3fe39c5a3a8fba6615
1 --- misc/silgraphite-2.3.1/engine/include/graphite/GrCommon.h Thu Jan 22 00:36:40 2009
2 +++ misc/build/silgraphite-2.3.1/engine/include/graphite/GrCommon.h Sat Aug 22 19:36:32 2009
3 @@ -18,6 +18,8 @@
4 #ifndef GRCOMMON_INCLUDED
5 #define GRCOMMON_INCLUDED
7 +#define _SECURE_SCL 0 // to allow GlyphSetIterator to work, which points off the end of a vector
8 +#define _HAS_ITERATOR_DEBUGGING 0
10 // Standard Headers.
12 @@ -33,6 +35,7 @@
13 #include <vector>
14 #include <algorithm>
15 #include <string>
16 +///#include <stdexcept> -- possibly needed for std::string Xran and Xlen functions??
18 // Uncomment this to allow multiple versions of gr to coexist
19 // in the same program e.g. pangographite with gtk uses namespace gr
20 @@ -41,7 +44,7 @@
21 // Provided the client includes GrClient.h first this #define is
22 // picked up by all files.
24 -//#define gr gr2
25 +#define gr gr3ooo
27 // Project headers
28 #include "GrPlatform.h"
29 --- misc/silgraphite-2.3.1/engine/include/graphite/GrMstypes.h Thu Jan 22 00:36:40 2009
30 +++ misc/build/silgraphite-2.3.1/engine/include/graphite/GrMstypes.h Sat Aug 22 19:36:32 2009
31 @@ -24,11 +24,11 @@
33 typedef signed long HRESULT;
35 -inline const long InterlockedIncrement(long *const intr_lck) {
36 +inline long InterlockedIncrement(long *const intr_lck) {
37 return ++*intr_lck;
40 -inline const long InterlockedDecrement(long *const intr_lck) {
41 +inline long InterlockedDecrement(long *const intr_lck) {
42 return --*intr_lck;
45 --- misc/silgraphite-2.3.1/engine/makefile.vc7 Thu Aug 21 16:24:32 2008
46 +++ misc/build/silgraphite-2.3.1/engine/makefile.vc7 Sat Aug 22 19:36:32 2009
47 @@ -48,11 +48,7 @@
48 CPP_DEBUG=/D "TRACING" $(CPP_DEBUG)
49 !ENDIF
51 -!IF "$(OS)" == "Windows_NT"
52 NULL=
53 -!ELSE
54 -NULL=nul
55 -!ENDIF
57 clean :
58 @- rd /s/q .\release_temp
59 --- misc/silgraphite-2.3.1/engine/makefile.vc8 Sat Aug 22 21:58:25 2009
60 +++ misc/build/silgraphite-2.3.1/engine/makefile.vc8 Sat Aug 22 21:57:42 2009
61 @@ -2,11 +2,16 @@
62 TARGET=graphite
64 CPP=cl.exe
65 -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
66 +### HDU: disabled building with the normal compile flags
67 +###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
68 +### HDU: because for full binary compatibility with the rest of OOo all compile flags must match exactly
69 +### which is especially true for template-heavy C++ code with non-default config (e.g. _STLP_DEBUG enabled)
70 +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"$(INTDIR)\\" /FD /c
72 # /Wp62
74 LINK=link.exe
75 -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"
76 +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"
78 BSC32=bscmake.exe
79 BSC32_FLAGS=/nologo /o"$(OUTDIR)\\$(TARGET).bsc"
80 @@ -48,11 +52,7 @@
81 CPP_DEBUG=/D "TRACING" $(CPP_DEBUG)
82 !ENDIF
84 -!IF "$(OS)" == "Windows_NT"
85 NULL=
86 -!ELSE
87 -NULL=nul
88 -!ENDIF
90 clean :
91 @- rd /s/q .\release_temp
92 @@ -779,7 +779,7 @@
93 @- $(CPP) $(CPPFLAGS) $(CPP_DEBUG) /Fo"$(INTDIR)\FileFont$(OBJEXT)" $?
95 "$(INTDIR)\FileFont_dll$(OBJEXT)" : "src/font/FileFont.cpp"
96 - @- $(CPP) $(CPPFLAGS) /D "_DLL" /Fo"$(INTDIR)\FileFont_dll$(OBJEXT)" $?
97 + $(CPP) $(CPPFLAGS) /D "_DLL" /Fo"$(INTDIR)\FileFont_dll$(OBJEXT)" $?
99 !ENDIF
101 --- misc/silgraphite-2.3.1/engine/src/font/FileFont.cpp Thu Jan 22 00:36:42 2009
102 +++ misc/build/silgraphite-2.3.1/engine/src/font/FileFont.cpp Sat Aug 22 19:36:32 2009
103 @@ -207,11 +207,11 @@
104 cch16 += cch16Used;
106 // }
107 -#else
108 +#elif 1
109 m_stuFaceName.assign(rgchwFace);
110 - // VS 2005 needs this:
111 - //for (int cch16 = 0; cch16 < cchw; cch16++)
112 - // m_stuFaceName.push_back(rgchwFace[cch16]);
113 +#else // VS 2005 needs this:
114 + for (int cch16 = 0; cch16 < cchw; cch16++)
115 + m_stuFaceName.push_back(rgchwFace[cch16]);
116 #endif
117 pTable = readTable(ktiHead, lSize);
118 if (!m_fIsValid || !pTable)
119 @@ -233,7 +233,7 @@
120 FileFont::readTable(int /*TableId*/ tid, size_t & size)
122 const TableId tableId = TableId(tid);
123 - bool isValid = true;
124 + bool isTableValid = true;
125 size_t lOffset = 0, lSize = 0;
126 if (!m_pTableCache)
128 @@ -245,9 +245,9 @@
129 size = m_pTableCache->getTableSize(tableId);
130 // check whether it is already in the cache
131 if (pTable) return pTable;
132 - isValid &= TtfUtil::GetTableInfo(tableId, m_pHeader, m_pTableDir,
133 + isTableValid &= TtfUtil::GetTableInfo(tableId, m_pHeader, m_pTableDir,
134 lOffset, lSize);
135 - if (!isValid)
136 + if (!isTableValid)
137 return NULL;
138 fseek(m_pfile, lOffset, SEEK_SET);
139 // only allocate if needed
140 @@ -255,16 +255,16 @@
142 if (!pTable)
144 - isValid = false;
145 + isTableValid = false;
146 return NULL;
148 size_t bytesRead = fread(pTable, 1, lSize, m_pfile);
149 - isValid = bytesRead == lSize;
150 - if (isValid)
151 + isTableValid = bytesRead == lSize;
152 + if (isTableValid)
154 - isValid &= TtfUtil::CheckTable(tableId, pTable, lSize);
155 + isTableValid &= TtfUtil::CheckTable(tableId, pTable, lSize);
157 - if (!isValid)
158 + if (!isTableValid)
160 return 0;
162 --- misc/silgraphite-2.3.1/engine/src/font/Font.cpp Tue May 20 08:04:16 2008
163 +++ misc/build/silgraphite-2.3.1/engine/src/font/Font.cpp Sat Aug 22 19:36:33 2009
164 @@ -626,7 +626,7 @@
165 Assert(false);
166 m_ifeat = m_cfeat;
168 - else if (m_ifeat + n < 0)
169 + else if (static_cast<int>(m_ifeat) + n < 0)
171 // Can't decrement.
172 Assert(false);
173 @@ -727,7 +727,7 @@
174 Assert(false);
175 m_ifset = m_cfset;
177 - if (m_ifset + n < 0)
178 + if (static_cast<int>(m_ifset) + n < 0)
180 // Can't decrement.
181 Assert(false);
182 @@ -820,7 +820,7 @@
183 Assert(false);
184 m_ilang = m_clang;
186 - else if (m_ilang + n < 0)
187 + else if (static_cast<int>(m_ilang) + n < 0)
189 // Can't decrement.
190 Assert(false);
191 @@ -906,7 +906,7 @@
192 Assert(false);
193 m_ilang = m_clang;
195 - else if (m_ilang + n < 0)
196 + else if (static_cast<int>(m_ilang) + n < 0)
198 // Can't decrement.
199 Assert(false);
200 --- misc/silgraphite-2.3.1/engine/src/font/TtfUtil.cpp Thu Jan 29 10:33:19 2009
201 +++ misc/build/silgraphite-2.3.1/engine/src/font/TtfUtil.cpp Sat Aug 22 19:36:33 2009
202 @@ -492,7 +492,7 @@
203 const Sfnt::FontHeader * pTable =
204 reinterpret_cast<const Sfnt::FontHeader *>(pHead);
206 - return read(((pTable->mac_style) & 0x00000002) != 0);
207 + return ((read(pTable->mac_style) & 0x00000002) != 0);
210 /*----------------------------------------------------------------------------------------------
211 @@ -1108,8 +1108,8 @@
212 { // loca entries are two bytes and have been divided by two
213 if (nGlyphId <= (lLocaSize >> 1) - 1) // allow sentinel value to be accessed
215 - const uint16 * pTable = reinterpret_cast<const uint16 *>(pLoca);
216 - return (read(pTable[nGlyphId]) << 1);
217 + const uint16 * pTableLoca = reinterpret_cast<const uint16 *>(pLoca);
218 + return (read(pTableLoca[nGlyphId]) << 1);
222 @@ -1117,8 +1117,8 @@
223 { // loca entries are four bytes
224 if (nGlyphId <= (lLocaSize >> 2) - 1)
226 - const uint32 * pTable = reinterpret_cast<const uint32 *>(pLoca);
227 - return read(pTable[nGlyphId]);
228 + const uint32 * pTableLoca = reinterpret_cast<const uint32 *>(pLoca);
229 + return read(pTableLoca[nGlyphId]);
233 @@ -1586,7 +1586,7 @@
235 for (size_t i = 0; i < cCompId; i++)
237 - void * pSimpleGlyf = GlyfLookup(static_cast<gr::gid16>(rgnCompId[i]),
238 + pSimpleGlyf = GlyfLookup(static_cast<gr::gid16>(rgnCompId[i]),
239 pGlyf, pLoca, lLocaSize, pHead);
240 if (pSimpleGlyf == NULL) {return false;}
242 @@ -1748,7 +1748,7 @@
243 ----------------------------------------------------------------------------------------------*/
244 bool GlyfPoints(gr::gid16 nGlyphId, const void * pGlyf,
245 const void * pLoca, size_t lLocaSize, const void * pHead,
246 - const int * prgnContourEndPoint, size_t cnEndPoints,
247 + const int * /*prgnContourEndPoint*/, size_t /*cnEndPoints*/,
248 int * prgnX, int * prgnY, bool * prgfOnCurve, size_t cnPoints)
250 std::fill_n(prgnX, cnPoints, INT_MAX);
251 --- misc/silgraphite-2.3.1/engine/src/painter/SegmentPainter.cpp Wed Jan 28 04:01:29 2009
252 +++ misc/build/silgraphite-2.3.1/engine/src/painter/SegmentPainter.cpp Sat Aug 22 19:36:33 2009
253 @@ -353,7 +353,7 @@
254 @param bOn - true if we are turning on (ignored in this implementation)
255 ----------------------------------------------------------------------------------------------*/
256 bool SegmentPainter::drawSelectionRange(int ichwAnchor, int ichwEnd,
257 - float ydLineTop, float ydLineBottom, bool bOn)
258 + float ydLineTop, float ydLineBottom, bool /*bOn*/)
260 if (g_fDrawing)
261 return true;
262 @@ -993,7 +993,7 @@
263 an I-beam (std selection)
264 ----------------------------------------------------------------------------------------------*/
265 void SegmentPainter::CalcOrDrawInsertionPoint(
266 - int ichwIP, bool fAssocPrev, bool bOn, bool fForceSplit,
267 + int ichwIP, bool fAssocPrev, bool /*bOn*/, bool fForceSplit,
268 Rect * prdPrimary, Rect * prdSecondary)
270 GrResult res = kresOk;
271 @@ -1277,7 +1277,7 @@
272 if NULL, do the drawing
273 ----------------------------------------------------------------------------------------------*/
274 void SegmentPainter::InvertIBeam(float xs, float ysTop, float ysBottom,
275 - bool fAssocPrev, Rect * prdRet)
276 + bool /*fAssocPrev*/, Rect * prdRet)
278 float xd = ScaleXToDest(xs);
279 float ydTop = ScaleYToDest(ysTop);
280 @@ -1675,7 +1675,7 @@
283 bool SegmentPainter::AtEdgeOfCluster(GrSlotOutput * psloutBase, int isloutBase,
284 - GrSlotOutput * pslout, int islout, bool fBefore)
285 + GrSlotOutput * /*pslout*/, int islout, bool fBefore)
287 // Compare pslout to all the members of the cluster. If it is the minimum or maximum, it
288 // is at an edge.
289 @@ -1778,12 +1778,12 @@
291 for (icomp = 0; icomp < pslout->NumberOfComponents(); icomp++)
293 - for (int ichw = pslout->FirstUnderlyingComponent(icomp) ;
294 - ichw <= pslout->LastUnderlyingComponent(icomp) ;
295 - ichw++)
296 + for (int ichwTemp = pslout->FirstUnderlyingComponent(icomp) ;
297 + ichwTemp <= pslout->LastUnderlyingComponent(icomp) ;
298 + ichwTemp++)
300 - if (m_pseg->m_prgiComponent[ichw - m_pseg->m_ichwAssocsMin] == icomp)
301 - prgfAllSelected[ichw] = fAll;
302 + if (m_pseg->m_prgiComponent[ichwTemp - m_pseg->m_ichwAssocsMin] == icomp)
303 + prgfAllSelected[ichwTemp] = fAll;
307 @@ -2304,7 +2304,11 @@
308 Assert that there are no overlaps among all the rectangles in the array, which should
309 be the case if AdjustRectsToNotOverlap is working properly.
310 ----------------------------------------------------------------------------------------------*/
311 +#ifdef _DEBUG
312 void SegmentPainter::AssertNoOverlaps(std::vector<Rect> & vrect)
313 +#else
314 +void SegmentPainter::AssertNoOverlaps(std::vector<Rect> & /*vrect*/)
315 +#endif
317 #ifdef _DEBUG
318 for (int irect1 = 0; irect1 < signed(vrect.size() - 1); irect1++)
319 @@ -2452,7 +2456,11 @@
320 Assert that there are no overlaps among all the rectangles in the array, which should
321 be the case if AdjustRectsToNotOverlap is working properly.
322 ----------------------------------------------------------------------------------------------*/
323 +#ifdef _DEBUG
324 void SegmentPainter::AssertNoOverlaps(std::vector<LineSeg> & vls)
325 +#else
326 +void SegmentPainter::AssertNoOverlaps(std::vector<LineSeg> & /*vls*/)
327 +#endif
329 #ifdef _DEBUG
330 for (int ils1 = 0; ils1 < (int)vls.size() - 1; ils1++)
331 @@ -2884,7 +2892,7 @@
333 if (icompNext != icompCurr)
335 - float xsHorizNext = (fIPOnRight) ? vxsRights[icompNext] : vxsLefts[icompNext];
336 + xsHorizNext = (fIPOnRight) ? vxsRights[icompNext] : vxsLefts[icompNext];
337 if (fMovingRight && xsHorizNext > xsHorizCurr)
338 break;
339 else if (!fMovingRight && xsHorizNext < xsHorizCurr)
340 @@ -2996,7 +3004,7 @@
341 /*----------------------------------------------------------------------------------------------
342 Make sure the font is set to use the character properties required by this segment.
343 ----------------------------------------------------------------------------------------------*/
344 -void SegmentPainter::SetFontProps(unsigned long clrFore, unsigned long clrBack)
345 +void SegmentPainter::SetFontProps(unsigned long /*clrFore*/, unsigned long /*clrBack*/)
347 return;
349 --- misc/silgraphite-2.3.1/engine/src/segment/FileInput.cpp Thu Jan 22 00:36:42 2009
350 +++ misc/build/silgraphite-2.3.1/engine/src/segment/FileInput.cpp Sat Aug 22 19:36:33 2009
351 @@ -80,7 +80,7 @@
352 #ifdef GR_FW
353 bool GrBufferIStream::Open(std::wstring stuFileName, int kMode)
354 #else
355 -bool GrBufferIStream::Open(const char * pcFileName, std::ios::openmode kMode)
356 +bool GrBufferIStream::Open(const char * /*pcFileName*/, std::ios::openmode /*kMode*/)
357 #endif
359 Assert(false); // use OpenBuffer
360 --- misc/silgraphite-2.3.1/engine/src/segment/GrCharStream.cpp Thu Jan 22 00:36:42 2009
361 +++ misc/build/silgraphite-2.3.1/engine/src/segment/GrCharStream.cpp Sat Aug 22 19:36:33 2009
362 @@ -417,8 +417,11 @@
363 return true;
367 +#ifdef NDEBUG
368 +bool GrCharStream::AtUnicodeCharBoundary(utf8 * prgchs, int cchs, int ichs, UtfType /*utf*/)
369 +#else
370 bool GrCharStream::AtUnicodeCharBoundary(utf8 * prgchs, int cchs, int ichs, UtfType utf)
371 +#endif
373 Assert(ichs >= 0);
374 Assert(ichs <= cchs);
375 --- misc/silgraphite-2.3.1/engine/src/segment/GrClassTable.h Thu Jan 22 00:36:42 2009
376 +++ misc/build/silgraphite-2.3.1/engine/src/segment/GrClassTable.h Sat Aug 22 19:36:33 2009
377 @@ -54,7 +54,11 @@
378 /*------------------------------------------------------------------------------------------
379 Copy the raw memory into the instance.
380 ------------------------------------------------------------------------------------------*/
381 +#ifdef NDEBUG
382 + void CopyFrom(data16 * pchwStart, int /*cchw*/)
383 +#else
384 void CopyFrom(data16 * pchwStart, int cchw)
385 +#endif
387 m_cgixBIG = pchwStart[0];
388 m_digixBIGInit = pchwStart[1];
389 --- misc/silgraphite-2.3.1/engine/src/segment/GrEngine.cpp Wed Jan 28 04:01:29 2009
390 +++ misc/build/silgraphite-2.3.1/engine/src/segment/GrEngine.cpp Sat Aug 22 19:36:33 2009
391 @@ -159,12 +159,12 @@
392 GrEngine::~GrEngine()
394 DestroyEverything();
395 - #ifdef _MSC_VER
396 - if (!_CrtCheckMemory())
398 - OutputDebugString(L"bad memory");
400 - #endif
401 +// #ifdef _MSC_VER
402 +// if (!_CrtCheckMemory())
403 +// {
404 +// OutputDebugString(L"bad memory");
405 +// }
406 +// #endif
409 /*----------------------------------------------------------------------------------------------
410 @@ -173,12 +173,12 @@
411 void GrEngine::DestroyEverything()
413 DestroyContents();
414 - #ifdef _MSC_VER
415 - if (!_CrtCheckMemory())
417 - OutputDebugString(L"bad memory");
419 - #endif
420 +// #ifdef _MSC_VER
421 +// if (!_CrtCheckMemory())
422 +// {
423 +// OutputDebugString(L"bad memory");
424 +// }
425 +// #endif
427 m_strCtrlFileReg.erase();
428 m_strCtrlFileBold.erase();
429 @@ -417,7 +417,11 @@
430 @return The supported script direction(s). If more than one, the application is
431 responsible for choosing the most appropriate.
432 ----------------------------------------------------------------------------------------------*/
433 +#ifdef NDEBUG
434 +GrResult GrEngine::get_ScriptDirection(unsigned int * pgrfsdc, OLECHAR * /*prgchwErrMsg*/, int /*cchMaxErrMsg*/)
435 +#else
436 GrResult GrEngine::get_ScriptDirection(unsigned int * pgrfsdc, OLECHAR * prgchwErrMsg, int cchMaxErrMsg)
437 +#endif
439 ChkGrOutPtr(pgrfsdc);
440 ChkGrArrayArg(prgchwErrMsg, cchMaxErrMsg);
441 @@ -789,7 +793,7 @@
442 Record a system error indicating a bad error in rendering using a supposedly valid font.
443 OBSOLETE
444 ----------------------------------------------------------------------------------------------*/
445 -void GrEngine::RecordFontRunError(OLECHAR * prgchwErrMsg, int cchMax, GrResult res)
446 +void GrEngine::RecordFontRunError(OLECHAR * prgchwErrMsg, int cchMax, GrResult /*res*/)
448 if (prgchwErrMsg == NULL || cchMax == 0)
449 return;
450 @@ -970,7 +974,7 @@
451 /*----------------------------------------------------------------------------------------------
452 Return whether the text is asking for bold and/or italic text.
453 ----------------------------------------------------------------------------------------------*/
454 -void GrEngine::GetStyles(Font * pfont, int ichwMin, bool * pfBold, bool * pfItalic)
455 +void GrEngine::GetStyles(Font * pfont, int /*ichwMin*/, bool * pfBold, bool * pfItalic)
457 *pfBold = pfont->bold();
458 *pfItalic = pfont->italic();
459 @@ -981,7 +985,11 @@
460 Should only be called when we know we are using a base font, or when we are reading
461 the base font to see if it is valid.
462 ----------------------------------------------------------------------------------------------*/
463 +#ifdef NDEBUG
464 +void GrEngine::SwitchGraphicsFont(bool /*fBase*/)
465 +#else
466 void GrEngine::SwitchGraphicsFont(bool fBase)
467 +#endif
469 Assert(!fBase || m_stuBaseFaceName.size() > 0);
471 @@ -1135,7 +1143,7 @@
472 m_chwJShrink0 = 0xffff;
473 m_chwJStep0 = 0xffff;
474 m_chwJWeight0 = 0xffff;
475 - for (int i = 0; i < m_cJLevels; i++)
476 + for (i = 0; i < m_cJLevels; i++)
478 // justification glyph attribute IDs
479 bTmp = grstrm.ReadByteFromFont();
480 @@ -1210,10 +1218,12 @@
482 // rendering behaviors--ignore for now
483 byte cBehaviors = grstrm.ReadByteFromFont();
484 - unsigned int nBehaviors[kMaxRenderingBehavior];
485 + int nTmp;
486 + //unsigned int nBehaviors[kMaxRenderingBehavior]; -- this big buffer causes a stack overflow in Multiscribe; rework eventually
487 for (i = 0; i < cBehaviors; i++)
489 - nBehaviors[i] = unsigned(grstrm.ReadIntFromFont());
490 + //nBehaviors[i] = unsigned(grstrm.ReadIntFromFont());
491 + nTmp = unsigned(grstrm.ReadIntFromFont());
494 // linebreak glyph ID
495 --- misc/silgraphite-2.3.1/engine/src/segment/GrFSM.cpp Thu Jan 22 00:36:42 2009
496 +++ misc/build/silgraphite-2.3.1/engine/src/segment/GrFSM.cpp Sat Aug 22 19:36:33 2009
497 @@ -46,7 +46,7 @@
498 Fill in the FSM by reading from the font stream.
499 Assumes the stream is in the correct position.
500 ----------------------------------------------------------------------------------------------*/
501 -bool GrFSM::ReadFromFont(GrIStream & grstrm, int fxdVersion)
502 +bool GrFSM::ReadFromFont(GrIStream & grstrm, int /*fxdVersion*/)
504 short snTmp;
506 @@ -138,7 +138,7 @@
507 Fill in the FSM's state table by reading from the font stream.
508 Assumes the stream is in the correct position.
509 ----------------------------------------------------------------------------------------------*/
510 -bool GrFSM::ReadStateTableFromFont(GrIStream & grstrm, int fxdVersion)
511 +bool GrFSM::ReadStateTableFromFont(GrIStream & grstrm, int /*fxdVersion*/)
513 int cCells = ((m_crow - m_crowFinal) * m_ccol);
514 m_prgrowTransitions = new short[cCells];
515 --- misc/silgraphite-2.3.1/engine/src/segment/GrFeature.cpp Thu Jan 22 00:36:42 2009
516 +++ misc/build/silgraphite-2.3.1/engine/src/segment/GrFeature.cpp Sat Aug 22 19:36:33 2009
517 @@ -186,7 +186,7 @@
518 /*----------------------------------------------------------------------------------------------
519 Read the languages from the font.
520 ----------------------------------------------------------------------------------------------*/
521 -bool GrLangTable::ReadFromFont(GrIStream * pgrstrm, int fxdVersion)
522 +bool GrLangTable::ReadFromFont(GrIStream * pgrstrm, int /*fxdVersion*/)
524 GrIStream & grstrm = *pgrstrm;
526 @@ -206,13 +206,22 @@
528 m_cbOffset0 = (lsbf)(m_prglang[0].cbOffsetBIG);
530 - Assert((lsbf)(m_prglang[m_clang].cFeaturesBIG) == 0); // bogus entry has no settings
531 + if ((lsbf)(m_prglang[m_clang].cFeaturesBIG) == 0) // bogus entry has no settings
533 cb = (lsbf)(m_prglang[m_clang].cbOffsetBIG) - m_cbOffset0;
534 - Assert(cb % sizeof(FeatSet) == 0); // # of bytes fits nicely into FeatSet class
535 + if (cb % sizeof(FeatSet) == 0) // # of bytes fits nicely into FeatSet class
537 int cfset = cb / sizeof(FeatSet);
538 m_prgfset = new FeatSet[cfset];
539 m_cfset = cfset;
540 grstrm.ReadBlockFromFont(m_prgfset, cb);
542 + else return false;
544 + else
546 + return false;
549 return true;
551 --- misc/silgraphite-2.3.1/engine/src/segment/GrPass.cpp Wed Jan 28 04:01:29 2009
552 +++ misc/build/silgraphite-2.3.1/engine/src/segment/GrPass.cpp Sat Aug 22 19:36:34 2009
553 @@ -279,9 +279,10 @@
554 @param twsh - how we are handling trailing white-space
555 @param pnRet - return value
556 @param pcslotGot - return the number of slots gotten
557 - @param pislotFinalBreak - return the index of the final slot, when we are removing
558 - the trailing white-space and so the end of the segment
559 - will be before the any actual line-break slot
560 + @param pislotFinalBreak - index of the final slot (LB or actual glyph), or -1;
561 + adjusted when we are removing the trailing white-space and
562 + so the end of the segment will be before the any actual
563 + line-break slot
565 @return kNextPass if we were able to generated the number requested, or processing is
566 complete; otherwise return the number of slots needed from the previous pass.
567 @@ -465,7 +466,7 @@
568 void GrBidiPass::ExtendOutput(GrTableManager * ptman,
569 GrSlotStream* psstrmIn, GrSlotStream* psstrmOut,
570 int cslotNeededByNext, TrWsHandling twsh,
571 - int * pnRet, int * pcslotGot, int * pislotFinalBreak)
572 + int * pnRet, int * pcslotGot, int * /*pislotFinalBreak*/)
574 Assert(psstrmIn->SlotsToReprocess() == 0);
576 @@ -776,7 +777,7 @@
577 int GrPass::ExtendFinalOutput(GrTableManager * ptman,
578 GrSlotStream * psstrmInput, GrSlotStream * psstrmOutput,
579 float xsSpaceAllotted, bool fWidthIsCharCount, bool fInfiniteWidth,
580 - bool fHaveLineBreak, bool fMustBacktrack, LineBrk lbMax, TrWsHandling twsh,
581 + bool fHaveLineBreak, bool fMustBacktrack, LineBrk /*lbMax*/, TrWsHandling twsh,
582 int * pislotLB, float * pxsWidth)
584 EngineState * pengst = ptman->State();
585 @@ -897,7 +898,11 @@
586 Remove undesirable trailing white-space.
587 ----------------------------------------------------------------------------------------------*/
588 int GrPass::RemoveTrailingWhiteSpace(GrTableManager * ptman, GrSlotStream * psstrmOut,
589 +#ifdef NDEBUG
590 + TrWsHandling /*twsh*/, int * pislotFinalBreak)
591 +#else
592 TrWsHandling twsh, int * pislotFinalBreak)
593 +#endif
595 EngineState * pengst = ptman->State();
597 @@ -944,7 +949,7 @@
598 should never be necessary if they've set up their tables right.
599 ----------------------------------------------------------------------------------------------*/
600 void GrPass::CheckInputProgress(GrSlotStream * psstrmInput, GrSlotStream * psstrmOutput,
601 - int islotOrigInput)
602 + int /*islotOrigInput*/)
604 int islotInput = psstrmInput->ReadPosForNextGet();
605 // Assert(islotInput >= islotOrigInput); -- no longer true now that we can back up
606 @@ -1752,7 +1757,7 @@
607 ----------------------------------------------------------------------------------------------*/
608 int GrPass::Unwind(GrTableManager * ptman,
609 int islotChanged, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut,
610 - bool fFirst)
611 + bool /*fFirst*/)
613 // Back up the number of slots required for the longest rule context,
614 // but if we land in the middle of a chunk, go forward to its boundary.
615 @@ -1824,7 +1829,7 @@
616 ----------------------------------------------------------------------------------------------*/
617 int GrBidiPass::Unwind(GrTableManager * ptman,
618 int islotChanged, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut,
619 - bool fFirst)
620 + bool /*fFirst*/)
622 int islotIn;
623 int islotOut;
624 @@ -1901,8 +1906,8 @@
625 OBSOLETE
626 ----------------------------------------------------------------------------------------------*/
627 //:Ignore
628 -void GrPosPass::Unattach(GrSlotStream * psstrmIn, int islotIn,
629 - GrSlotStream * psstrmOut, int islotOut, int islotLB)
630 +void GrPosPass::Unattach(GrSlotStream * /*psstrmIn*/, int /*islotIn*/,
631 + GrSlotStream * /*psstrmOut*/, int /*islotOut*/, int /*islotLB*/)
633 // Because this is a positioning pass, there is a one-to-one correspondence between
634 // the slots in the input and the slots in the output. Thus we can make simplifying
635 --- misc/silgraphite-2.3.1/engine/src/segment/GrPass.h Thu Aug 21 16:24:32 2008
636 +++ misc/build/silgraphite-2.3.1/engine/src/segment/GrPass.h Sat Aug 22 19:36:34 2009
637 @@ -197,7 +197,7 @@
638 bool ReadFromFont(GrIStream & grstrm, int fxdSilfVersion, int fxdRuleVersion, int nOffset);
639 void InitializeWithNoRules();
641 - virtual void SetTopDirLevel(int n)
642 + virtual void SetTopDirLevel(int /*n*/)
643 { // only GrBidiPass does anything interesting
646 @@ -253,13 +253,13 @@
647 m_pzpst->SetResyncSkip(n);
650 - virtual void DoCleanUpSegMin(GrTableManager * ptman,
651 - GrSlotStream * psstrmIn, int islotInitReadPos, GrSlotStream * psstrmOut)
652 + virtual void DoCleanUpSegMin(GrTableManager * /*ptman*/,
653 + GrSlotStream * /*psstrmIn*/, int /*islotInitReadPos*/, GrSlotStream * /*psstrmOut*/)
657 - virtual void DoCleanUpSegLim(GrTableManager * ptman, GrSlotStream * psstrmOut,
658 - TrWsHandling twsh)
659 + virtual void DoCleanUpSegLim(GrTableManager * /*ptman*/, GrSlotStream * /*psstrmOut*/,
660 + TrWsHandling /*twsh*/)
664 @@ -383,8 +383,8 @@
665 void MapChunks(GrSlotStream * psstrmIn, GrSlotStream * psstrmOut,
666 int islotChunkI, int islotChunkO, int cslotReprocessed);
668 - virtual void Unattach(GrSlotStream * psstrmIn, int islotIn, // GrPosPass overrides
669 - GrSlotStream * psstrmOut, int islotOut, int islotLB)
670 + virtual void Unattach(GrSlotStream * /*psstrmIn*/, int /*islotIn*/, // GrPosPass overrides
671 + GrSlotStream * /*psstrmOut*/, int /*islotOut*/, int /*islotLB*/)
675 @@ -500,8 +500,8 @@
677 protected:
678 // Irrelevant when generating glyphs.
679 - virtual void RunRule(GrTableManager *, int ruln,
680 - GrSlotStream * psstrmInput, GrSlotStream * psstrmOutput)
681 + virtual void RunRule(GrTableManager *, int /*ruln*/,
682 + GrSlotStream * /*psstrmInput*/, GrSlotStream * /*psstrmOutput*/)
684 Assert(false);
686 --- misc/silgraphite-2.3.1/engine/src/segment/GrPassActionCode.cpp Wed Jan 28 04:01:29 2009
687 +++ misc/build/silgraphite-2.3.1/engine/src/segment/GrPassActionCode.cpp Sat Aug 22 19:36:34 2009
688 @@ -632,8 +632,13 @@
689 /*----------------------------------------------------------------------------------------------
690 We are finished processing a slot; go on to the next slot, or possibly go backwards.
691 ----------------------------------------------------------------------------------------------*/
692 -void GrPass::DoNext(GrTableManager * ptman,
693 - int cslot, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
694 +#ifdef NDEBUG
695 +void GrPass::DoNext(GrTableManager * /*ptman*/,
696 + int /*cslot*/, GrSlotStream * /*psstrmIn*/, GrSlotStream * /*psstrmOut*/)
697 +#else
698 +void GrPass::DoNext(GrTableManager * /*ptman*/,
699 + int cslot, GrSlotStream * /*psstrmIn*/, GrSlotStream * /*psstrmOut*/)
700 +#endif
702 gAssert(cslot == 1); // for now anyway
704 @@ -690,6 +695,7 @@
705 psstrmOut->SetSegMinToWritePos(false);
706 if (fSetSegLim)
707 psstrmOut->SetSegLimToWritePos(false);
708 + //gid16 chw; chw = pslotNew->GlyphID();
709 psstrmOut->NextPut(pslotNew);
712 @@ -729,6 +735,7 @@
713 psstrmOut->SetSegMinToWritePos(false);
714 if (fSetSegLim)
715 psstrmOut->SetSegLimToWritePos(false);
716 + //gid16 chw; chw = pslotNew->GlyphID();
717 psstrmOut->NextPut(pslotNew);
720 @@ -825,7 +832,7 @@
721 @param psstrmIn / Out - input/output streams
722 ----------------------------------------------------------------------------------------------*/
723 void GrPass::DoPutSubs3(GrTableManager * ptman, bool fInserting,
724 - int cslotSel1, int nSelClass1, int cslotSel2, int nSelClass2, int cslotSel3, int nSelClass3,
725 + int cslotSel1, int nSelClass1, int cslotSel2, int nSelClass2, int /*cslotSel3*/, int nSelClass3,
726 int nReplacementClass,
727 GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
729 @@ -888,7 +895,7 @@
730 Common part of all the DoPutSubs... methods.
731 ----------------------------------------------------------------------------------------------*/
732 void GrPass::DoPutSubsAux(GrTableManager * ptman, bool fInserting, gid16 nGlyphReplacement,
733 - GrSlotStream * psstrmIn, GrSlotStream * psstrmOut, GrSlotState * pslotNextInput,
734 + GrSlotStream * /*psstrmIn*/, GrSlotStream * psstrmOut, GrSlotState * pslotNextInput,
735 bool fAtSegMin, bool fAtSegLim)
737 EngineState * pengst = ptman->State();
738 @@ -915,6 +922,7 @@
739 psstrmOut->SetSegMinToWritePos(false);
740 if (fSetSegLim)
741 psstrmOut->SetSegLimToWritePos(false);
742 + //gid16 chw; chw = pslotNew->GlyphID();
743 psstrmOut->NextPut(pslotNew);
746 @@ -924,7 +932,7 @@
747 and its after-assoc to the slot before it. This makes it basically unselectable.
748 OBSOLETE - handled by slot initialization code
749 ----------------------------------------------------------------------------------------------*/
750 -void GrPass::SetNeutralAssocs(GrSlotState * pslotNew, GrSlotStream * psstrmIn)
751 +void GrPass::SetNeutralAssocs(GrSlotState * pslotNew, GrSlotStream * /*psstrmIn*/)
753 pslotNew->ClearAssocs();
755 @@ -943,6 +951,7 @@
756 psstrmOut->SetSegLimToWritePos();
758 GrSlotState * pslot = psstrmIn->NextGet();
759 + //gid16 chw; chw = pslotNew->GlyphID();
760 pslot->MarkDeleted();
762 if (ptman->LoggingTransduction())
763 @@ -957,7 +966,7 @@
764 @param fInserting - whether current slot was inserted
765 @param psstrmIn / Out - input/output streams
766 ----------------------------------------------------------------------------------------------*/
767 -void GrPass::DoAssoc(int cnAssocs, std::vector<int> & vnAssocs, bool fInserting,
768 +void GrPass::DoAssoc(int cnAssocs, std::vector<int> & vnAssocs, bool /*fInserting*/,
769 GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
771 gAssert((unsigned)cnAssocs == vnAssocs.size());
772 @@ -997,7 +1006,11 @@
773 @param vnStack - stack to read value from
774 @param psstrmIn / Out - input/output streams
775 ----------------------------------------------------------------------------------------------*/
776 +#ifdef NDEBUG
777 +void GrPass::DoSetAttr(GrTableManager * ptman, ActionCommand op, bool /*fInserting*/,
778 +#else
779 void GrPass::DoSetAttr(GrTableManager * ptman, ActionCommand op, bool fInserting,
780 +#endif
781 SlotAttrName slat, int slati, std::vector<int> & vnStack,
782 GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
784 @@ -1192,7 +1205,7 @@
785 @param psstrmIn - input stream
786 ----------------------------------------------------------------------------------------------*/
787 void GrPass::DoPushSlotAttr(GrTableManager * ptman,
788 - int nSlotRef, bool fInserting,
789 + int nSlotRef, bool /*fInserting*/,
790 SlotAttrName slat, int slati, std::vector<int> & vnStack,
791 GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
793 @@ -1236,16 +1249,16 @@
795 case kslatAttTo: nVal = pslot->AttachTo(); break;
796 case kslatAttLevel: nVal = pslot->AttachLevel(); break;
797 - case kslatAttAtX: nVal = pslot->AttachAtX(ptman, psstrmIn); break;
798 case kslatAttAtY: nVal = pslot->AttachAtY(); break;
799 case kslatAttAtGpt: nVal = pslot->AttachAtGpoint(); break;
800 case kslatAttAtXoff: nVal = pslot->AttachAtXOffset(); break;
801 case kslatAttAtYoff: nVal = pslot->AttachAtYOffset(); break;
802 - case kslatAttWithX: nVal = pslot->AttachWithX(ptman, psstrmIn); break;
803 case kslatAttWithY: nVal = pslot->AttachWithY(); break;
804 case kslatAttWithGpt: nVal = pslot->AttachWithGpoint(); break;
805 case kslatAttWithXoff: nVal = pslot->AttachWithXOffset(); break;
806 case kslatAttWithYoff: nVal = pslot->AttachWithYOffset(); break;
807 + case kslatAttAtX: nVal = pslot->AttachAtX(ptman, psstrmIn); break;
808 + case kslatAttWithX: nVal = pslot->AttachWithX(ptman, psstrmIn); break;
810 case kslatMeasureSol: nVal = pslot->MeasureSol(); break;
811 case kslatMeasureEol: nVal = pslot->MeasureEol(); break;
812 @@ -1282,7 +1295,7 @@
813 @param vnStack - stack to push onto
814 @param psstrmIn - input stream
815 ----------------------------------------------------------------------------------------------*/
816 -void GrPass::DoPushGlyphAttr(GrTableManager * ptman, int nSlotRef, bool fInserting,
817 +void GrPass::DoPushGlyphAttr(GrTableManager * ptman, int nSlotRef, bool /*fInserting*/,
818 int nGlyphAttr,
819 std::vector<int> & vnStack, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
821 @@ -1307,7 +1320,7 @@
822 @param vnStack - stack to push onto
823 @param psstrmIn - input stream
824 ----------------------------------------------------------------------------------------------*/
825 -void GrPass::DoPushAttToGlyphAttr(GrTableManager * ptman, int nSlotRef, bool fInserting,
826 +void GrPass::DoPushAttToGlyphAttr(GrTableManager * ptman, int nSlotRef, bool /*fInserting*/,
827 int nGlyphAttr, std::vector<int> & vnStack,
828 GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
830 @@ -1337,7 +1350,7 @@
831 @param vnStack - stack to push onto
832 @param psstrmIn - input stream
833 ----------------------------------------------------------------------------------------------*/
834 -void GrPass::DoPushGlyphMetric(GrTableManager * ptman, int nSlotRef, bool fInserting,
835 +void GrPass::DoPushGlyphMetric(GrTableManager * ptman, int nSlotRef, bool /*fInserting*/,
836 int nGlyphAttr, int nAttLevel,
837 std::vector<int> & vnStack, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
839 @@ -1364,7 +1377,7 @@
840 @param psstrmIn - input stream
841 @param psstrmOut - output stream
842 ----------------------------------------------------------------------------------------------*/
843 -void GrPass::DoPushAttToGlyphMetric(GrTableManager * ptman, int nSlotRef, bool fInserting,
844 +void GrPass::DoPushAttToGlyphMetric(GrTableManager * ptman, int nSlotRef, bool /*fInserting*/,
845 int nGlyphAttr, int nAttLevel,
846 std::vector<int> & vnStack,
847 GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
848 @@ -1399,7 +1412,7 @@
850 else
852 - pslot->CalcCompositeMetrics(ptman, psstrmIn, nAttLevel, true);
853 + pslot->CalcCompositeMetrics(ptman, psstrmIn, NULL, nAttLevel, true);
855 float xy;
856 switch (gmet)
857 @@ -1435,7 +1448,11 @@
858 @param psstrmIn - input stream
859 @param psstrmOut - output stream
860 ----------------------------------------------------------------------------------------------*/
861 -void GrPass::DoPushFeatValue(GrTableManager * ptman, int nSlotRef, bool fInserting,
862 +#ifdef NDEBUG
863 +void GrPass::DoPushFeatValue(GrTableManager * /*ptman*/, int nSlotRef, bool /*fInserting*/,
864 +#else
865 +void GrPass::DoPushFeatValue(GrTableManager * /*ptman*/, int nSlotRef, bool fInserting,
866 +#endif
867 int nFeat, std::vector<int> & vnStack, GrSlotStream * psstrmIn, GrSlotStream * psstrmOut)
869 gAssert(!fInserting);
870 --- misc/silgraphite-2.3.1/engine/src/segment/GrSlotState.cpp Wed Jan 28 04:01:29 2009
871 +++ misc/build/silgraphite-2.3.1/engine/src/segment/GrSlotState.cpp Sat Aug 22 19:36:34 2009
872 @@ -261,7 +261,7 @@
873 root or attached leaf slots.
874 OBSOLETE
875 ----------------------------------------------------------------------------------------------*/
876 -void GrSlotState::FixAttachmentTree(GrSlotState * pslotOld)
877 +void GrSlotState::FixAttachmentTree(GrSlotState * /*pslotOld*/)
879 #if 0
880 pslotOld->m_vpslotAttLeaves.CopyTo(m_vpslotAttLeaves);
881 @@ -524,13 +524,13 @@
882 GrSlotState * pslot;
883 if (HasComponents())
885 - for (int iComponent = 0; iComponent < m_cnCompPerLig; iComponent++)
886 + for (int iLigComponent = 0; iLigComponent < m_cnCompPerLig; iLigComponent++)
888 - pslot = CompRefSlot(iComponent);
889 + pslot = CompRefSlot(iLigComponent);
890 if (pslot)
892 Assert(PassModified() >= pslot->PassModified());
893 - pslot->AllComponentRefs(vichw, vicomp, iComponent);
894 + pslot->AllComponentRefs(vichw, vicomp, iLigComponent);
898 @@ -1024,7 +1024,7 @@
899 NOTE: the caller is responsible to zap the cached positions of following glyphs
900 in the stream.
901 ----------------------------------------------------------------------------------------------*/
902 -void GrSlotState::AttachToRoot(GrTableManager * ptman, GrSlotStream * psstrm,
903 +void GrSlotState::AttachToRoot(GrTableManager * /*ptman*/, GrSlotStream * psstrm,
904 GrSlotState * pslotNewRoot)
906 GrSlotState * pslotOldRoot = (m_dislotRootFixed == 0) ?
907 @@ -1063,7 +1063,7 @@
909 float xsWidth, xsVisWidth;
910 if (m_xsPositionX == kNegInfFloat || m_ysPositionY == kNegInfFloat)
911 - ptman->CalcPositionsUpTo(psstrmOut->m_ipass, this, &xsWidth, &xsVisWidth);
912 + ptman->CalcPositionsUpTo(psstrmOut->m_ipass, this, true, &xsWidth, &xsVisWidth);
914 *pmXPos = ptman->LogToEmUnits(m_xsPositionX);
915 *pmYPos = ptman->LogToEmUnits(m_ysPositionY);
916 @@ -1077,7 +1077,7 @@
918 Assert(m_dislotRootFixed == m_srAttachTo);
919 GrSlotState * pslotRoot = AttachRoot(psstrm);
920 - CalcRootMetrics(ptman, psstrm, kPosInfinity);
921 + CalcRootMetrics(ptman, psstrm, NULL, kPosInfinity);
922 if (pslotRoot)
923 pslotRoot->AdjustRootMetrics(ptman, psstrm);
925 @@ -1086,13 +1086,15 @@
926 Calculate the composite metrics for this slot.
928 @param psstrm - stream for which we are calculating it
929 + @param psstrmNext - because when processing in the middle of a pass, we may need to
930 + get the slot from the following (output) stream
931 @param nLevel - attachment level we are asking for; kPosInifinity means all levels
932 @param fThorough - true: do a thorough recalculation; false: don't recalculate
933 metrics for leaves (are they assumed to be accurate???)
934 --currently not used
935 ----------------------------------------------------------------------------------------------*/
936 void GrSlotState::CalcCompositeMetrics(GrTableManager * ptman, GrSlotStream * psstrm,
937 - int nLevel, bool fThorough)
938 + GrSlotStream * psstrmNext, int nLevel, bool fThorough)
940 if (m_nCompositeLevel == nLevel)
941 return;
942 @@ -1101,19 +1103,38 @@
944 Assert(m_dislotRootFixed == m_srAttachTo);
945 GrSlotState * pslotRoot = AttachRoot(psstrm);
946 + // Kludge to handle the fact that we might have gotten the root from the wrong stream.
947 + // Calling MidPassSlotAt finds the right one.
948 + if (psstrmNext && pslotRoot)
950 + int islotRoot = pslotRoot->PosPassIndex();
951 + pslotRoot = psstrm->MidPassSlotAt(islotRoot, psstrmNext);
954 InitMetrics(ptman, pslotRoot);
956 for (size_t islot = 0; islot < m_vdislotAttLeaves.size(); islot++)
958 - GrSlotState * pslotLeaf = SlotAtOffset(psstrm, m_vdislotAttLeaves[islot]);
959 + GrSlotState * pslotLeaf;
960 + if (psstrmNext)
962 + // Calculating a position in the middle of processing a pass.
963 + pslotLeaf = psstrm->MidPassSlotAt(PosPassIndex() + m_vdislotAttLeaves[islot],
964 + psstrmNext);
966 + else
968 + // Calculating the final position.
969 + pslotLeaf = SlotAtOffset(psstrm, m_vdislotAttLeaves[islot]);
972 if (pslotLeaf->AttachLevel() <= nLevel)
973 - pslotLeaf->CalcCompositeMetrics(ptman, psstrm, nLevel, fThorough);
974 + pslotLeaf->CalcCompositeMetrics(ptman, psstrm, psstrmNext, nLevel, fThorough);
975 else
976 // this slot will be ignored in the composite metrics
977 pslotLeaf->ZapRootMetrics();
979 - CalcRootMetrics(ptman, psstrm, nLevel);
980 + CalcRootMetrics(ptman, psstrm, psstrmNext, nLevel);
982 m_nCompositeLevel = nLevel;
984 @@ -1129,25 +1150,33 @@
985 /*----------------------------------------------------------------------------------------------
986 Calculate the metrics for this node and all its leaf nodes.
987 ----------------------------------------------------------------------------------------------*/
988 -void GrSlotState::CalcRootMetrics(GrTableManager * ptman, GrSlotStream * psstrm, int nLevel)
989 +void GrSlotState::CalcRootMetrics(GrTableManager * /*ptman*/, GrSlotStream * psstrm,
990 + GrSlotStream * psstrmNext, int nLevel)
992 for (size_t idislot = 0; idislot < m_vdislotAttLeaves.size(); idislot++)
994 - GrSlotState * pslot = SlotAtOffset(psstrm, m_vdislotAttLeaves[idislot]);
995 - if (pslot->AttachLevel() > nLevel)
996 + GrSlotState * pslotLeaf = SlotAtOffset(psstrm, m_vdislotAttLeaves[idislot]);
997 + // Kludge to handle the fact that we might have gotten the leaf from the wrong stream.
998 + // Calling MidPassSlotAt finds the right one.
999 + if (psstrmNext)
1001 + int islot = pslotLeaf->PosPassIndex();
1002 + pslotLeaf = psstrm->MidPassSlotAt(islot, psstrmNext);
1004 + if (pslotLeaf->AttachLevel() > nLevel)
1005 continue;
1007 - m_xsClusterXOffset = min(m_xsClusterXOffset, pslot->m_xsClusterXOffset);
1008 - if (!pslot->m_fIgnoreAdvance)
1009 + m_xsClusterXOffset = min(m_xsClusterXOffset, pslotLeaf->m_xsClusterXOffset);
1010 + if (!pslotLeaf->m_fIgnoreAdvance)
1012 m_xsClusterAdv = max(
1013 m_xsClusterAdv,
1014 - pslot->m_xsClusterAdv + m_xsRootShiftX);
1015 + pslotLeaf->m_xsClusterAdv + m_xsRootShiftX);
1017 - m_xsClusterBbLeft = min(m_xsClusterBbLeft, pslot->m_xsClusterBbLeft);
1018 - m_xsClusterBbRight = max(m_xsClusterBbRight, pslot->m_xsClusterBbRight);
1019 - m_ysClusterBbTop = max(m_ysClusterBbTop, pslot->m_ysClusterBbTop);
1020 - m_ysClusterBbBottom = min(m_ysClusterBbBottom, pslot->m_ysClusterBbBottom);
1021 + m_xsClusterBbLeft = min(m_xsClusterBbLeft, pslotLeaf->m_xsClusterBbLeft);
1022 + m_xsClusterBbRight = max(m_xsClusterBbRight, pslotLeaf->m_xsClusterBbRight);
1023 + m_ysClusterBbTop = max(m_ysClusterBbTop, pslotLeaf->m_ysClusterBbTop);
1024 + m_ysClusterBbBottom = min(m_ysClusterBbBottom, pslotLeaf->m_ysClusterBbBottom);
1028 @@ -1263,7 +1292,7 @@
1029 /*----------------------------------------------------------------------------------------------
1030 Y-offsets of a single glyph relative to the previous advance position.
1031 ----------------------------------------------------------------------------------------------*/
1032 -float GrSlotState::GlyphYOffset(GrSlotStream * psstrm)
1033 +float GrSlotState::GlyphYOffset(GrSlotStream * /*psstrm*/)
1035 return m_ysOffsetY;
1037 --- misc/silgraphite-2.3.1/engine/src/segment/GrSlotState.h Wed Jan 28 04:01:29 2009
1038 +++ misc/build/silgraphite-2.3.1/engine/src/segment/GrSlotState.h Sat Aug 22 19:36:34 2009
1039 @@ -308,7 +308,11 @@
1041 return m_islotPosPass;
1043 +#ifdef NDEBUG
1044 + void SetPosPassIndex(int islot, bool /*fInputToPosPass1*/)
1045 +#else
1046 void SetPosPassIndex(int islot, bool fInputToPosPass1)
1047 +#endif
1049 // If we're resetting it, it should be to the same value as before:
1050 Assert(fInputToPosPass1 || m_islotPosPass == kNotYetSet || m_islotPosPass == islot);
1051 @@ -386,12 +390,12 @@
1052 return (IsInitialLineBreak(chwLB) || IsFinalLineBreak(chwLB));
1053 //return (m_chwGlyphID == chwLB); // TODO: remove
1055 - bool IsInitialLineBreak(gid16 chwLB)
1056 + bool IsInitialLineBreak(gid16 /*chwLB*/)
1058 return (m_spsl == kspslLbInitial);
1059 //return (IsLineBreak(chwLB) && m_fInitialLB == true); // TODO: remove
1061 - bool IsFinalLineBreak(gid16 chwLB)
1062 + bool IsFinalLineBreak(gid16 /*chwLB*/)
1064 return (m_spsl == kspslLbFinal);
1065 //return (IsLineBreak(chwLB) && m_fInitialLB == false); // TODO: remove
1066 @@ -475,7 +479,7 @@
1067 return m_mAttachAtX;
1070 - int AttachWithX(GrTableManager * ptman, GrSlotStream * psstrm)
1071 + int AttachWithX(GrTableManager * /*ptman*/, GrSlotStream * /*psstrm*/)
1073 if (m_mAttachAtX == kNotYetSet)
1075 @@ -615,7 +619,7 @@
1076 GrSlotStream * psstrmIn, GrSlotStream * psstrmOut, int islotThis);
1078 void CalcCompositeMetrics(GrTableManager * ptman, GrSlotStream * psstrm,
1079 - int nLevel, bool fThorough = false);
1080 + GrSlotStream * psstrmNext, int nLevel, bool fThorough = false);
1082 void Position(GrTableManager * ptman,
1083 GrSlotStream * psstrmOut, int * pmXPos, int * pmYPos);
1084 @@ -646,7 +650,7 @@
1086 return ClusterBbLeft(psstrm) + xs;
1088 - float ClusterRsb(GrSlotStream * psstrm, float xs)
1089 + float ClusterRsb(GrSlotStream * /*psstrm*/, float xs)
1091 return ClusterAdvWidthFrom(xs) - ClusterBbRightFrom(xs);
1093 @@ -668,19 +672,19 @@
1095 return ClusterBbRightFrom(Base(psstrm)->ClusterRootOffset());
1097 - float ClusterBbTop(GrSlotStream * psstrm)
1098 + float ClusterBbTop(GrSlotStream * /*psstrm*/)
1100 return m_ysClusterBbTop;
1102 - float ClusterBbBottom(GrSlotStream * psstrm)
1103 + float ClusterBbBottom(GrSlotStream * /*psstrm*/)
1105 return m_ysClusterBbBottom;
1107 - float ClusterBbWidth(GrSlotStream * psstrm)
1108 + float ClusterBbWidth(GrSlotStream * /*psstrm*/)
1110 return m_xsClusterBbRight - m_xsClusterBbLeft + 1;
1112 - float ClusterBbHeight(GrSlotStream * psstrm)
1113 + float ClusterBbHeight(GrSlotStream * /*psstrm*/)
1115 return m_ysClusterBbTop - m_ysClusterBbBottom + 1;
1117 @@ -990,7 +994,8 @@
1118 void InitMetrics(GrTableManager * ptman, GrSlotState * pslotRoot);
1119 void InitLeafMetrics(GrTableManager * ptman, GrSlotState * pslotRoot);
1120 void InitRootMetrics(GrTableManager * ptman);
1121 - void CalcRootMetrics(GrTableManager * ptman, GrSlotStream *, int nLevel);
1122 + void CalcRootMetrics(GrTableManager * ptman, GrSlotStream * psstrm,
1123 + GrSlotStream * psstrmNext, int nLevel);
1124 void AttachToRoot(GrTableManager * ptman, GrSlotStream *, GrSlotState * pslotNewRoot);
1125 void AttachLogUnits(GrTableManager * ptman,
1126 GrSlotState * pslotRoot,
1127 --- misc/silgraphite-2.3.1/engine/src/segment/GrSlotStream.cpp Wed Feb 04 07:53:26 2009
1128 +++ misc/build/silgraphite-2.3.1/engine/src/segment/GrSlotStream.cpp Sat Aug 22 19:36:34 2009
1129 @@ -189,12 +189,16 @@
1130 stream position when the rule is being run.
1132 @param dislot - how far back to peek before the write position
1133 - when the rule started; a negative number
1134 + WHEN THE RULE STARTED; a negative number
1135 (NOTE: the current write position is irrelevant)
1136 @param fNullOkay - true if it's okay to return NULL in the situation where we're asking
1137 for something before the beginning of the stream
1138 ----------------------------------------------------------------------------------------------*/
1139 +#ifdef NDEBUG
1140 +GrSlotState * GrSlotStream::PeekBack(int dislot, bool /*fNullOkay*/)
1141 +#else
1142 GrSlotState * GrSlotStream::PeekBack(int dislot, bool fNullOkay)
1143 +#endif
1145 Assert(dislot < 0);
1146 if (dislot < m_islotRuleStartWrite * -1)
1147 @@ -1104,6 +1108,7 @@
1148 case kdircRLO:
1149 case kdircRLE:
1150 case kdircPdfR:
1151 + case kdircRlb:
1152 return true;
1154 case kdircNeutral:
1155 @@ -1212,7 +1217,7 @@
1156 return true;
1158 float xsWidth, xsVisWidth;
1159 - ptman->CalcPositionsUpTo(m_ipass, NULL, &xsWidth, &xsVisWidth);
1160 + ptman->CalcPositionsUpTo(m_ipass, NULL, false, &xsWidth, &xsVisWidth);
1162 *pxsWidth = (fIgnoreTrailingWS || twsh == ktwshOnlyWs) ? xsVisWidth : xsWidth;
1163 return (*pxsWidth < xsSpaceAllotted);
1164 @@ -1322,7 +1327,7 @@
1165 @param islotMin - first slot that is officially part of the segment (after initial LB)
1166 ----------------------------------------------------------------------------------------------*/
1167 int GrSlotStream::MakeSegmentBreak(GrTableManager * ptman,
1168 - int islotPrevBreak, bool fInsertedLB, int islotStartTry,
1169 + int /*islotPrevBreak*/, bool /*fInsertedLB*/, int islotStartTry,
1170 LineBrk lb, TrWsHandling twsh, int islotMin,
1171 LineBrk * plbNextToTry)
1173 @@ -1576,7 +1581,11 @@
1174 Return the break weight of the given slot, which should be a line-break.
1175 OBSOLETE??
1176 ----------------------------------------------------------------------------------------------*/
1177 +#ifdef NDEBUG
1178 +LineBrk GrSlotStream::BreakWeightAt(gid16 /*chwLB*/, int islot)
1179 +#else
1180 LineBrk GrSlotStream::BreakWeightAt(gid16 chwLB, int islot)
1181 +#endif
1183 GrSlotState * pslot = GetSlotAt(islot);
1184 Assert(pslot->IsLineBreak(chwLB));
1185 @@ -1769,7 +1778,7 @@
1186 @param fBackingUp - this chunk results in the stream position moving backwards,
1187 so clear anything we're backing over
1188 ----------------------------------------------------------------------------------------------*/
1189 -void GrSlotStream::MapInputChunk(int islotInputMin, int islotOutputMin, int islotInputLim,
1190 +void GrSlotStream::MapInputChunk(int islotInputMin, int islotOutputMin, int /*islotInputLim*/,
1191 bool fSkipChunkStart, bool fBackingUp)
1193 Assert(AssertValid());
1194 @@ -1828,7 +1837,7 @@
1195 @param fBackingUp - this chunk results in the stream position moving backwards,
1196 so clear anything we're backing over
1197 ----------------------------------------------------------------------------------------------*/
1198 -void GrSlotStream::MapOutputChunk(int islotOutputMin, int islotInputMin, int islotOutputLim,
1199 +void GrSlotStream::MapOutputChunk(int islotOutputMin, int islotInputMin, int /*islotOutputLim*/,
1200 bool fSkipChunkStart, int cslotReprocess, bool fBackingUp)
1202 Assert(AssertValid());
1203 @@ -1863,7 +1872,7 @@
1204 Ensure that the chunk maps for a pair of streams match properly. The recipient is
1205 the input stream.
1206 ----------------------------------------------------------------------------------------------*/
1207 -void GrSlotStream::AssertChunkMapsValid(GrSlotStream * psstrmOut)
1208 +void GrSlotStream::AssertChunkMapsValid(GrSlotStream * /*psstrmOut*/)
1210 #ifdef _DEBUG
1211 GrSlotStream * psstrmIn = this;
1212 @@ -1915,7 +1924,7 @@
1213 Ensure that corresponding items in the streams of a positioning pass have matching
1214 stream indices. The recipient is the output stream.
1215 ----------------------------------------------------------------------------------------------*/
1216 -void GrSlotStream::AssertStreamIndicesValid(GrSlotStream * psstrmIn)
1217 +void GrSlotStream::AssertStreamIndicesValid(GrSlotStream * /*psstrmIn*/)
1219 #ifdef _DEBUG
1220 if (!GotIndexOffset())
1221 @@ -1939,7 +1948,7 @@
1222 in the output stream. (Currently the compiler ensures this by making it an error
1223 to write rules that don't do this.)
1224 ----------------------------------------------------------------------------------------------*/
1225 -void GrSlotStream::AssertAttachmentsInOutput(int islotMin, int islotLim)
1226 +void GrSlotStream::AssertAttachmentsInOutput(int /*islotMin*/, int /*islotLim*/)
1228 #ifdef _DEBUG
1229 for (int islot = islotMin; islot < islotLim; islot++)
1230 @@ -2007,7 +2016,7 @@
1231 Record the number of slots in the stream that are previous to the official start of the
1232 segment.
1233 ----------------------------------------------------------------------------------------------*/
1234 -void GrSlotStream::CalcIndexOffset(GrTableManager * ptman)
1235 +void GrSlotStream::CalcIndexOffset(GrTableManager * /*ptman*/)
1237 if (GotIndexOffset())
1238 return; // already figured it
1239 @@ -2203,6 +2212,21 @@
1242 /*----------------------------------------------------------------------------------------------
1243 + In the middle of running a pass, return the given slot to use in processing.
1244 + Read it from the reprocess buffer if appropriate, or for slots previous to the current
1245 + position, read from the output stream (psstrmNext).
1247 + psstrmNext may be NULL when processing is complete, therefore we only have one stream to
1248 + deal with.
1249 +----------------------------------------------------------------------------------------------*/
1250 +GrSlotState * GrSlotStream::MidPassSlotAt(int islot, GrSlotStream * psstrmNext)
1252 + int islotInput = islot - ReadPosForNextGet() + 1; // +1 because RuleInputSlot takes 0 to mean the previously read slot
1253 + GrSlotState * pslot = RuleInputSlot(islotInput, psstrmNext);
1254 + return pslot;
1257 +/*----------------------------------------------------------------------------------------------
1258 Return the "current" input item from the rule's perspective, ie, the last slot read.
1259 So dislotOffset = 0 means not the slot at the read position but one slot earlier.
1261 @@ -2214,7 +2238,6 @@
1262 @param fNullOkay - true if it's okay to return NULL in the situation where we're asking
1263 for something before the beginning of the stream
1264 ----------------------------------------------------------------------------------------------*/
1266 GrSlotState * GrSlotStream::RuleInputSlot(int dislotOffset, GrSlotStream * psstrmOutput,
1267 bool fNullOkay)
1269 @@ -2244,8 +2267,10 @@
1271 if (cslotOffsetBack >= cslotPostReproc + cslotValidReproc)
1273 - // Read from the output stream.
1274 - int dislotTmp = dislotOffset - 1 + cslotPostReproc + cslotValidReproc;
1275 + // Read from the output stream. (Remember that PeekBack works relative to
1276 + // the rule-start write position, not the current write position.)
1277 + int dislotTmp = dislotOffset - 1 + cslotPostReproc
1278 + + cslotValidReproc - SlotsToReprocess();
1279 Assert(dislotTmp < 0);
1280 return psstrmOutput->PeekBack(dislotTmp);
1282 @@ -2253,7 +2278,7 @@
1284 if (m_islotReprocPos > -1)
1286 - // Current read pos is inside reprocess buffer.
1287 + // Current read pos could be inside reprocess buffer.
1288 Assert(cslotPostReproc == 0);
1289 int islotStartReadReprocBuf = m_vpslotReproc.size() - cslotValidReproc;
1290 Assert(islotStartReadReprocBuf >= 0);
1291 @@ -2342,9 +2367,10 @@
1292 else if (pslotAfter)
1293 pslot->Associate(pslotAfter);
1294 else
1296 // Weird, but can happen with an empty segment.
1297 Warn("No assocations");
1300 // Assert(pslot->m_vpslotAssoc.Size() > 0);
1301 pslot->m_fNeutralAssocs = true;
1303 --- misc/silgraphite-2.3.1/engine/src/segment/GrSlotStream.h Thu Jan 22 00:36:42 2009
1304 +++ misc/build/silgraphite-2.3.1/engine/src/segment/GrSlotStream.h Sat Aug 22 19:36:34 2009
1305 @@ -107,7 +107,7 @@
1306 ReleaseSlots(0, m_vpslot.size());
1309 - void ReleaseSlots(int islotMin, int islotLim)
1310 + void ReleaseSlots(int /*islotMin*/, int /*islotLim*/)
1312 // A slot stream is responsible for deleting the slot states that it created,
1313 // that is, the ones whose modified tag equals this stream's pass index.
1314 @@ -182,6 +182,7 @@
1315 return Peek(islot - ReadPosForNextGet());
1318 + // Return the functional read position, taking into account the reprocess buffer.
1319 int ReadPosForNextGet()
1321 return ReadPos() - SlotsToReprocess();
1322 @@ -260,12 +261,16 @@
1324 void MarkFullyWritten();
1326 +#ifdef NDEBUG
1327 + void SetSegMin(int islot, bool /*fAdjusting*/ = false)
1328 +#else
1329 void SetSegMin(int islot, bool fAdjusting = false)
1330 +#endif
1332 Assert(fAdjusting || m_islotSegMin == -1 || m_islotSegMin == islot);
1333 m_islotSegMin = islot;
1335 - void SetSegMinToWritePos(bool fMod = true)
1336 + void SetSegMinToWritePos(bool /*fMod*/ = true)
1338 if (m_islotSegMin == -1)
1339 m_islotSegMin = m_islotWritePos;
1340 @@ -456,6 +461,7 @@
1344 + GrSlotState * MidPassSlotAt(int islot, GrSlotStream * psstrmNext = NULL);
1345 GrSlotState * RuleInputSlot(int dislot = 0, GrSlotStream * psstrmOut = NULL,
1346 bool fNullOkay = false);
1347 GrSlotState * RuleOutputSlot(int dislot = 0);
1348 --- misc/silgraphite-2.3.1/engine/src/segment/GrTableManager.cpp Wed Jan 28 04:01:29 2009
1349 +++ misc/build/silgraphite-2.3.1/engine/src/segment/GrTableManager.cpp Sat Aug 22 19:36:34 2009
1350 @@ -25,8 +25,8 @@
1351 DEFINE_THIS_FILE
1352 #ifndef _WIN32
1353 #include <stdlib.h>
1354 -#include <math.h>
1355 #endif
1356 +#include <math.h>
1358 //:>********************************************************************************************
1359 //:> Forward declarations
1360 @@ -572,7 +572,7 @@
1361 else
1363 Assert(!m_engst.m_fInsertedLB);
1364 - Assert(islotUnderBreak == -1 || m_engst.m_fFinalLB);
1365 + //Assert(islotUnderBreak == -1 || m_engst.m_fFinalLB); -- no, ExtendGlyphIDOutput clearly sets islotUnderBreak regardless
1367 int islotTmp = OutputStream(m_cpass - 1)->WritePos();
1368 GrSlotState * pslotTmp;
1369 @@ -931,7 +931,7 @@
1370 @param plbFound - kind of line-break created
1371 ----------------------------------------------------------------------------------------------*/
1372 bool GrTableManager::Backtrack(int * pislotPrevBreak,
1373 - LineBrk * plbMin, LineBrk lbMax, TrWsHandling twsh, bool fMoreText,
1374 + LineBrk * plbMin, LineBrk lbMax, TrWsHandling twsh, bool /*fMoreText*/,
1375 int ichwCallerBtLim, bool fEndLine,
1376 LineBrk * plbFound)
1378 @@ -1343,7 +1343,7 @@
1379 Calculate the associations, and record the output slots in the segment.
1380 ----------------------------------------------------------------------------------------------*/
1381 void GrTableManager::RecordAssocsAndOutput(Font * pfont,
1382 - Segment * pseg, bool fWidthIsCharCount,
1383 + Segment * pseg, bool /*fWidthIsCharCount*/,
1384 TrWsHandling twsh, bool fParaRtl, int nDirDepth)
1386 int cchwUnderlying = pseg->stopCharacter() - pseg->startCharacter();
1387 @@ -1362,7 +1362,7 @@
1388 #endif // OLD_TEST_STUFF
1390 // Make sure the final positions are set for every glyph.
1391 - CalcPositionsUpTo(m_cpass-1, reinterpret_cast<GrSlotState *>(NULL),
1392 + CalcPositionsUpTo(m_cpass-1, reinterpret_cast<GrSlotState *>(NULL), false,
1393 &xsTotalWidth, &xsVisWidth);
1394 pseg->SetWidths(xsVisWidth, xsTotalWidth);
1396 @@ -1377,7 +1377,7 @@
1397 Calculate the underlying-to-surface associations and ligature mappings.
1398 Assumes the arrays have been properly initialized.
1399 ----------------------------------------------------------------------------------------------*/
1400 -void GrTableManager::CalculateAssociations(Segment * pseg, int csloutSurface)
1401 +void GrTableManager::CalculateAssociations(Segment * pseg, int /*csloutSurface*/)
1403 GrSlotStream * psstrmFinal = OutputStream(m_cpass-1);
1405 @@ -2350,18 +2350,20 @@
1406 final pass, but it could be another if positions are
1407 requested by the rules themselves
1408 @param pslotLast - last slot that needs to be positioned, or NULL
1409 + @param fMidPass - calculating the position of some slot in the middle of the pass
1410 @param pxsWidth - return the total width used so far
1411 @param psxVisibleWidth - return the visible width so far
1413 MOVE to EngineState
1414 ----------------------------------------------------------------------------------------------*/
1415 -void GrTableManager::CalcPositionsUpTo(int ipass, GrSlotState * pslotLast,
1416 +void GrTableManager::CalcPositionsUpTo(int ipass, GrSlotState * pslotLast, bool fMidPass,
1417 float * pxsWidth, float * pxsVisibleWidth)
1419 Assert(ipass >= m_ipassPos1 - 1);
1421 int isstrm = ipass;
1422 GrSlotStream * psstrm = OutputStream(isstrm);
1423 + GrSlotStream * psstrmNext = (isstrm >= m_cpass - 1) ? NULL : OutputStream(isstrm + 1);
1424 Assert(psstrm->GotIndexOffset());
1425 if (psstrm->WritePos() <= psstrm->IndexOffset())
1427 @@ -2399,7 +2401,9 @@
1428 // to be later in the stream than the last actual slot passed in.
1429 if (!psstrm->HasSlotAtPosPassIndex(pslotLast->AttachRootPosPassIndex()))
1430 return;
1431 - GrSlotState * pslotLastBase = pslotLast->Base(psstrm);
1432 + GrSlotState * pslotLastBase = (fMidPass && pslotLast->PosPassIndex() < psstrm->WritePos())
1433 + ? pslotLast->Base(psstrmNext)
1434 + : pslotLast->Base(psstrm);
1436 if (ipass == m_cpass - 1 && m_engst.m_islotPosNext > -1)
1438 @@ -2428,6 +2432,7 @@
1441 std::vector<GrSlotState *> vpslotAttached;
1442 + std::vector<GrSlotStream *> vpsstrmAttached;
1444 bool fRtl = RightToLeft();
1446 @@ -2435,13 +2440,24 @@
1448 Assert(islot < psstrm->SlotsPresent());
1450 - pslot = (isstrm == ipass) ? psstrm->SlotAt(islot) : psstrm->OutputSlotAt(islot);
1451 + GrSlotStream * psstrmThis = psstrm;
1452 + if (fMidPass && islot < psstrm->WritePos())
1454 + pslot = psstrm->MidPassSlotAt(islot, psstrmNext);
1455 + psstrmThis = psstrmNext;
1457 + else
1459 + //pslot = (isstrm == ipass) ? psstrm->SlotAt(islot) : psstrm->OutputSlotAt(islot);
1460 + pslot = psstrm->SlotAt(islot);
1463 if (!pslot->IsBase())
1465 // This slot is attached to another; it will be positioned strictly
1466 // relative to that one. This happens in the loop below.
1467 vpslotAttached.push_back(pslot);
1468 + vpsstrmAttached.push_back(psstrmThis);
1470 else
1472 @@ -2455,7 +2471,7 @@
1475 // Make sure the metrics are the complete ones.
1476 - pslot->CalcCompositeMetrics(this, psstrm, kPosInfinity, true);
1477 + pslot->CalcCompositeMetrics(this, psstrm, psstrmNext, kPosInfinity, true);
1479 float xsInc = pslot->GlyphXOffset(psstrm, fakeItalicRatio);
1480 float ysInc = pslot->GlyphYOffset(psstrm);
1481 @@ -2514,8 +2530,9 @@
1483 for (size_t ipslot = 0; ipslot < vpslotAttached.size(); ipslot++)
1485 - GrSlotState * pslot = vpslotAttached[ipslot];
1486 - GrSlotState * pslotBase = pslot->Base(psstrm);
1487 + GrSlotState * pslotAtt = vpslotAttached[ipslot];
1488 + GrSlotStream * psstrmAtt = vpsstrmAttached[ipslot];
1489 + GrSlotState * pslotBase = pslotAtt->Base(psstrmAtt);
1490 if (pslotBase->XPosition() == kNegInfinity || pslotBase->YPosition() == kNegInfinity)
1492 Assert(false);
1493 @@ -2523,10 +2540,10 @@
1495 float xsCluster = pslotBase->XPosition() - pslotBase->GlyphXOffset(psstrm, fakeItalicRatio);
1496 float ysCluster = pslotBase->YPosition() - pslotBase->GlyphYOffset(psstrm);
1497 - float xsInc = pslot->GlyphXOffset(psstrm, fakeItalicRatio);
1498 - float ysInc = pslot->GlyphYOffset(psstrm);
1499 - pslot->SetXPos(xsCluster + xsInc);
1500 - pslot->SetYPos(ysCluster + ysInc);
1501 + float xsInc = pslotAtt->GlyphXOffset(psstrm, fakeItalicRatio);
1502 + float ysInc = pslotAtt->GlyphYOffset(psstrm);
1503 + pslotAtt->SetXPos(xsCluster + xsInc);
1504 + pslotAtt->SetYPos(ysCluster + ysInc);
1506 // My theory is that we don't need to adjust *pxsWidth here, because the width of
1507 // any non-base slots should be factored into the advance width of their cluster
1508 --- misc/silgraphite-2.3.1/engine/src/segment/GrTableManager.h Wed Jan 28 04:01:29 2009
1509 +++ misc/build/silgraphite-2.3.1/engine/src/segment/GrTableManager.h Sat Aug 22 19:36:35 2009
1510 @@ -442,7 +442,7 @@
1511 int LogToEmUnits(float xys);
1512 bool GPointToXY(gid16 chwGlyphID, int nGPoint, float * xs, float * ys);
1514 - void CalcPositionsUpTo(int ipass, GrSlotState * pslotLast,
1515 + void CalcPositionsUpTo(int ipass, GrSlotState * pslotLast, bool fMidPass,
1516 float * pxsWidth, float * pxsVisibleWidth);
1518 void InitPosCache()
1519 --- misc/silgraphite-2.3.1/engine/src/segment/Platform.cpp Thu Jan 22 00:36:42 2009
1520 +++ misc/build/silgraphite-2.3.1/engine/src/segment/Platform.cpp Sat Aug 22 19:36:35 2009
1521 @@ -103,7 +103,7 @@
1523 // assumes NULL terminated strings
1524 const utf16 *start = s;
1525 - for (; *s; ++s);
1526 + for (; *s; ++s) {};
1528 return s - start;
1530 --- misc/silgraphite-2.3.1/engine/src/segment/Segment.cpp Thu Aug 21 16:24:32 2008
1531 +++ misc/build/silgraphite-2.3.1/engine/src/segment/Segment.cpp Sat Aug 22 19:36:35 2009
1532 @@ -1178,7 +1178,7 @@
1533 part of the segment.
1534 ----------------------------------------------------------------------------------------------*/
1535 float Segment::getRangeWidth(int ichMin, int ichLim,
1536 - bool fStartLine, bool fEndLine, bool fSkipSpace)
1537 + bool /*fStartLine*/, bool /*fEndLine*/, bool fSkipSpace)
1539 if (m_dxsWidth < 0)
1541 @@ -1549,7 +1549,11 @@
1542 void Segment::SetUpOutputArrays(Font * pfont, GrTableManager * ptman,
1543 GrSlotStream * psstrmFinal,
1544 int cchwInThisSeg, int csloutSurface, gid16 chwLB,
1545 +#ifdef NDEBUG
1546 + TrWsHandling twsh, bool fParaRtl, int nDirDepth, bool /*fEmpty*/)
1547 +#else
1548 TrWsHandling twsh, bool fParaRtl, int nDirDepth, bool fEmpty)
1549 +#endif
1551 m_mFontEmUnits = EngineImpl()->GetFontEmUnits();
1553 @@ -1725,7 +1729,7 @@
1554 Set up the data structures that represent the actual rendered glyphs for the new segment.
1555 ----------------------------------------------------------------------------------------------*/
1556 void Segment::SetUpGlyphInfo(GrTableManager * ptman, GrSlotStream * psstrmFinal,
1557 - gid16 chwLB, int nDirDepth, int islotMin, int cslot)
1558 + gid16 chwLB, int /*nDirDepth*/, int islotMin, int cslot)
1560 //int paraDirLevel = (ptman->State()->ParaRightToLeft()) ? 1 : 0;
1562 @@ -1751,7 +1755,7 @@
1564 m_isloutGinf0 = -1;
1565 int iginf = 0;
1566 - for (int islot = islotMin; islot < cslot; islot++)
1567 + for (islot = islotMin; islot < cslot; islot++)
1569 GrSlotState * pslot = psstrmFinal->SlotAt(islot);
1571 @@ -2160,7 +2164,7 @@
1572 @param ichwUnder - character index relative to the official beginning of the segment
1573 @param islot - processed glyph it maps to
1574 ----------------------------------------------------------------------------------------------*/
1575 -void Segment::MarkSlotInPrevSeg(int ichwUnder, int islot)
1576 +void Segment::MarkSlotInPrevSeg(int ichwUnder, int /*islot*/)
1578 if (ichwUnder >= m_ichwAssocsMin)
1579 m_prgisloutBefore[ichwUnder - m_ichwAssocsMin] = kNegInfinity;
1580 @@ -2174,7 +2178,7 @@
1581 @param ichwUnder - character index relative to the official beginning of the segment
1582 @param islot - processed glyph it maps to
1583 ----------------------------------------------------------------------------------------------*/
1584 -void Segment::MarkSlotInNextSeg(int ichwUnder, int islot)
1585 +void Segment::MarkSlotInNextSeg(int ichwUnder, int /*islot*/)
1587 if (ichwUnder < m_ichwAssocsLim)
1588 m_prgisloutAfter[ichwUnder - m_ichwAssocsMin] = kPosInfinity;
1589 @@ -2351,7 +2355,7 @@
1590 @param pfAfter - return true if they clicked on trailing side; possibly NULL
1591 ----------------------------------------------------------------------------------------------*/
1592 int Segment::LogicalSurfaceToUnderlying(int islout, float xsOffset, float ysClick,
1593 - float dxsGlyphWidth, float dysGlyphHeight, bool * pfAfter)
1594 + float dxsGlyphWidth, float /*dysGlyphHeight*/, bool * pfAfter)
1596 Assert(islout >= 0);
1597 Assert(islout < m_cslout);
1598 @@ -2529,31 +2533,31 @@
1599 else if (fBefore)
1601 int isloutRet;
1602 - int ichw = ichwSegOffset;
1603 + int ichwTemp = ichwSegOffset;
1604 // If no association has been made, loop forward to the next slot
1605 // we are before. As a last resort, answer kPosInfinity, meaning we
1606 // aren't before anything.
1609 - isloutRet = m_prgisloutBefore[ichw - m_ichwAssocsMin];
1610 - do { ++ichw; }
1611 - while (!GrCharStream::AtUnicodeCharBoundary(m_pgts, ichw));
1612 - } while (isloutRet == kPosInfinity && ichw < m_ichwAssocsLim);
1613 + isloutRet = m_prgisloutBefore[ichwTemp - m_ichwAssocsMin];
1614 + do { ++ichwTemp; }
1615 + while (!GrCharStream::AtUnicodeCharBoundary(m_pgts, ichwTemp));
1616 + } while (isloutRet == kPosInfinity && ichwTemp < m_ichwAssocsLim);
1617 return isloutRet;
1619 else
1621 int isloutRet;
1622 - int ichw = ichwSegOffset;
1623 + int ichwTemp = ichwSegOffset;
1624 // If no association has been made, loop backward to the previous slot
1625 // we are after. As a last resort, answer kNegInfinity, meaning we
1626 // aren't after anything.
1629 - isloutRet = m_prgisloutAfter[ichw - m_ichwAssocsMin];
1630 - do { --ichw; }
1631 - while (!GrCharStream::AtUnicodeCharBoundary(m_pgts, ichw));
1632 - } while (isloutRet == kNegInfinity && ichw >= 0);
1633 + isloutRet = m_prgisloutAfter[ichwTemp - m_ichwAssocsMin];
1634 + do { --ichwTemp; }
1635 + while (!GrCharStream::AtUnicodeCharBoundary(m_pgts, ichwTemp));
1636 + } while (isloutRet == kNegInfinity && ichwTemp >= 0);
1637 return isloutRet;
1639 Assert(false); // should never reach here
1640 @@ -2748,7 +2752,11 @@
1641 that root glyph as one of its roots.
1642 OBSOLETE
1643 ----------------------------------------------------------------------------------------------*/
1644 +#ifdef _DEBUG
1645 void Segment::AssertValidClusters(GrSlotStream * psstrm)
1646 +#else
1647 +void Segment::AssertValidClusters(GrSlotStream * /*psstrm*/)
1648 +#endif
1650 #ifdef _DEBUG
1651 for (int islot = 0; islot < psstrm->WritePos(); islot++)
1652 --- misc/silgraphite-2.3.1/engine/src/segment/TransductionLog.cpp Wed Jan 28 04:01:29 2009
1653 +++ misc/build/silgraphite-2.3.1/engine/src/segment/TransductionLog.cpp Sat Aug 22 19:36:35 2009
1654 @@ -175,7 +175,7 @@
1655 Output a file showing a log of the transduction process and the resulting segment.
1656 ----------------------------------------------------------------------------------------------*/
1657 void GrTableManager::WriteXductnLog(std::ostream & strmOut,
1658 - GrCharStream * pchstrm, Segment * psegRet,
1659 + GrCharStream * pchstrm, Segment * /*psegRet*/,
1660 int cbPrevSegDat, byte * pbPrevSegDat)
1662 if (cbPrevSegDat == 0)
1663 @@ -416,8 +416,8 @@
1664 the raw (UTF-16 or UTF-8) chars for display. To do this we get the raw characters
1665 directly from the text source.
1666 ----------------------------------------------------------------------------------------------*/
1667 -void GrCharStream::GetLogDataRaw(GrTableManager * ptman, int cchl, int cchrBackup,
1668 - int cchrMaxRaw, int * prgchl,
1669 +void GrCharStream::GetLogDataRaw(GrTableManager * /*ptman*/, int cchl, int cchrBackup,
1670 + int /*cchrMaxRaw*/, int * prgchl,
1671 utf16 * prgchw2, utf16 * prgchw3, utf16 * prgchw4, utf16 * prgchw5, utf16 * prgchw6,
1672 int * prgcchr)
1674 @@ -441,7 +441,7 @@
1675 case kutf8:
1676 prgchsRunText8 = new utf8[cchrRange];
1677 m_pgts->fetch(ichrMin, cchrRange, prgchsRunText8);
1678 - for (int ichr = 0; ichr < cchrRange; ichr++)
1679 + for (ichr = 0; ichr < cchrRange; ichr++)
1680 prgchwRunText[ichr] = (utf16)prgchsRunText8[ichr]; // zero-extend into UTF-16 buffer
1681 break;
1682 case kutf16:
1683 @@ -634,7 +634,7 @@
1684 m_pzpst->LogRulesFiredAndFailed(strmOut, psstrmIn);
1687 -void PassState::LogRulesFiredAndFailed(std::ostream & strmOut, GrSlotStream * psstrmIn)
1688 +void PassState::LogRulesFiredAndFailed(std::ostream & strmOut, GrSlotStream * /*psstrmIn*/)
1691 strmOut << "PASS " << m_ipass << "\n\n" << "Rules matched: ";
1692 @@ -1193,7 +1193,7 @@
1693 if (fAnyPseudos)
1695 strmOut << "Actual glyphs: ";
1696 - for (int islout = 0; islout < m_cslout; islout++)
1697 + for (islout = 0; islout < m_cslout; islout++)
1699 GrSlotOutput * psloutTmp = m_prgslout + islout;
1700 if (psloutTmp->GlyphID() != psloutTmp->ActualGlyphForOutput(ptman))
1701 @@ -1319,7 +1319,7 @@
1702 Write out the header lines for the slot contents.
1703 ----------------------------------------------------------------------------------------------*/
1704 void GrTableManager::LogSlotHeader(std::ostream & strmOut, int islotLim,
1705 - int cspPerSlot, int cspLeading, int islotMin)
1706 + int /*cspPerSlot*/, int cspLeading, int islotMin)
1708 islotLim = min(islotLim, MAX_SLOTS);
1710 @@ -1721,7 +1721,7 @@
1712 case kslatAttAtX: // always do these in pairs
1713 case kslatAttAtY:
1714 - if (m_mAttachAtX != (pslotPrev ? pslotPrev->m_mAttachAtX : kNotYetSet) ||
1715 + if (m_mAttachAtX != (pslotPrev ? pslotPrev->m_mAttachAtX : static_cast<short>(kNotYetSet)) ||
1716 m_mAttachAtY != (pslotPrev ? pslotPrev->m_mAttachAtY : 0))
1718 ptman->LogInTable(strmOut,
1719 @@ -1730,7 +1730,7 @@
1721 break;
1722 case kslatAttAtGpt:
1723 - if (m_nAttachAtGpoint != (pslotPrev ? pslotPrev->m_nAttachAtGpoint : kNotYetSet))
1724 + if (m_nAttachAtGpoint != (pslotPrev ? pslotPrev->m_nAttachAtGpoint : static_cast<short>(kNotYetSet)))
1726 ptman->LogInTable(strmOut,
1727 ((m_nAttachAtGpoint == kGpointZero) ? 0 : m_nAttachAtGpoint));
1728 @@ -1750,7 +1750,7 @@
1730 case kslatAttWithX: // always do these in pairs
1731 case kslatAttWithY:
1732 - if (m_mAttachWithX != (pslotPrev ? pslotPrev->m_mAttachWithX : kNotYetSet) ||
1733 + if (m_mAttachWithX != (pslotPrev ? pslotPrev->m_mAttachWithX : static_cast<short>(kNotYetSet)) ||
1734 m_mAttachWithY != (pslotPrev ? pslotPrev->m_mAttachWithY : 0))
1736 ptman->LogInTable(strmOut,
1737 @@ -1759,7 +1759,7 @@
1739 break;
1740 case kslatAttWithGpt:
1741 - if (m_nAttachWithGpoint != (pslotPrev ? pslotPrev->m_nAttachWithGpoint : kNotYetSet))
1742 + if (m_nAttachWithGpoint != (pslotPrev ? pslotPrev->m_nAttachWithGpoint : static_cast<short>(kNotYetSet)))
1744 ptman->LogInTable(strmOut,
1745 ((m_nAttachWithGpoint == kGpointZero) ? 0 : m_nAttachWithGpoint));
1746 @@ -1786,14 +1786,14 @@
1747 break;
1749 case kslatBreak:
1750 - if (m_lb != (pslotPrev ? pslotPrev->m_lb : kNotYetSet8))
1751 + if (m_lb != (pslotPrev ? pslotPrev->m_lb : static_cast<sdata8>(kNotYetSet8)))
1753 ptman->LogBreakWeightInTable(strmOut, m_lb);
1754 return;
1756 break;
1757 case kslatDir:
1758 - if (m_dirc != (pslotPrev ? pslotPrev->m_dirc : kNotYetSet8))
1759 + if (m_dirc != (pslotPrev ? pslotPrev->m_dirc : static_cast<sdata8>(kNotYetSet8)))
1761 ptman->LogDirCodeInTable(strmOut, m_dirc);
1762 return;
1763 --- misc/silgraphite-2.3.1/engine/test/ProfileHarness/GrUtfTextSrc.cpp Thu Jan 22 00:36:42 2009
1764 +++ misc/build/silgraphite-2.3.1/engine/test/ProfileHarness/GrUtfTextSrc.cpp Sat Aug 22 19:36:35 2009
1765 @@ -210,12 +210,12 @@
1769 -bool GrUtfTextSrc::getRightToLeft(gr::toffset ich)
1770 +bool GrUtfTextSrc::getRightToLeft(gr::toffset /*ich*/)
1772 return mRtl; // assumes src only contains one direction
1775 -unsigned int GrUtfTextSrc::getDirectionDepth(gr::toffset ich)
1776 +unsigned int GrUtfTextSrc::getDirectionDepth(gr::toffset /*ich*/)
1778 return (mRtl) ? 1 : 0; // TBD
1780 @@ -254,7 +254,7 @@
1781 return range;
1784 -size_t GrUtfTextSrc::getFontFeatures(gr::toffset ich, gr::FeatureSetting * prgfset)
1785 +size_t GrUtfTextSrc::getFontFeatures(gr::toffset /*ich*/, gr::FeatureSetting * /*prgfset*/)
1787 return 0;
1789 @@ -277,14 +277,14 @@
1791 // these should be called I hope
1792 float
1793 -GrUtfTextSrc::getFontSize(gr::toffset ich)
1794 +GrUtfTextSrc::getFontSize(gr::toffset /*ich*/)
1796 assert(mFont);
1797 return mPointSize;
1800 bool
1801 -GrUtfTextSrc::getBold(gr::toffset ich)
1802 +GrUtfTextSrc::getBold(gr::toffset /*ich*/)
1804 assert(mFont);
1805 // NS_ASSERTION(false, "unexpected call to getBold");
1806 @@ -293,7 +293,7 @@
1809 bool
1810 -GrUtfTextSrc::getItalic(gr::toffset ich)
1811 +GrUtfTextSrc::getItalic(gr::toffset /*ich*/)
1813 assert(mFont);
1814 //NS_ASSERTION(false, "unexpected call to getItalic");
1815 @@ -301,7 +301,7 @@
1816 return mFont->italic();
1819 -gr::isocode GrUtfTextSrc::getLanguage(gr::toffset ich)
1820 +gr::isocode GrUtfTextSrc::getLanguage(gr::toffset /*ich*/)
1822 gr::isocode unknown;
1823 std::fill_n(unknown.rgch, 4, '\0');
1824 --- misc/silgraphite-2.3.1/engine/test/ProfileHarness/GrUtfTextSrc.h Thu Jan 22 00:36:42 2009
1825 +++ misc/build/silgraphite-2.3.1/engine/test/ProfileHarness/GrUtfTextSrc.h Sat Aug 22 19:36:35 2009
1826 @@ -79,7 +79,7 @@
1827 virtual size_t fetch(gr::toffset ichMin, size_t cch, gr::utf32 * prgchBuffer);
1828 virtual size_t fetch(gr::toffset ichMin, size_t cch, gr::utf16 * prgchwBuffer);
1829 virtual size_t fetch(gr::toffset ichMin, size_t cch, gr::utf8 * prgchsBuffer);
1830 - virtual gr::GrResult getFaceName(int ich, unsigned int cchMax,
1831 + virtual gr::GrResult getFaceName(int /*ich*/, unsigned int /*cchMax*/,
1832 gr::utf16 * prgchFaceName, unsigned int * pcchLen)
1834 prgchFaceName[0] = 0;
1835 @@ -92,12 +92,12 @@
1836 virtual bool getItalic(gr::toffset ich);
1837 virtual bool getRightToLeft(gr::toffset ich);
1838 virtual unsigned int getDirectionDepth(gr::toffset ich);
1839 - virtual float getVerticalOffset(gr::toffset ich) { return 0;};
1840 + virtual float getVerticalOffset(gr::toffset /*ich*/) { return 0;};
1841 virtual gr::isocode getLanguage(gr::toffset ich);
1843 virtual std::pair<gr::toffset, gr::toffset> propertyRange(gr::toffset ich);
1844 virtual size_t getFontFeatures(gr::toffset ich, gr::FeatureSetting * prgfset);
1845 - virtual bool sameSegment(gr::toffset ich1, gr::toffset ich2) { return true; };
1846 + virtual bool sameSegment(gr::toffset /*ich1*/, gr::toffset /*ich2*/) { return true; };
1848 protected:
1849 bool checkBuffer8();
1850 @@ -129,11 +129,11 @@
1851 virtual void getColors(gr::toffset ich, int * pclrFore, int * pclrBack);
1853 // Shouldn't be here!
1854 - virtual gr::GrResult Fetch(int ichMin, int ichLim, gr::utf16 * prgchBuf) { return gr::kresNotImpl; };
1855 - virtual gr::GrResult get_Length(int * pcch) { return gr::kresNotImpl; };
1856 - virtual gr::GrResult GetFontVariations(int ich,
1857 - wchar_t * prgchFontVar, int ichMax, int * pich,
1858 - int * pichMin, int * pichLim) { return gr::kresNotImpl; };
1859 + virtual gr::GrResult Fetch(int /*ichMin*/, int /*ichLim*/, gr::utf16 * /*prgchBuf*/) { return gr::kresNotImpl; };
1860 + virtual gr::GrResult get_Length(int * /*pcch*/) { return gr::kresNotImpl; };
1861 + virtual gr::GrResult GetFontVariations(int /*ich*/,
1862 + wchar_t * /*prgchFontVar*/, int /*ichMax*/, int * /*pich*/,
1863 + int * /*pichMin*/, int * /*pichLim*/) { return gr::kresNotImpl; };
1867 --- misc/silgraphite-2.3.1/engine/test/ProfileHarness/ProfileHarness.cpp Thu Jan 22 00:36:42 2009
1868 +++ misc/build/silgraphite-2.3.1/engine/test/ProfileHarness/ProfileHarness.cpp Sat Aug 22 19:36:35 2009
1869 @@ -39,14 +39,14 @@
1870 typedef std::pair< gr::GlyphIterator, gr::GlyphIterator > GlyphRange;
1872 #ifndef HAVE_STRTOF
1873 -float strtof(char * text, char ** ignore)
1874 +float strtof(char * text, char ** /*ignore*/)
1876 return static_cast<float>(atof(text));
1878 #endif
1880 #ifndef HAVE_STRTOL
1881 -long strtol(char * text, char ** ignore)
1882 +long strtol(char * text, char ** /*ignore*/)
1884 return atol(text);
1886 --- misc/silgraphite-2.3.1/engine/test/RegressionTest/GrJustifier.cpp Thu Jan 22 00:36:42 2009
1887 +++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/GrJustifier.cpp Sat Aug 22 19:36:35 2009
1888 @@ -327,7 +327,7 @@
1889 &dxStretchAchieved);
1890 for (int iiiGlyph = 0; iiiGlyph < cStretchable; iiiGlyph++)
1892 - int iiGlyph = viiGlyphsRem[iiiGlyph];
1893 + iiGlyph = viiGlyphsRem[iiiGlyph];
1894 vdxStretchLeft[iiGlyph] = vdxStretchRem[iiiGlyph];
1895 vdxWidth[iiGlyph] = vdxWidthRem[iiiGlyph];
1897 --- misc/silgraphite-2.3.1/engine/test/RegressionTest/RegressionTest.cpp Thu Jan 22 00:36:42 2009
1898 +++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/RegressionTest.cpp Sat Aug 22 19:36:35 2009
1899 @@ -675,7 +675,7 @@
1900 OutputErrorAux(ptcase, strErr, i, true, valueFound, valueExpected);
1903 -void OutputErrorAux(TestCase * ptcase, std::string strErr, int i,
1904 +void OutputErrorAux(TestCase * /*ptcase*/, std::string strErr, int i,
1905 bool showValues, int valueFound, int valueExpected)
1907 // if (g_debugMode)
1908 --- misc/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.cpp Thu Jan 22 00:36:42 2009
1909 +++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.cpp Sat Aug 22 19:36:36 2009
1910 @@ -70,7 +70,7 @@
1911 /*----------------------------------------------------------------------------------------------
1912 Return true if the text uses a right-to-left writing system.
1913 ----------------------------------------------------------------------------------------------*/
1914 -bool SimpleTextSrc::getRightToLeft(toffset ich)
1915 +bool SimpleTextSrc::getRightToLeft(toffset /*ich*/)
1917 return false;
1919 @@ -78,7 +78,7 @@
1920 /*----------------------------------------------------------------------------------------------
1921 Return the depth of embedding of the writing system.
1922 ----------------------------------------------------------------------------------------------*/
1923 -unsigned int SimpleTextSrc::getDirectionDepth(toffset ich)
1924 +unsigned int SimpleTextSrc::getDirectionDepth(toffset /*ich*/)
1926 return 0;
1928 @@ -87,7 +87,7 @@
1929 Return the vertical offset of the text. This simple implementation provides no
1930 vertical offset.
1931 ----------------------------------------------------------------------------------------------*/
1932 -float SimpleTextSrc::getVerticalOffset(toffset ich)
1933 +float SimpleTextSrc::getVerticalOffset(toffset /*ich*/)
1935 return 0;
1937 --- misc/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.h Thu Jan 22 00:36:42 2009
1938 +++ misc/build/silgraphite-2.3.1/engine/test/RegressionTest/SimpleTextSrc.h Sat Aug 22 19:36:36 2009
1939 @@ -59,12 +59,12 @@
1941 return m_cchLength;
1943 - virtual size_t fetch(toffset ichMin, size_t cch, utf32 * prgchBuffer)
1944 + virtual size_t fetch(toffset /*ichMin*/, size_t /*cch*/, utf32 * /*prgchBuffer*/)
1946 throw;
1948 virtual size_t fetch(toffset ichMin, size_t cch, gr::utf16 * prgchwBuffer);
1949 - virtual size_t fetch(toffset ichMin, size_t cch, utf8 * prgchsBuffer)
1950 + virtual size_t fetch(toffset /*ichMin*/, size_t /*cch*/, utf8 * /*prgchsBuffer*/)
1952 throw;
1954 @@ -73,14 +73,14 @@
1955 virtual unsigned int getDirectionDepth(toffset ich);
1956 virtual float getVerticalOffset(toffset ich);
1958 - virtual isocode getLanguage(toffset ich)
1959 + virtual isocode getLanguage(toffset /*ich*/)
1961 isocode ret;
1962 ret.rgch[0] = 'e'; ret.rgch[1] = 'n'; ret.rgch[2] = 0; ret.rgch[3] = 0;
1963 return ret;
1966 - virtual std::pair<toffset, toffset> propertyRange(toffset ich)
1967 + virtual std::pair<toffset, toffset> propertyRange(toffset /*ich*/)
1969 std::pair<toffset, toffset> pairRet;
1970 pairRet.first = 0;
1971 @@ -88,16 +88,16 @@
1972 return pairRet;
1975 - virtual size_t getFontFeatures(toffset ich, FeatureSetting * prgfset)
1976 + virtual size_t getFontFeatures(toffset /*ich*/, FeatureSetting * /*prgfset*/)
1978 return 0; // no features in this simple implementation
1980 - virtual bool sameSegment(toffset ich1, toffset ich2)
1981 + virtual bool sameSegment(toffset /*ich1*/, toffset /*ich2*/)
1983 return true;
1986 - virtual void getColors(toffset ich, int * pclrFore, int * pclrBack)
1987 + virtual void getColors(toffset /*ich*/, int * pclrFore, int * pclrBack)
1989 *pclrFore = kclrBlack;
1990 *pclrBack = kclrTransparent;
1991 --- misc/silgraphite-2.3.1/wrappers/win32/WinFont.cpp Thu Jan 29 10:33:19 2009
1992 +++ misc/build/silgraphite-2.3.1/wrappers/win32/WinFont.cpp Sat Aug 22 19:36:36 2009
1993 @@ -767,7 +767,7 @@
1994 ----------------------------------------------------------------------------------------------*/
1995 void WinFont::FontHandleCache::DeleteFont(HFONT hfont)
1997 - if (!hfont || !m_bValid)
1998 + if (!hfont || !m_bValid || m_hmlffcv.size() == 0)
1999 return;
2001 // find the font in the hash map
2002 --- misc/silgraphite-2.3.1/wrappers/win32/WinFont.h Thu Jan 29 10:33:19 2009
2003 +++ misc/build/silgraphite-2.3.1/wrappers/win32/WinFont.h Sat Aug 22 19:36:36 2009
2004 @@ -27,6 +27,10 @@
2005 #include "GrClient.h"
2006 #include "Font.h"
2008 +#ifdef _STLPORT_VERSION
2009 +namespace stdext = _STLP_STD;
2010 +#endif
2012 namespace gr