Diff for /Amaya/amaya/styleparser.c between versions 1.433 and 1.434

version 1.433, 2009/10/02 13:30:24 version 1.434, 2009/11/17 14:37:05
Line 5181  static char *ParseCSSContent (Element el Line 5181  static char *ParseCSSContent (Element el
   int                 length, val;    int                 length, val;
   char               *buffer, *p;    char               *buffer, *p;
   char               *start_value;    char               *start_value;
   ThotBool            repeat;    wchar_t             wc;
     ThotBool            repeat, done;
   
   value.typed_data.unit = UNIT_REL;    value.typed_data.unit = UNIT_REL;
   value.typed_data.real = FALSE;    value.typed_data.real = FALSE;
Line 5217  static char *ParseCSSContent (Element el Line 5218  static char *ParseCSSContent (Element el
           last = SkipString (last);            last = SkipString (last);
           length = last - cssRule;            length = last - cssRule;
           /* get a buffer to store the string */            /* get a buffer to store the string */
           buffer = (char *)TtaGetMemory (length);            buffer = (char *)TtaGetMemory (3 * length);
           p = buffer; /* beginning of the string */            p = buffer; /* beginning of the string */
           cssRule++;            cssRule++;
           while (*cssRule != EOS && *cssRule != quoteChar)            while (*cssRule != EOS && *cssRule != quoteChar)
             {              {
                 done = FALSE;
               if (*cssRule == '\\')                if (*cssRule == '\\')
                 {                  {
                   cssRule++; /* skip the backslash */                    cssRule++; /* skip the backslash */
Line 5240  static char *ParseCSSContent (Element el Line 5242  static char *ParseCSSContent (Element el
                       sscanf (start, "%x", &val);                        sscanf (start, "%x", &val);
                       TtaWCToMBstring ((wchar_t) val, (unsigned char **) &p);                        TtaWCToMBstring ((wchar_t) val, (unsigned char **) &p);
                       *cssRule = savedChar;                        *cssRule = savedChar;
                     }                        done = TRUE;
                   else  
                     {  
                       *p = *cssRule;  
                       p++; cssRule++;  
                     }                      }
                 }                  }
               else                if (!done)
                 {                  {
                   *p = *cssRule;                    /* The default encoding of CSS style sheets is ISO-8859-1,
                   p++; cssRule++;                       but we should use the real encoding fo the file instead
                        of this default value @@@@@ */
                     wc = TtaGetWCFromChar ((unsigned char) cssRule[0], ISO_8859_1);
                     TtaWCToMBstring (wc, (unsigned char **) &p);
                     cssRule++;
                 }                  }
             }              }
           *p = EOS;            *p = EOS;

Removed from v.1.433  
changed lines
  Added in v.1.434


Webmaster