Diff for /Amaya/amaya/styleparser.c between versions 1.58 and 1.59

version 1.58, 2000/06/20 07:42:56 version 1.59, 2000/06/27 11:19:46
Line 48  BackgroundImageCallbackBlock, *Backgroun Line 48  BackgroundImageCallbackBlock, *Backgroun
 /*  /*
  * A PropertyParser is a function used to parse  the   * A PropertyParser is a function used to parse  the
  * description substring associated to a given style attribute   * description substring associated to a given style attribute
  * e.g. : "red" for a color attribute or "12pt bold helvetica"   * e.g.: "red" for a color attribute or "12pt bold helvetica"
  * for a font attribute.   * for a font attribute.
  */   */
 #ifdef __STDC__  #ifdef __STDC__
Line 220  CHAR_T*     ptr; Line 220  CHAR_T*     ptr;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSUnit :                                                       ParseCSSUnit:                                                  
    parse a CSS Unit substring and returns the corresponding           parse a CSS Unit substring and returns the corresponding      
    value and its unit.                                                value and its unit.                                           
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
Line 431  PresentationValue *border Line 431  PresentationValue *border
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSColor : parse a CSS color attribute string         ParseCSSColor: parse a CSS color attribute string    
    we expect the input string describing the attribute to be          we expect the input string describing the attribute to be     
    either a color name, a 3 tuple or an hexadecimal encoding.         either a color name, a 3 tuple or an hexadecimal encoding.    
    The color used will be approximed from the current color           The color used will be approximed from the current color      
Line 474  PresentationValue    *val; Line 474  PresentationValue    *val;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderTopWidth : parse a CSS BorderTopWidth     ParseCSSBorderTopWidth: parse a CSS BorderTopWidth
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 504  ThotBool            isHTML; Line 504  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderBottomWidth : parse a CSS BorderBottomWidth     ParseCSSBorderBottomWidth: parse a CSS BorderBottomWidth
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 535  ThotBool            isHTML; Line 535  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderLeftWidth : parse a CSS BorderLeftWidth     ParseCSSBorderLeftWidth: parse a CSS BorderLeftWidth
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 566  ThotBool            isHTML; Line 566  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderRightWidth : parse a CSS BorderRightWidth     ParseCSSBorderRightWidth: parse a CSS BorderRightWidth
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 597  ThotBool            isHTML; Line 597  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderWidth : parse a CSS BorderWidth     ParseCSSBorderWidth: parse a CSS BorderWidth
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 661  ThotBool            isHTML; Line 661  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderColorTop : parse a CSS BorderColorTop     ParseCSSBorderColorTop: parse a CSS BorderColorTop
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 687  ThotBool            isHTML; Line 687  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderColorLeft : parse a CSS BorderColorLeft     ParseCSSBorderColorLeft: parse a CSS BorderColorLeft
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 713  ThotBool            isHTML; Line 713  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderColorBottom : parse a CSS BorderColorBottom     ParseCSSBorderColorBottom: parse a CSS BorderColorBottom
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 739  ThotBool            isHTML; Line 739  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderColorRight : parse a CSS BorderColorRight     ParseCSSBorderColorRight: parse a CSS BorderColorRight
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 765  ThotBool            isHTML; Line 765  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderColor : parse a CSS border-color             ParseCSSBorderColor: parse a CSS border-color        
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 829  ThotBool            isHTML; Line 829  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderStyleTop : parse a CSS BorderStyleTop     ParseCSSBorderStyleTop: parse a CSS BorderStyleTop
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 855  ThotBool            isHTML; Line 855  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderStyleLeft : parse a CSS BorderStyleLeft     ParseCSSBorderStyleLeft: parse a CSS BorderStyleLeft
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 881  ThotBool            isHTML; Line 881  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderStyleBottom : parse a CSS BorderStyleBottom     ParseCSSBorderStyleBottom: parse a CSS BorderStyleBottom
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 907  ThotBool            isHTML; Line 907  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderStyleRight : parse a CSS BorderStyleRight     ParseCSSBorderStyleRight: parse a CSS BorderStyleRight
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 933  ThotBool            isHTML; Line 933  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderStyleStyle : parse a CSS border-style             ParseCSSBorderStyleStyle: parse a CSS border-style        
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 997  ThotBool            isHTML; Line 997  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderTop : parse a CSS BorderTop     ParseCSSBorderTop: parse a CSS BorderTop
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 1033  ThotBool            isHTML; Line 1033  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderLeft : parse a CSS BorderLeft     ParseCSSBorderLeft: parse a CSS BorderLeft
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 1069  ThotBool            isHTML; Line 1069  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderBottom : parse a CSS BorderBottom     ParseCSSBorderBottom: parse a CSS BorderBottom
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 1105  ThotBool            isHTML; Line 1105  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorderRight : parse a CSS BorderRight     ParseCSSBorderRight: parse a CSS BorderRight
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 1141  ThotBool            isHTML; Line 1141  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBorder : parse a CSS border             ParseCSSBorder: parse a CSS border        
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 1175  ThotBool            isHTML; Line 1175  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSClear : parse a CSS clear attribute string         ParseCSSClear: parse a CSS clear attribute string    
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSClear (Element element, PSchema tsch,  static CHAR_T*        ParseCSSClear (Element element, PSchema tsch,
Line 1195  ThotBool            isHTML; Line 1195  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSDisplay : parse a CSS display attribute string             ParseCSSDisplay: parse a CSS display attribute string        
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSDisplay (Element element, PSchema tsch,  static CHAR_T*        ParseCSSDisplay (Element element, PSchema tsch,
Line 1242  ThotBool            isHTML; Line 1242  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSFloat : parse a CSS float attribute string         ParseCSSFloat: parse a CSS float attribute string    
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSFloat (Element element, PSchema tsch,  static CHAR_T*        ParseCSSFloat (Element element, PSchema tsch,
Line 1262  ThotBool            isHTML; Line 1262  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSLetterSpacing : parse a CSS letter-spacing         ParseCSSLetterSpacing: parse a CSS letter-spacing    
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 1283  ThotBool            isHTML; Line 1283  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSListStyleType : parse a CSS list-style-type     ParseCSSListStyleType: parse a CSS list-style-type
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 1304  ThotBool            isHTML; Line 1304  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSListStyleImage : parse a CSS list-style-image     ParseCSSListStyleImage: parse a CSS list-style-image
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 1325  ThotBool            isHTML; Line 1325  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSListStylePosition : parse a CSS list-style-position     ParseCSSListStylePosition: parse a CSS list-style-position
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 1346  ThotBool            isHTML; Line 1346  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSListStyle : parse a CSS list-style                 ParseCSSListStyle: parse a CSS list-style            
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 1367  ThotBool            isHTML; Line 1367  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSTextAlign : parse a CSS text-align                 ParseCSSTextAlign: parse a CSS text-align            
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 1436  ThotBool            isHTML; Line 1436  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSTextIndent : parse a CSS text-indent               ParseCSSTextIndent: parse a CSS text-indent          
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 1464  ThotBool            isHTML; Line 1464  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSTextTransform : parse a CSS text-transform         ParseCSSTextTransform: parse a CSS text-transform    
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 1485  ThotBool            isHTML; Line 1485  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSVerticalAlign : parse a CSS vertical-align         ParseCSSVerticalAlign: parse a CSS vertical-align    
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 1506  ThotBool            isHTML; Line 1506  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSWhiteSpace : parse a CSS white-space               ParseCSSWhiteSpace: parse a CSS white-space          
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 1533  ThotBool            isHTML; Line 1533  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSWordSpacing : parse a CSS word-spacing             ParseCSSWordSpacing: parse a CSS word-spacing        
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 1554  ThotBool            isHTML; Line 1554  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSLineSpacing : parse a CSS font leading string      ParseCSSLineSpacing: parse a CSS font leading string 
    we expect the input string describing the attribute to be          we expect the input string describing the attribute to be     
    value% or value                                                    value% or value                                               
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
Line 1585  ThotBool            isHTML; Line 1585  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSFontSize : parse a CSS font size attr string       ParseCSSFontSize: parse a CSS font size attr string  
    we expect the input string describing the attribute to be          we expect the input string describing the attribute to be     
    xx-small, x-small, small, medium, large, x-large, xx-large           xx-small, x-small, small, medium, large, x-large, xx-large      
    or an absolute size, or an imcrement relative to the parent          or an absolute size, or an imcrement relative to the parent     
Line 1708  ThotBool            isHTML; Line 1708  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSFontFamily : parse a CSS font family string        ParseCSSFontFamily: parse a CSS font family string   
    we expect the input string describing the attribute to be          we expect the input string describing the attribute to be     
    a common generic font style name                                     a common generic font style name                                
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
Line 1779  ThotBool            isHTML; Line 1779  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSFontWeight : parse a CSS font weight string        ParseCSSFontWeight: parse a CSS font weight string   
    we expect the input string describing the attribute to be          we expect the input string describing the attribute to be     
    normal, bold, bolder, lighter, 100, 200, 300, ... 900, inherit.     normal, bold, bolder, lighter, 100, 200, 300, ... 900, inherit.
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
Line 1871  ThotBool            isHTML; Line 1871  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSFontVariant : parse a CSS font variant string          ParseCSSFontVariant: parse a CSS font variant string     
    we expect the input string describing the attribute to be          we expect the input string describing the attribute to be     
    normal or small-caps     normal or small-caps
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
Line 1917  ThotBool            isHTML; Line 1917  ThotBool            isHTML;
   
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSFontStyle : parse a CSS font style string          ParseCSSFontStyle: parse a CSS font style string     
    we expect the input string describing the attribute to be          we expect the input string describing the attribute to be     
    italic, oblique or normal                              italic, oblique or normal                         
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
Line 1990  ThotBool            isHTML; Line 1990  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSFont : parse a CSS font attribute string          ParseCSSFont: parse a CSS font attribute string
    we expect the input string describing the attribute to be         we expect the input string describing the attribute to be
    !!!!!!                                                      !!!!!!                                  
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSFont (Element element, PSchema tsch,  static CHAR_T*        ParseCSSFont (Element element, PSchema tsch,
Line 2049  ThotBool            isHTML; Line 2049  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSTextDecoration : parse a CSS text decor string       ParseCSSTextDecoration: parse a CSS text decor string   
    we expect the input string describing the attribute to be         we expect the input string describing the attribute to be     
    underline, overline, line-through, box, shadowbox, box3d,           underline, overline, line-through, box, shadowbox, box3d,       
    cartouche, blink or none                                            cartouche, blink or none
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSTextDecoration (Element element, PSchema tsch,  static CHAR_T*        ParseCSSTextDecoration (Element element, PSchema tsch,
Line 2135  ThotBool            isHTML; Line 2135  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSHeight : parse a CSS height attribute                      ParseCSSHeight: parse a CSS height attribute
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSHeight (Element element, PSchema tsch,  static CHAR_T*        ParseCSSHeight (Element element, PSchema tsch,
Line 2156  ThotBool            isHTML; Line 2156  ThotBool            isHTML;
    if (!ustrcasecmp (cssRule, TEXT("auto")))     if (!ustrcasecmp (cssRule, TEXT("auto")))
      {       {
         cssRule = SkipWord (cssRule);          cssRule = SkipWord (cssRule);
         /* ParseCSSHeight : auto */          /* ParseCSSHeight: auto */
         return (cssRule);          return (cssRule);
      }       }
    else     else
Line 2165  ThotBool            isHTML; Line 2165  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSWidth : parse a CSS width attribute                ParseCSSWidth: parse a CSS width attribute
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSWidth (Element element, PSchema tsch,  static CHAR_T*        ParseCSSWidth (Element element, PSchema tsch,
Line 2194  ThotBool            isHTML; Line 2194  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSMarginTop : parse a CSS margin-top attribute       ParseCSSMarginTop: parse a CSS margin-top attribute
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSMarginTop (Element element, PSchema tsch,  static CHAR_T*        ParseCSSMarginTop (Element element, PSchema tsch,
Line 2224  ThotBool            isHTML; Line 2224  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSMarginBottom : parse a CSS margin-bottom          ParseCSSMarginBottom: parse a CSS margin-bottom attribute
    attribute                                                   
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSMarginBottom (Element element, PSchema tsch,  static CHAR_T*        ParseCSSMarginBottom (Element element, PSchema tsch,
Line 2251  ThotBool            isHTML; Line 2250  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSMarginLeft : parse a CSS margin-left              ParseCSSMarginLeft: parse a CSS margin-left attribute string
    attribute string.                                            
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSMarginLeft (Element element, PSchema tsch,  static CHAR_T*        ParseCSSMarginLeft (Element element, PSchema tsch,
Line 2282  ThotBool            isHTML; Line 2280  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSMarginRight : parse a CSS margin-right            ParseCSSMarginRight: parse a CSS margin-right attribute string
    attribute string.                                            
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSMarginRight (Element element, PSchema tsch,  static CHAR_T*        ParseCSSMarginRight (Element element, PSchema tsch,
Line 2309  ThotBool            isHTML; Line 2306  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSMargin : parse a CSS margin attribute string.     ParseCSSMargin: parse a CSS margin attribute string
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSMargin (Element element, PSchema tsch,  static CHAR_T*        ParseCSSMargin (Element element, PSchema tsch,
Line 2372  ThotBool            isHTML; Line 2369  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSPaddingTop : parse a CSS PaddingTop     ParseCSSPaddingTop: parse a CSS PaddingTop attribute string
    attribute string.                                            
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSPaddingTop (Element element, PSchema tsch,  static CHAR_T*        ParseCSSPaddingTop (Element element, PSchema tsch,
Line 2399  ThotBool            isHTML; Line 2395  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSPaddingBottom : parse a CSS PaddingBottom    ParseCSSPaddingBottom: parse a CSS PaddingBottom attribute string
    attribute string.                                            
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSPaddingBottom (Element element, PSchema tsch,  static CHAR_T*        ParseCSSPaddingBottom (Element element, PSchema tsch,
Line 2426  ThotBool            isHTML; Line 2421  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSPaddingLeft : parse a CSS PaddingLeft    ParseCSSPaddingLeft: parse a CSS PaddingLeft attribute string.
    attribute string.                                            
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSPaddingLeft (Element element, PSchema tsch,  static CHAR_T*        ParseCSSPaddingLeft (Element element, PSchema tsch,
Line 2453  ThotBool            isHTML; Line 2447  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSPaddingRight : parse a CSS PaddingRight    ParseCSSPaddingRight: parse a CSS PaddingRight attribute string.
    attribute string.                                            
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSPaddingRight (Element element, PSchema tsch,  static CHAR_T*        ParseCSSPaddingRight (Element element, PSchema tsch,
Line 2480  ThotBool            isHTML; Line 2473  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSPadding : parse a CSS padding attribute string.      ParseCSSPadding: parse a CSS padding attribute string. 
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSPadding (Element element, PSchema tsch,  static CHAR_T*        ParseCSSPadding (Element element, PSchema tsch,
Line 2543  ThotBool            isHTML; Line 2536  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSForeground : parse a CSS foreground attribute      ParseCSSForeground: parse a CSS foreground attribute 
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSForeground (Element element, PSchema tsch,  static CHAR_T*        ParseCSSForeground (Element element, PSchema tsch,
Line 2568  ThotBool            isHTML; Line 2561  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBackgroundColor : parse a CSS background color attribute     ParseCSSBackgroundColor: parse a CSS background color attribute 
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*      ParseCSSBackgroundColor (Element element, PSchema tsch,  static CHAR_T*      ParseCSSBackgroundColor (Element element, PSchema tsch,
Line 2615  ThotBool            isHTML; Line 2608  ThotBool            isHTML;
         {          {
           /* install the new presentation. */            /* install the new presentation. */
           TtaSetStylePresentation (PRBackground, element, tsch, context, best);            TtaSetStylePresentation (PRBackground, element, tsch, context, best);
           /* thot specificity : need to set fill pattern for background color */            /* thot specificity: need to set fill pattern for background color */
           best.typed_data.value = STYLE_PATTERN_BACKGROUND;            best.typed_data.value = STYLE_PATTERN_BACKGROUND;
           best.typed_data.unit = STYLE_UNIT_REL;            best.typed_data.unit = STYLE_UNIT_REL;
           TtaSetStylePresentation (PRFillPattern, element, tsch, context, best);            TtaSetStylePresentation (PRFillPattern, element, tsch, context, best);
Line 2633  ThotBool            isHTML; Line 2626  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBackgroundImageCallback : Callback called asynchronously by    ParseCSSBackgroundImageCallback: Callback called asynchronously by
    FetchImage when a background image has been fetched.    FetchImage when a background image has been fetched.
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 void ParseCSSBackgroundImageCallback (Document doc, Element element, STRING file, void *extra)  void ParseCSSBackgroundImageCallback (Document doc, Element element, STRING file, void *extra)
Line 2750  CHAR_T*             styleString; Line 2743  CHAR_T*             styleString;
   
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBackgroundImage : parse a CSS BackgroundImage    ParseCSSBackgroundImage: parse a CSS BackgroundImage attribute string.
    attribute string.                                            
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*      ParseCSSBackgroundImage (Element element, PSchema tsch,  static CHAR_T*      ParseCSSBackgroundImage (Element element, PSchema tsch,
Line 2894  ThotBool            isHTML; Line 2886  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBackgroundRepeat : parse a CSS BackgroundRepeat    ParseCSSBackgroundRepeat: parse a CSS BackgroundRepeat attribute string.
    attribute string.                                            
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*        ParseCSSBackgroundRepeat (Element element, PSchema tsch,  static CHAR_T*        ParseCSSBackgroundRepeat (Element element, PSchema tsch,
Line 2953  ThotBool            isHTML; Line 2944  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBackgroundAttachment : parse a CSS BackgroundAttachment     ParseCSSBackgroundAttachment: parse a CSS BackgroundAttachment
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 2998  ThotBool            isHTML; Line 2989  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBackgroundPosition : parse a CSS BackgroundPosition     ParseCSSBackgroundPosition: parse a CSS BackgroundPosition
    attribute string.                                               attribute string.                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 3065  ThotBool            isHTML; Line 3056  ThotBool            isHTML;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSBackground : parse a CSS background attribute      ParseCSSBackground: parse a CSS background attribute 
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 static CHAR_T*      ParseCSSBackground (Element element, PSchema tsch,  static CHAR_T*      ParseCSSBackground (Element element, PSchema tsch,
Line 3121  ThotBool            isHTML; Line 3112  ThotBool            isHTML;
    return (cssRule);     return (cssRule);
 }  }
   
   /*----------------------------------------------------------------------
    ParseCSSPageBreakBefore: parse a CSS background attribute 
     ----------------------------------------------------------------------*/
   #ifdef __STDC__
   static CHAR_T*      ParseCSSPageBreakBefore (Element element, PSchema tsch,
                                       PresentationContext context, CHAR_T* cssRule, CSSInfoPtr css, ThotBool isHTML)
   #else
   static CHAR_T*      ParseCSSPageBreakBefore (element, tsch, context, cssRule, css, isHTML)
   Element             element;
   PSchema             tsch;
   PresentationContext context;
   CHAR_T*             cssRule;
   CSSInfoPtr          css;
   ThotBool            isHTML;
   #endif
   {
     PresentationValue   page;
   
     page.typed_data.unit = STYLE_UNIT_INVALID;
     page.typed_data.real = FALSE;
     cssRule = SkipWCBlanksAndComments (cssRule);
     if (!ustrncasecmp (cssRule, TEXT("auto"), 4))
       {
         /*page.typed_data.unit = STYLE_UNIT_REL;*/
         page.typed_data.value = STYLE_AUTO;
       }
     else if (!ustrncasecmp (cssRule, TEXT("always"), 6))
       {
         page.typed_data.unit = STYLE_UNIT_REL;
         page.typed_data.value = STYLE_ALWAYS;
       }
     else if (!ustrncasecmp (cssRule, TEXT("avoid"), 5))
       {
         page.typed_data.unit = STYLE_UNIT_REL;
         page.typed_data.value = STYLE_AVOID;
       }
     else if (!ustrncasecmp (cssRule, TEXT("left"), 4))
       {
         page.typed_data.unit = STYLE_UNIT_REL;
         page.typed_data.value = STYLE_PAGELEFT;
       }
     else if (!ustrncasecmp (cssRule, TEXT("right"), 5))
       {
         page.typed_data.unit = STYLE_UNIT_REL;
         page.typed_data.value = STYLE_PAGERIGHT;
       }
     else if (!ustrncasecmp (cssRule, TEXT("inherit"), 7))
       {
         /*page.typed_data.unit = STYLE_UNIT_REL;*/
         page.typed_data.value = STYLE_INHERIT;
       }
     cssRule = SkipWord (cssRule);
     /* install the new presentation */
     if (page.typed_data.unit == STYLE_UNIT_REL &&
         page.typed_data.value == STYLE_ALWAYS)
       TtaSetStylePresentation (PRPageBefore, element, tsch, context, page);
     return (cssRule);
   }
   
   /*----------------------------------------------------------------------
    ParseCSSPageBreakAfter: parse a CSS background attribute 
     ----------------------------------------------------------------------*/
   #ifdef __STDC__
   static CHAR_T*      ParseCSSPageBreakAfter (Element element, PSchema tsch,
                                       PresentationContext context, CHAR_T* cssRule, CSSInfoPtr css, ThotBool isHTML)
   #else
   static CHAR_T*      ParseCSSPageBreakAfter (element, tsch, context, cssRule, css, isHTML)
   Element             element;
   PSchema             tsch;
   PresentationContext context;
   CHAR_T*             cssRule;
   CSSInfoPtr          css;
   ThotBool            isHTML;
   #endif
   {
     PresentationValue   page;
   
     page.typed_data.unit = STYLE_UNIT_INVALID;
     page.typed_data.real = FALSE;
     cssRule = SkipWCBlanksAndComments (cssRule);
     if (!ustrncasecmp (cssRule, TEXT("auto"), 4))
       {
         /*page.typed_data.unit = STYLE_UNIT_REL;*/
         page.typed_data.value = STYLE_AUTO;
       }
     else if (!ustrncasecmp (cssRule, TEXT("always"), 6))
       {
         page.typed_data.unit = STYLE_UNIT_REL;
         page.typed_data.value = STYLE_ALWAYS;
       }
     else if (!ustrncasecmp (cssRule, TEXT("avoid"), 5))
       {
         page.typed_data.unit = STYLE_UNIT_REL;
         page.typed_data.value = STYLE_AVOID;
       }
     else if (!ustrncasecmp (cssRule, TEXT("left"), 4))
       {
         page.typed_data.unit = STYLE_UNIT_REL;
         page.typed_data.value = STYLE_PAGELEFT;
       }
     else if (!ustrncasecmp (cssRule, TEXT("right"), 5))
       {
         page.typed_data.unit = STYLE_UNIT_REL;
         page.typed_data.value = STYLE_PAGERIGHT;
       }
     else if (!ustrncasecmp (cssRule, TEXT("inherit"), 7))
       {
         /*page.typed_data.unit = STYLE_UNIT_REL;*/
         page.typed_data.value = STYLE_INHERIT;
       }
     cssRule = SkipWord (cssRule);
     /* install the new presentation */
     /*if (page.typed_data.unit == STYLE_UNIT_REL)
       TtaSetStylePresentation (PRPageAfter, element, tsch, context, page);*/
     return (cssRule);
   }
   
   /*----------------------------------------------------------------------
    ParseCSSPageBreakInside: parse a CSS background attribute 
     ----------------------------------------------------------------------*/
   #ifdef __STDC__
   static CHAR_T*      ParseCSSPageBreakInside (Element element, PSchema tsch,
                                       PresentationContext context, CHAR_T* cssRule, CSSInfoPtr css, ThotBool isHTML)
   #else
   static CHAR_T*      ParseCSSPageBreakInside (element, tsch, context, cssRule, css, isHTML)
   Element             element;
   PSchema             tsch;
   PresentationContext context;
   CHAR_T*             cssRule;
   CSSInfoPtr          css;
   ThotBool            isHTML;
   #endif
   {
     PresentationValue   page;
   
     page.typed_data.unit = STYLE_UNIT_INVALID;
     page.typed_data.real = FALSE;
     cssRule = SkipWCBlanksAndComments (cssRule);
     if (!ustrncasecmp (cssRule, TEXT("auto"), 4))
       {
         /*page.typed_data.unit = STYLE_UNIT_REL;*/
         page.typed_data.value = STYLE_AUTO;
       }
     else if (!ustrncasecmp (cssRule, TEXT("avoid"), 5))
       {
         page.typed_data.unit = STYLE_UNIT_REL;
         page.typed_data.value = STYLE_AVOID;
       }
     else if (!ustrncasecmp (cssRule, TEXT("inherit"), 7))
       {
         /*page.typed_data.unit = STYLE_UNIT_REL;*/
         page.typed_data.value = STYLE_INHERIT;
       }
     cssRule = SkipWord (cssRule);
     /* install the new presentation */
     if (page.typed_data.unit == STYLE_UNIT_REL &&
         page.typed_data.value == STYLE_AVOID)
       TtaSetStylePresentation (PRPageInside, element, tsch, context, page);
     return (cssRule);
   }
   
   
 /************************************************************************  /************************************************************************
Line 3129  ThotBool            isHTML; Line 3280  ThotBool            isHTML;
  *                                                                      *     *                                                                      *  
  ************************************************************************/   ************************************************************************/
 /*  /*
  * NOTE : Long attribute name MUST be placed before shortened ones !   * NOTE: Long attribute name MUST be placed before shortened ones !
  *        e.g. "FONT-SIZE" must be placed before "FONT"   *        e.g. "FONT-SIZE" must be placed before "FONT"
  */   */
 static CSSProperty CSSProperties[] =  static CSSProperty CSSProperties[] =
Line 3202  static CSSProperty CSSProperties[] = Line 3353  static CSSProperty CSSProperties[] =
    {TEXT("list-style-type"), ParseCSSListStyleType},     {TEXT("list-style-type"), ParseCSSListStyleType},
    {TEXT("list-style-image"), ParseCSSListStyleImage},     {TEXT("list-style-image"), ParseCSSListStyleImage},
    {TEXT("list-style-position"), ParseCSSListStylePosition},     {TEXT("list-style-position"), ParseCSSListStylePosition},
    {TEXT("list-style"), ParseCSSListStyle}     {TEXT("list-style"), ParseCSSListStyle},
   
      {TEXT("page-break-before"), ParseCSSPageBreakBefore},
      {TEXT("page-break-after"), ParseCSSPageBreakAfter},
      {TEXT("page-break-inside"), ParseCSSPageBreakInside}
 };  };
 #define NB_CSSSTYLEATTRIBUTE (sizeof(CSSProperties) / sizeof(CSSProperty))  #define NB_CSSSTYLEATTRIBUTE (sizeof(CSSProperties) / sizeof(CSSProperty))
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseCSSRule : parse a CSS Style string                             ParseCSSRule: parse a CSS Style string                        
    we expect the input string describing the style to be of the       we expect the input string describing the style to be of the  
    form : PRORPERTY : DESCRIPTION [ ; PROPERTY : DESCRIPTION ] *      form: PRORPERTY: DESCRIPTION [ ; PROPERTY: DESCRIPTION ] * 
    but tolerate incorrect or incomplete input                         but tolerate incorrect or incomplete input                    
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
Line 3287  ThotBool            isHTML; Line 3442  ThotBool            isHTML;
   
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
  PToCss :  translate a PresentationSetting to the   PToCss:  translate a PresentationSetting to the
      equivalent CSS string, and add it to the buffer given as the       equivalent CSS string, and add it to the buffer given as the
       argument. It is used when extracting the CSS string from actual        argument. It is used when extracting the CSS string from actual
       presentation.        presentation.
Line 3550  int                  len Line 3705  int                  len
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseHTMLSpecificStyle : parse and apply a CSS Style string.     ParseHTMLSpecificStyle: parse and apply a CSS Style string.
    This function must be called when a specific style is applied to an     This function must be called when a specific style is applied to an
    element.     element.
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
Line 3584  ThotBool            destroy; Line 3739  ThotBool            destroy;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseGenericSelector : Create a generic context for a given      ParseGenericSelector: Create a generic context for a given 
    selector string. If the selector is made of multiple comma-      selector string. If the selector is made of multiple comma- 
    separated selector items, it parses them one at a time and       separated selector items, it parses them one at a time and  
    return the end of the selector string to be handled or NULL      return the end of the selector string to be handled or NULL 
Line 3876  CSSInfoPtr      css; Line 4031  CSSInfoPtr      css;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ParseStyleDeclaration : parse one HTML style declaration         ParseStyleDeclaration: parse one HTML style declaration    
    stored in the header of a HTML document                            stored in the header of a HTML document                       
    We expect the style string to be of the form :                        We expect the style string to be of the form:                   
    [                                                                     [                                                                
    e.g: pinky, awful { color: pink, font-family: helvetica }             e.g: pinky, awful { color: pink, font-family: helvetica }        
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
Line 3924  ThotBool            destroy; Line 4079  ThotBool            destroy;
     decl_end++;      decl_end++;
   if (*decl_end == WC_EOS)    if (*decl_end == WC_EOS)
     {      {
       fprintf (stderr, "Invalid STYLE declaration : %s\n", cssRule);        fprintf (stderr, "Invalid STYLE declaration: %s\n", cssRule);
       return;        return;
     }      }
   saved2 = *decl_end;    saved2 = *decl_end;
Line 3955  ThotBool            destroy; Line 4110  ThotBool            destroy;
  ************************************************************************/   ************************************************************************/
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    IsImplicitClassName : return wether the Class name is an             IsImplicitClassName: return wether the Class name is an        
    implicit one, eg "H1" or "H2 EM" meaning it's a GI name            implicit one, eg "H1" or "H2 EM" meaning it's a GI name       
    or an HTML context name.                                           or an HTML context name.                                      
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
Line 3997  Document            doc; Line 4152  Document            doc;
   
 /************************************************************************  /************************************************************************
  *                                                                      *     *                                                                      *  
  *  Functions Needed for support of HTML 3.2 : translate to CSS equiv   *   *  Functions Needed for support of HTML 3.2: translate to CSS equiv   *
  *                                                                      *     *                                                                      *  
  ************************************************************************/   ************************************************************************/
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    HTMLSetBackgroundColor :     HTMLSetBackgroundColor:
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 void                HTMLSetBackgroundColor (Document doc, Element el, CHAR_T* color)  void                HTMLSetBackgroundColor (Document doc, Element el, CHAR_T* color)
Line 4020  CHAR_T*             color; Line 4175  CHAR_T*             color;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    HTMLSetBackgroundImage :     HTMLSetBackgroundImage:
    repeat = repeat value     repeat = repeat value
    image = url of background image     image = url of background image
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
Line 4050  CHAR_T*             image; Line 4205  CHAR_T*             image;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    HTMLSetForegroundColor :                                             HTMLSetForegroundColor:                                        
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 void                HTMLSetForegroundColor (Document doc, Element el, CHAR_T* color)  void                HTMLSetForegroundColor (Document doc, Element el, CHAR_T* color)
Line 4068  CHAR_T*             color; Line 4223  CHAR_T*             color;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    HTMLResetBackgroundColor :                                           HTMLResetBackgroundColor:                                      
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 void                HTMLResetBackgroundColor (Document doc, Element el)  void                HTMLResetBackgroundColor (Document doc, Element el)
Line 4085  Element             el; Line 4240  Element             el;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    HTMLResetBackgroundImage :                                           HTMLResetBackgroundImage:                                      
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 void                HTMLResetBackgroundImage (Document doc, Element el)  void                HTMLResetBackgroundImage (Document doc, Element el)
Line 4102  Element             el; Line 4257  Element             el;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    HTMLResetForegroundColor :                                           HTMLResetForegroundColor:                                      
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 void                HTMLResetForegroundColor (Document doc, Element el)  void                HTMLResetForegroundColor (Document doc, Element el)
Line 4120  Element             el; Line 4275  Element             el;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    HTMLSetAlinkColor :                                                  HTMLSetAlinkColor:                                             
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 void                HTMLSetAlinkColor (Document doc, CHAR_T* color)  void                HTMLSetAlinkColor (Document doc, CHAR_T* color)
Line 4132  CHAR_T*             color; Line 4287  CHAR_T*             color;
 {  {
    CHAR_T           css_command[100];     CHAR_T           css_command[100];
   
    usprintf (css_command, TEXT("a:link { color : %s }"), color);     usprintf (css_command, TEXT("a:link { color: %s }"), color);
    ApplyCSSRules (NULL, css_command, doc, FALSE);     ApplyCSSRules (NULL, css_command, doc, FALSE);
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    HTMLSetAactiveColor :                                                HTMLSetAactiveColor:                                           
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 void                HTMLSetAactiveColor (Document doc, CHAR_T* color)  void                HTMLSetAactiveColor (Document doc, CHAR_T* color)
Line 4149  CHAR_T*             color; Line 4304  CHAR_T*             color;
 {  {
    CHAR_T           css_command[100];     CHAR_T           css_command[100];
   
    usprintf (css_command, TEXT("a:active { color : %s }"), color);     usprintf (css_command, TEXT("a:active { color: %s }"), color);
    ApplyCSSRules (NULL, css_command, doc, FALSE);     ApplyCSSRules (NULL, css_command, doc, FALSE);
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    HTMLSetAvisitedColor :                                               HTMLSetAvisitedColor:                                          
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 void                HTMLSetAvisitedColor (Document doc, CHAR_T* color)  void                HTMLSetAvisitedColor (Document doc, CHAR_T* color)
Line 4166  CHAR_T*             color; Line 4321  CHAR_T*             color;
 {  {
    CHAR_T           css_command[100];     CHAR_T           css_command[100];
   
    usprintf (css_command, TEXT("a:visited { color : %s }"), color);     usprintf (css_command, TEXT("a:visited { color: %s }"), color);
    ApplyCSSRules (NULL, css_command, doc, FALSE);     ApplyCSSRules (NULL, css_command, doc, FALSE);
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    HTMLResetAlinkColor :                                                HTMLResetAlinkColor:                                           
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 void                HTMLResetAlinkColor (Document doc)  void                HTMLResetAlinkColor (Document doc)
Line 4182  Document            doc; Line 4337  Document            doc;
 {  {
    CHAR_T           css_command[100];     CHAR_T           css_command[100];
   
    usprintf (css_command, TEXT("a:link { color : red }"));     usprintf (css_command, TEXT("a:link { color: red }"));
    ApplyCSSRules (NULL, css_command, doc, TRUE);     ApplyCSSRules (NULL, css_command, doc, TRUE);
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    HTMLResetAactiveColor :                                                      HTMLResetAactiveColor:                                                 
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 void                HTMLResetAactiveColor (Document doc)  void                HTMLResetAactiveColor (Document doc)
Line 4198  Document            doc; Line 4353  Document            doc;
 {  {
    CHAR_T           css_command[100];     CHAR_T           css_command[100];
   
    usprintf (css_command, TEXT("a:active { color : red }"));     usprintf (css_command, TEXT("a:active { color: red }"));
    ApplyCSSRules (NULL, css_command, doc, TRUE);     ApplyCSSRules (NULL, css_command, doc, TRUE);
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    HTMLResetAvisitedColor :                                             HTMLResetAvisitedColor:                                        
   ----------------------------------------------------------------------*/    ----------------------------------------------------------------------*/
 #ifdef __STDC__  #ifdef __STDC__
 void                HTMLResetAvisitedColor (Document doc)  void                HTMLResetAvisitedColor (Document doc)
Line 4214  Document            doc; Line 4369  Document            doc;
 {  {
    CHAR_T           css_command[100];     CHAR_T           css_command[100];
   
    usprintf (css_command, TEXT("a:visited { color : red }"));     usprintf (css_command, TEXT("a:visited { color: red }"));
    ApplyCSSRules (NULL, css_command, doc, TRUE);     ApplyCSSRules (NULL, css_command, doc, TRUE);
 }  }
   
Line 4242  ThotBool            destroy; Line 4397  ThotBool            destroy;
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
    ReadCSSRules :  is the front-end function called by the HTML parser     ReadCSSRules:  is the front-end function called by the HTML parser
    when detecting a <STYLE TYPE="text/css"> indicating it's the     when detecting a <STYLE TYPE="text/css"> indicating it's the
    beginning of a CSS fragment or when reading a file .css.     beginning of a CSS fragment or when reading a file .css.
       

Removed from v.1.58  
changed lines
  Added in v.1.59


Webmaster