changeset 872:62917d11a1d3

merge
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Sat, 31 Jan 2009 16:07:47 +0100
parents 2965f25a3fca (current diff) 4860be60a9f9 (diff)
children 5318130174f7
files
diffstat 1 files changed, 36 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/src/cssparser.cc	Sat Jan 31 15:55:28 2009 +0100
+++ b/src/cssparser.cc	Sat Jan 31 16:07:47 2009 +0100
@@ -317,7 +317,8 @@
     Css_padding_properties},
 };
 
-#define CSS_SHORTHAND_NUM (sizeof(Css_shorthand_info) / sizeof(CssShorthandInfo))
+#define CSS_SHORTHAND_NUM \
+   (sizeof(Css_shorthand_info) / sizeof(CssShorthandInfo))
 
 /* ----------------------------------------------------------------------
  *    Parsing
@@ -536,20 +537,20 @@
    case CSS_TYPE_ENUM:
       if (parser->ttype == CSS_TK_SYMBOL) {
          for (i = 0; Css_property_info[prop].enum_symbols[i]; i++)
-            if (strcasecmp(parser->tval,
-                           Css_property_info[prop].enum_symbols[i]) == 0)
+            if (dStrcasecmp(parser->tval,
+                            Css_property_info[prop].enum_symbols[i]) == 0)
                return true;
       }
       return false;
 
    case CSS_TYPE_MULTI_ENUM:
       if (parser->ttype == CSS_TK_SYMBOL) {
-         if (strcasecmp(parser->tval, "none") != 0)
+         if (dStrcasecmp(parser->tval, "none") != 0)
             return true;
          else {
             for (i = 0; Css_property_info[prop].enum_symbols[i]; i++) {
-               if (strcasecmp(parser->tval,
-                              Css_property_info[prop].enum_symbols[i]) == 0)
+               if (dStrcasecmp(parser->tval,
+                               Css_property_info[prop].enum_symbols[i]) == 0)
                   return true;
             }
          }
@@ -560,8 +561,8 @@
    case CSS_TYPE_LENGTH:
       return parser->ttype == CSS_TK_DECINT ||
           parser->ttype == CSS_TK_FLOAT || (parser->ttype == CSS_TK_SYMBOL
-                                            && strcasecmp(parser->tval,
-                                                          "auto") == 0);
+                                            && dStrcasecmp(parser->tval,
+                                                           "auto") == 0);
 
    case CSS_TYPE_COLOR:
       return (parser->ttype == CSS_TK_COLOR ||
@@ -580,10 +581,10 @@
          return i >= 100 && i <= 900;
       } else
          return (parser->ttype == CSS_TK_SYMBOL &&
-                 (strcasecmp(parser->tval, "normal") == 0 ||
-                  strcasecmp(parser->tval, "bold") == 0 ||
-                  strcasecmp(parser->tval, "bolder") == 0 ||
-                  strcasecmp(parser->tval, "lighter") == 0));
+                 (dStrcasecmp(parser->tval, "normal") == 0 ||
+                  dStrcasecmp(parser->tval, "bold") == 0 ||
+                  dStrcasecmp(parser->tval, "bolder") == 0 ||
+                  dStrcasecmp(parser->tval, "lighter") == 0));
       break;
 
    case CSS_TYPE_UNUSED:
@@ -610,8 +611,8 @@
    case CSS_TYPE_ENUM:
       if (parser->ttype == CSS_TK_SYMBOL) {
          for (i = 0; Css_property_info[prop].enum_symbols[i]; i++)
-            if (strcasecmp(parser->tval,
-                           Css_property_info[prop].enum_symbols[i]) == 0) {
+            if (dStrcasecmp(parser->tval,
+                            Css_property_info[prop].enum_symbols[i]) == 0) {
                val->intVal = i;
                ret = true;
                break;
@@ -625,11 +626,11 @@
       ret = true;
 
       while (parser->ttype == CSS_TK_SYMBOL) {
-         if (strcasecmp(parser->tval, "none") != 0) {
+         if (dStrcasecmp(parser->tval, "none") != 0) {
             for (i = 0, found = false;
                  !found && Css_property_info[prop].enum_symbols[i]; i++) {
-               if (strcasecmp(parser->tval,
-                              Css_property_info[prop].enum_symbols[i]) == 0)
+               if (dStrcasecmp(parser->tval,
+                               Css_property_info[prop].enum_symbols[i]) == 0)
                   val->intVal |= (1 << i);
             }
          }
@@ -648,32 +649,32 @@
 
          Css_next_token(parser);
          if (parser->ttype == CSS_TK_SYMBOL) {
-            if (strcasecmp(parser->tval, "px") == 0) {
+            if (dStrcasecmp(parser->tval, "px") == 0) {
                lentype = CSS_LENGTH_TYPE_PX;
                Css_next_token(parser);
-            } else if (strcasecmp(parser->tval, "mm") == 0) {
+            } else if (dStrcasecmp(parser->tval, "mm") == 0) {
                lentype = CSS_LENGTH_TYPE_MM;
                Css_next_token(parser);
-            } else if (strcasecmp(parser->tval, "cm") == 0) {
+            } else if (dStrcasecmp(parser->tval, "cm") == 0) {
                lentype = CSS_LENGTH_TYPE_MM;
                fval *= 10;
                Css_next_token(parser);
-            } else if (strcasecmp(parser->tval, "in") == 0) {
+            } else if (dStrcasecmp(parser->tval, "in") == 0) {
                lentype = CSS_LENGTH_TYPE_MM;
                fval *= 25.4;
                Css_next_token(parser);
-            } else if (strcasecmp(parser->tval, "pt") == 0) {
+            } else if (dStrcasecmp(parser->tval, "pt") == 0) {
                lentype = CSS_LENGTH_TYPE_MM;
                fval *= (25.4 / 72);
                Css_next_token(parser);
-            } else if (strcasecmp(parser->tval, "pc") == 0) {
+            } else if (dStrcasecmp(parser->tval, "pc") == 0) {
                lentype = CSS_LENGTH_TYPE_MM;
                fval *= (25.4 / 6);
                Css_next_token(parser);
-            } else if (strcasecmp(parser->tval, "em") == 0) {
+            } else if (dStrcasecmp(parser->tval, "em") == 0) {
                lentype = CSS_LENGTH_TYPE_EM;
                Css_next_token(parser);
-            } else if (strcasecmp(parser->tval, "ex") == 0) {
+            } else if (dStrcasecmp(parser->tval, "ex") == 0) {
                lentype = CSS_LENGTH_TYPE_EX;
                Css_next_token(parser);
             }
@@ -688,7 +689,7 @@
 
          val->intVal = CSS_CREATE_LENGTH(fval, lentype);
       } else if (parser->ttype == CSS_TK_SYMBOL &&
-                 strcasecmp(parser->tval, "auto") == 0) {
+                 dStrcasecmp(parser->tval, "auto") == 0) {
          ret = true;
          val->intVal = CSS_LENGTH_TYPE_AUTO;
          Css_next_token(parser);
@@ -737,13 +738,13 @@
             /* invalid */
             ival = 0;
       } else if (parser->ttype == CSS_TK_SYMBOL) {
-         if (strcasecmp(parser->tval, "normal") == 0)
+         if (dStrcasecmp(parser->tval, "normal") == 0)
             ival = CssProperty::CSS_FONT_WEIGHT_NORMAL;
-         if (strcasecmp(parser->tval, "bold") == 0)
+         if (dStrcasecmp(parser->tval, "bold") == 0)
             ival = CssProperty::CSS_FONT_WEIGHT_BOLD;
-         if (strcasecmp(parser->tval, "bolder") == 0)
+         if (dStrcasecmp(parser->tval, "bolder") == 0)
             ival = CssProperty::CSS_FONT_WEIGHT_BOLDER;
-         if (strcasecmp(parser->tval, "lighter") == 0)
+         if (dStrcasecmp(parser->tval, "lighter") == 0)
             ival = CssProperty::CSS_FONT_WEIGHT_LIGHTER;
       }
 
@@ -772,7 +773,7 @@
    if (parser->ttype == CSS_TK_CHAR && parser->tval[0] == '!') {
       Css_next_token(parser);
       if (parser->ttype == CSS_TK_SYMBOL &&
-          strcasecmp(parser->tval, "important") == 0) {
+          dStrcasecmp(parser->tval, "important") == 0) {
          Css_next_token(parser);
          return true;
       }
@@ -786,8 +787,8 @@
  */
 static int Css_property_info_cmp(const void *a, const void *b)
 {
-   return strcasecmp(((CssPropertyInfo *) a)->symbol,
-                     ((CssPropertyInfo *) b)->symbol);
+   return dStrcasecmp(((CssPropertyInfo *) a)->symbol,
+                      ((CssPropertyInfo *) b)->symbol);
 }
 
 
@@ -796,8 +797,8 @@
  */
 static int Css_shorthand_info_cmp(const void *a, const void *b)
 {
-   return strcasecmp(((CssShorthandInfo *) a)->symbol,
-                     ((CssShorthandInfo *) b)->symbol);
+   return dStrcasecmp(((CssShorthandInfo *) a)->symbol,
+                      ((CssShorthandInfo *) b)->symbol);
 }
 
 static void Css_parse_declaration(CssParser * parser,