Diff for /Amaya/amaya/XHTMLbuilder.c between versions 1.151 and 1.152

version 1.151, 2008/03/28 11:52:16 version 1.152, 2008/05/07 13:49:05
Line 202  void CheckMandatoryAttribute (Element el Line 202  void CheckMandatoryAttribute (Element el
   Attribute      attr;    Attribute      attr;
   AttributeType  attrType;    AttributeType  attrType;
   int            lineNum;    int            lineNum;
   char          *name;    const char    *name;
   char           msgBuffer[MaxMsgLength];    char           msgBuffer[MaxMsgLength];
   
   elType = TtaGetElementType (el);    elType = TtaGetElementType (el);
Line 1406  static void XhtmlTypeAttrValue (char *va Line 1406  static void XhtmlTypeAttrValue (char *va
   IntWidthRelative for element el.    IntWidthRelative for element el.
   oldWidth is -1 or the old image width.    oldWidth is -1 or the old image width.
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 void CreateAttrWidthPercentPxl (char *buffer, Element el,  void CreateAttrWidthPercentPxl (const char *buffer, Element el,
                                 Document doc, int oldWidth)                                  Document doc, int oldWidth)
 {  {
   AttributeType   attrTypePxl, attrTypePercent, attrTypeRelative;    AttributeType   attrTypePxl, attrTypePercent, attrTypeRelative;
Line 1546  void CreateAttrWidthPercentPxl (char *bu Line 1546  void CreateAttrWidthPercentPxl (char *bu
         /* its not a number. Delete attribute and send an error message */          /* its not a number. Delete attribute and send an error message */
         {          {
           TtaRemoveAttribute (el, attrNew, doc);            TtaRemoveAttribute (el, attrNew, doc);
           if (strlen (buffer) > MaxMsgLength - 30)  // Replaced by sprintf format
             buffer[MaxMsgLength - 30] = EOS;  //          if (strlen (buffer) > MaxMsgLength - 30)
           sprintf (msgBuffer, "Invalid attribute value \"%s\"", buffer);  //            buffer[MaxMsgLength - 30] = EOS;
             sprintf (msgBuffer, "Invalid attribute value \"%*s\"", 30, buffer);
           HTMLParseError (doc, msgBuffer, 0);            HTMLParseError (doc, msgBuffer, 0);
         }          }
   
Line 1581  void CreateAttrWidthPercentPxl (char *bu Line 1582  void CreateAttrWidthPercentPxl (char *bu
   Create the corresponding attribute IntHeightPercent or IntHeightPxl.    Create the corresponding attribute IntHeightPercent or IntHeightPxl.
   oldHeight is -1 or the old image width.    oldHeight is -1 or the old image width.
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 void CreateAttrHeightPercentPxl (char *buffer, Element el,  void CreateAttrHeightPercentPxl (const char *buffer, Element el,
                                  Document doc, int oldHeight)                                   Document doc, int oldHeight)
 {  {
   AttributeType   attrTypePxl, attrTypePercent;    AttributeType   attrTypePxl, attrTypePercent;
Line 1689  void CreateAttrHeightPercentPxl (char *b Line 1690  void CreateAttrHeightPercentPxl (char *b
         /* its not a number. Delete attribute and send an error message */          /* its not a number. Delete attribute and send an error message */
         {          {
           TtaRemoveAttribute (el, attrNew, doc);            TtaRemoveAttribute (el, attrNew, doc);
           if (strlen (buffer) > MaxMsgLength - 30)  // Replaced by sprintf format
             buffer[MaxMsgLength - 30] = EOS;  //          if (strlen (buffer) > MaxMsgLength - 30)
           sprintf (msgBuffer, "Invalid attribute value \"%s\"", buffer);  //            buffer[MaxMsgLength - 30] = EOS;
             sprintf (msgBuffer, "Invalid attribute value \"%*s\"", 30, buffer);
           HTMLParseError (doc, msgBuffer, 0);            HTMLParseError (doc, msgBuffer, 0);
         }          }
   

Removed from v.1.151  
changed lines
  Added in v.1.152


Webmaster