aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/animator/SkDisplayXMLParser.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-03-18 14:29:44 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-03-18 14:29:44 +0000
commitc8ad63e5e42637c65c6b4e0adfacce55730b722d (patch)
treeb957a06fba8c5ab5da1f732905bc369da61999b2 /src/animator/SkDisplayXMLParser.cpp
parent2f834592b1da896ecc4549d9cb70c974c3412e0e (diff)
Initial GYP file for skia / gr. Builds SampleApp on Mac, Windows, Linux.
Review URL: http://codereview.appspot.com/4282056/ git-svn-id: http://skia.googlecode.com/svn/trunk@955 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/animator/SkDisplayXMLParser.cpp')
-rw-r--r--src/animator/SkDisplayXMLParser.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/animator/SkDisplayXMLParser.cpp b/src/animator/SkDisplayXMLParser.cpp
index d2775e8c42..2de80ca9f6 100644
--- a/src/animator/SkDisplayXMLParser.cpp
+++ b/src/animator/SkDisplayXMLParser.cpp
@@ -164,6 +164,14 @@ bool SkDisplayXMLParser::onAddAttributeLen(const char attrName[], const char att
return false;
}
+#if defined(SKIA_BUILD_FOR_WIN32)
+ #define SK_strcasecmp stricmp
+ #define SK_strncasecmp strnicmp
+#else
+ #define SK_strcasecmp strcasecmp
+ #define SK_strncasecmp strncasecmp
+#endif
+
bool SkDisplayXMLParser::onEndElement(const char elem[])
{
int parentIndex = fParents.count() - 1;
@@ -199,7 +207,7 @@ bool SkDisplayXMLParser::onEndElement(const char elem[])
fParents.remove(parentIndex);
}
fCurrDisplayable = NULL;
- if (fInInclude == false && strcasecmp(elem, "screenplay") == 0) {
+ if (fInInclude == false && SK_strcasecmp(elem, "screenplay") == 0) {
if (fMaker.fInMovie == false) {
fMaker.fEnableTime = fMaker.getAppTime();
#if defined SK_DEBUG && defined SK_DEBUG_ANIMATION_TIMING
@@ -231,7 +239,7 @@ bool SkDisplayXMLParser::onStartElement(const char name[])
bool SkDisplayXMLParser::onStartElementLen(const char name[], size_t len) {
fCurrDisplayable = NULL; // init so we'll ignore attributes if we exit early
- if (strncasecmp(name, "screenplay", len) == 0) {
+ if (SK_strncasecmp(name, "screenplay", len) == 0) {
fInSkia = true;
if (fInInclude == false)
fMaker.idsSet(name, len, &fMaker.fScreenplay);