From: <sil...@li...> - 2005-05-27 10:21:23
|
Update of /cvsroot/silgraphite/silgraphite/src/GrCompiler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15353/src/GrCompiler Modified Files: ErrorCheckClasses.cpp ParserTreeWalker.cpp Log Message: Get GrCompiler working on Linux Index: ErrorCheckClasses.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrCompiler/ErrorCheckClasses.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ErrorCheckClasses.cpp 16 Apr 2004 22:26:49 -0000 1.9 +++ ErrorCheckClasses.cpp 27 May 2005 10:21:14 -0000 1.10 @@ -1203,32 +1203,46 @@ int nUnicodeStd; HRESULT hr; - if (fGotCharPropEng) - { - if (psym->LastFieldIs("breakweight")) - { - hr = qchprpeng->get_IsSeparator(nUnicode, &fIsSep); - nUnicodeStd = (fIsSep) ? klbWordBreak : nValue; - } - else if (psym->LastFieldIs("directionality")) - { - LgBidiCategory bidi; - hr = qchprpeng->get_BidiCategory(nUnicode, &bidi); - if (!FAILED(hr)) - nUnicodeStd = ConvertBidiCode(bidi, nUnicode); - else if (!Bidi()) - { - // Don't really care about the failure, since there's no Bidi pass. - hr = S_OK; - nUnicodeStd = kdircNeutral; - } - } - else - break; // ...out of the character loop; this is not an attribute + if (psym->LastFieldIs("breakweight")) + { + if (fGotCharPropEng) + { + hr = qchprpeng->get_IsSeparator(nUnicode, &fIsSep); + } + else + { + if (nUnicode == 0x0020 || nUnicode == 0x00A0 || nUnicode == 0x1680 || nUnicode == 0x180E + || (nUnicode >= 0x2000 && nUnicode <= 0x200A) || nUnicode == 0x202F + || nUnicode == 0x205F || nUnicode == 0x3000) + fIsSep = 1; + else + fIsSep = 0; + hr = S_OK; + } + nUnicodeStd = (fIsSep) ? klbWordBreak : nValue; + } + else if (psym->LastFieldIs("directionality")) + { +// g_errorList.AddWarning(NULL, "Bidi = ", Bidi() ? "1" : "0"); + if (!Bidi()) + { + // Don't really care about the failure, since there's no Bidi pass. + hr = S_OK; + nUnicodeStd = kdircNeutral; + } + else if (fGotCharPropEng) + { + LgBidiCategory bidi; + hr = qchprpeng->get_BidiCategory(nUnicode, &bidi); + if (!FAILED(hr)) + nUnicodeStd = ConvertBidiCode(bidi, nUnicode); + } + else + hr = E_FAIL; + } + else + break; // ...out of the character loop; this is not an attribute // it makes sense to read from the db - } - else - hr = E_FAIL; if (FAILED(hr)) { Index: ParserTreeWalker.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/GrCompiler/ParserTreeWalker.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- ParserTreeWalker.cpp 16 Apr 2004 22:26:50 -0000 1.10 +++ ParserTreeWalker.cpp 27 May 2005 10:21:14 -0000 1.11 @@ -189,9 +189,9 @@ case -1: cout << "can't fork\n"; exit(-1); case 0 : testexec = execlp("gdlpp","gdlpp","-V",staFileName.Chars(),tmpgdl,0); // this is the code the child runs - cout << "exec retval:" << testexec << ", errno:" << strerror(errno) << "(" << errno << ")\n"; - cout << "tmpfile " << tmpgdl << endl; - cout << "file " << staFileName.Chars() << endl; + cout << "// exec retval:" << testexec << ", errno:" << strerror(errno) << "(" << errno << ")\n"; + cout << "// tmpfile " << tmpgdl << endl; + cout << "// file " << staFileName.Chars() << endl; g_errorList.AddError(NULL, "Failed to run pre-processor gdlpp", "compiling ", |