version 1.98, 2001/08/30 11:23:50
|
version 1.99, 2001/08/30 13:13:15
|
Line 203 static void CSSParseError (char *msg, c
|
Line 203 static void CSSParseError (char *msg, c
|
} |
} |
CSSErrorsFound = TRUE; |
CSSErrorsFound = TRUE; |
if (LineNumber < 0) |
if (LineNumber < 0) |
fprintf (ErrFile, " In Style attribute %s %s\n", msg, value); |
fprintf (ErrFile, " In Style attribute %s %s\"\n", msg, value); |
else |
else |
fprintf (ErrFile, " line %d: %s %s\n", LineNumber + NewLineSkipped, |
fprintf (ErrFile, " line %d: %s %s\"\n", LineNumber + NewLineSkipped, |
msg, value); |
msg, value); |
} |
} |
} |
} |
Line 227 static char *SkipProperty (char *ptr)
|
Line 227 static char *SkipProperty (char *ptr)
|
*ptr = EOS; |
*ptr = EOS; |
#ifdef CSS_WARNING |
#ifdef CSS_WARNING |
if (*deb != EOS) |
if (*deb != EOS) |
CSSParseError ("CSS property ignored:", deb); |
CSSParseError ("CSS property ignored \"", deb); |
#endif /* CSS_WARNING */ |
#endif /* CSS_WARNING */ |
*ptr = c; |
*ptr = c; |
return (ptr); |
return (ptr); |
Line 236 static char *SkipProperty (char *ptr)
|
Line 236 static char *SkipProperty (char *ptr)
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
SkipProperty: |
SkipProperty: |
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
static char *SkipValue (char *ptr) |
static char *SkipValue (char *ptr, ThotBool error) |
{ |
{ |
char *deb; |
char *deb; |
char c; |
char c; |
Line 247 static char *SkipValue (char *ptr)
|
Line 247 static char *SkipValue (char *ptr)
|
/* print the skipped property */ |
/* print the skipped property */ |
c = *ptr; |
c = *ptr; |
*ptr = EOS; |
*ptr = EOS; |
#ifdef CSS_WARNING |
|
if (*deb != EOS && *deb != ',') |
if (*deb != EOS && *deb != ',') |
CSSParseError ("CSS value ignored:", deb); |
{ |
|
if (error) |
|
CSSParseError ("invalid CSS value \"", deb); |
|
#ifdef CSS_WARNING |
|
else |
|
CSSParseError ("CSS value ignored \"", deb); |
#endif /* CSS_WARNING */ |
#endif /* CSS_WARNING */ |
|
} |
*ptr = c; |
*ptr = c; |
return (ptr); |
return (ptr); |
} |
} |
Line 470 static char *ParseCSSColor (char *cssRul
|
Line 475 static char *ParseCSSColor (char *cssRul
|
ptr = TtaGiveRGB (cssRule, &redval, &greenval, &blueval); |
ptr = TtaGiveRGB (cssRule, &redval, &greenval, &blueval); |
if (ptr == cssRule) |
if (ptr == cssRule) |
{ |
{ |
cssRule = SkipValue (cssRule); |
cssRule = SkipValue (cssRule, TRUE); |
val->typed_data.value = 0; |
val->typed_data.value = 0; |
val->typed_data.unit = STYLE_UNIT_INVALID; |
val->typed_data.unit = STYLE_UNIT_INVALID; |
} |
} |
Line 929 static char *ParseCSSBorderTop (Element
|
Line 934 static char *ParseCSSBorderTop (Element
|
cssRule = ParseCSSBorderColorTop (element, tsch, context, cssRule, css, isHTML); |
cssRule = ParseCSSBorderColorTop (element, tsch, context, cssRule, css, isHTML); |
if (ptr == cssRule) |
if (ptr == cssRule) |
/* rule not found */ |
/* rule not found */ |
cssRule = SkipValue (cssRule); |
cssRule = SkipValue (cssRule, TRUE); |
cssRule = SkipBlanksAndComments (cssRule); |
cssRule = SkipBlanksAndComments (cssRule); |
} |
} |
return (cssRule); |
return (cssRule); |
Line 956 static char *ParseCSSBorderLeft (Element
|
Line 961 static char *ParseCSSBorderLeft (Element
|
cssRule = ParseCSSBorderColorLeft (element, tsch, context, cssRule, css, isHTML); |
cssRule = ParseCSSBorderColorLeft (element, tsch, context, cssRule, css, isHTML); |
if (ptr == cssRule) |
if (ptr == cssRule) |
/* rule not found */ |
/* rule not found */ |
cssRule = SkipValue (cssRule); |
cssRule = SkipValue (cssRule, TRUE); |
cssRule = SkipBlanksAndComments (cssRule); |
cssRule = SkipBlanksAndComments (cssRule); |
} |
} |
return (cssRule); |
return (cssRule); |
Line 983 static char *ParseCSSBorderBottom (Eleme
|
Line 988 static char *ParseCSSBorderBottom (Eleme
|
cssRule = ParseCSSBorderColorBottom (element, tsch, context, cssRule, css, isHTML); |
cssRule = ParseCSSBorderColorBottom (element, tsch, context, cssRule, css, isHTML); |
if (ptr == cssRule) |
if (ptr == cssRule) |
/* rule not found */ |
/* rule not found */ |
cssRule = SkipValue (cssRule); |
cssRule = SkipValue (cssRule, TRUE); |
cssRule = SkipBlanksAndComments (cssRule); |
cssRule = SkipBlanksAndComments (cssRule); |
} |
} |
return (cssRule); |
return (cssRule); |
Line 1010 static char *ParseCSSBorderRight (Elemen
|
Line 1015 static char *ParseCSSBorderRight (Elemen
|
cssRule = ParseCSSBorderColorRight (element, tsch, context, cssRule, css, isHTML); |
cssRule = ParseCSSBorderColorRight (element, tsch, context, cssRule, css, isHTML); |
if (ptr == cssRule) |
if (ptr == cssRule) |
/* rule not found */ |
/* rule not found */ |
cssRule = SkipValue (cssRule); |
cssRule = SkipValue (cssRule, TRUE); |
cssRule = SkipBlanksAndComments (cssRule); |
cssRule = SkipBlanksAndComments (cssRule); |
} |
} |
return (cssRule); |
return (cssRule); |
Line 1052 static char *ParseCSSClear (Element elem
|
Line 1057 static char *ParseCSSClear (Element elem
|
PresentationContext context, char *cssRule, |
PresentationContext context, char *cssRule, |
CSSInfoPtr css, ThotBool isHTML) |
CSSInfoPtr css, ThotBool isHTML) |
{ |
{ |
cssRule = SkipValue (cssRule); |
cssRule = SkipValue (cssRule, FALSE); |
return (cssRule); |
return (cssRule); |
} |
} |
|
|
Line 1087 static char *ParseCSSDisplay (Element el
|
Line 1092 static char *ParseCSSDisplay (Element el
|
cssRule = SkipWord (cssRule); |
cssRule = SkipWord (cssRule); |
} |
} |
else if (!strncasecmp (cssRule, "list-item", 9)) |
else if (!strncasecmp (cssRule, "list-item", 9)) |
cssRule = SkipValue (cssRule); |
cssRule = SkipValue (cssRule, FALSE); |
else |
else |
CSSParseError ("Invalid display value", cssRule); |
CSSParseError ("Invalid display value", cssRule); |
|
|
Line 1101 static char *ParseCSSFloat (Element elem
|
Line 1106 static char *ParseCSSFloat (Element elem
|
PresentationContext context, char *cssRule, |
PresentationContext context, char *cssRule, |
CSSInfoPtr css, ThotBool isHTML) |
CSSInfoPtr css, ThotBool isHTML) |
{ |
{ |
cssRule = SkipValue (cssRule); |
cssRule = SkipValue (cssRule, FALSE); |
return (cssRule); |
return (cssRule); |
} |
} |
|
|
Line 1113 static char *ParseCSSLetterSpacing (Elem
|
Line 1118 static char *ParseCSSLetterSpacing (Elem
|
PresentationContext context, char *cssRule, |
PresentationContext context, char *cssRule, |
CSSInfoPtr css, ThotBool isHTML) |
CSSInfoPtr css, ThotBool isHTML) |
{ |
{ |
cssRule = SkipValue (cssRule); |
cssRule = SkipValue (cssRule, FALSE); |
return (cssRule); |
return (cssRule); |
} |
} |
|
|
Line 1125 static char *ParseCSSListStyleType (Elem
|
Line 1130 static char *ParseCSSListStyleType (Elem
|
PresentationContext context, char *cssRule, |
PresentationContext context, char *cssRule, |
CSSInfoPtr css, ThotBool isHTML) |
CSSInfoPtr css, ThotBool isHTML) |
{ |
{ |
cssRule = SkipValue (cssRule); |
cssRule = SkipValue (cssRule, FALSE); |
return (cssRule); |
return (cssRule); |
} |
} |
|
|
Line 1137 static char *ParseCSSListStyleImage (Ele
|
Line 1142 static char *ParseCSSListStyleImage (Ele
|
PresentationContext context, char *cssRule, |
PresentationContext context, char *cssRule, |
CSSInfoPtr css, ThotBool isHTML) |
CSSInfoPtr css, ThotBool isHTML) |
{ |
{ |
cssRule = SkipValue (cssRule); |
cssRule = SkipValue (cssRule, FALSE); |
return (cssRule); |
return (cssRule); |
} |
} |
|
|
Line 1150 static char *ParseCSSListStylePosition (
|
Line 1155 static char *ParseCSSListStylePosition (
|
char *cssRule, CSSInfoPtr css, |
char *cssRule, CSSInfoPtr css, |
ThotBool isHTML) |
ThotBool isHTML) |
{ |
{ |
cssRule = SkipValue (cssRule); |
cssRule = SkipValue (cssRule, FALSE); |
return (cssRule); |
return (cssRule); |
} |
} |
|
|
Line 1162 static char *ParseCSSListStyle (Element
|
Line 1167 static char *ParseCSSListStyle (Element
|
PresentationContext context, char *cssRule, |
PresentationContext context, char *cssRule, |
CSSInfoPtr css, ThotBool isHTML) |
CSSInfoPtr css, ThotBool isHTML) |
{ |
{ |
cssRule = SkipValue (cssRule); |
cssRule = SkipValue (cssRule, FALSE); |
return (cssRule); |
return (cssRule); |
} |
} |
|
|
Line 1242 static char *ParseCSSTextTransform (Elem
|
Line 1247 static char *ParseCSSTextTransform (Elem
|
PresentationContext context, char *cssRule, |
PresentationContext context, char *cssRule, |
CSSInfoPtr css, ThotBool isHTML) |
CSSInfoPtr css, ThotBool isHTML) |
{ |
{ |
cssRule = SkipValue (cssRule); |
cssRule = SkipValue (cssRule, FALSE); |
return (cssRule); |
return (cssRule); |
} |
} |
|
|
Line 1254 static char *ParseCSSVerticalAlign (Elem
|
Line 1259 static char *ParseCSSVerticalAlign (Elem
|
PresentationContext context, char *cssRule, |
PresentationContext context, char *cssRule, |
CSSInfoPtr css, ThotBool isHTML) |
CSSInfoPtr css, ThotBool isHTML) |
{ |
{ |
cssRule = SkipValue (cssRule); |
cssRule = SkipValue (cssRule, FALSE); |
return (cssRule); |
return (cssRule); |
} |
} |
|
|
Line 1284 static char *ParseCSSWordSpacing (Elemen
|
Line 1289 static char *ParseCSSWordSpacing (Elemen
|
PresentationContext context, char *cssRule, |
PresentationContext context, char *cssRule, |
CSSInfoPtr css, ThotBool isHTML) |
CSSInfoPtr css, ThotBool isHTML) |
{ |
{ |
cssRule = SkipValue (cssRule); |
cssRule = SkipValue (cssRule, FALSE); |
return (cssRule); |
return (cssRule); |
} |
} |
|
|
Line 1517 static char *ParseCSSFontFamily (Element
|
Line 1522 static char *ParseCSSFontFamily (Element
|
if (font.typed_data.value != 0) |
if (font.typed_data.value != 0) |
{ |
{ |
cssRule = SkipBlanksAndComments (cssRule); |
cssRule = SkipBlanksAndComments (cssRule); |
cssRule = SkipValue (cssRule); |
cssRule = SkipValue (cssRule, FALSE); |
/* install the new presentation */ |
/* install the new presentation */ |
TtaSetStylePresentation (PRFont, element, tsch, context, font); |
TtaSetStylePresentation (PRFont, element, tsch, context, font); |
} |
} |
Line 1760 static char *ParseCSSFont (Element eleme
|
Line 1765 static char *ParseCSSFont (Element eleme
|
NewLineSkipped = skippedNL; |
NewLineSkipped = skippedNL; |
cssRule = ParseCSSFontFamily (element, tsch, context, cssRule, css, isHTML); |
cssRule = ParseCSSFontFamily (element, tsch, context, cssRule, css, isHTML); |
} |
} |
|
if (ptr == cssRule) |
|
cssRule = SkipValue (cssRule, TRUE); |
cssRule = SkipBlanksAndComments (cssRule); |
cssRule = SkipBlanksAndComments (cssRule); |
} |
} |
} |
} |