version 1.15, 1999/06/07 08:42:52
|
version 1.16, 1999/06/08 16:38:44
|
Line 65 typedef struct CSSProperty
|
Line 65 typedef struct CSSProperty
|
} |
} |
CSSProperty; |
CSSProperty; |
|
|
#define MAX_DEEP 10 |
|
#include "HTMLstyleColor.h" |
#include "HTMLstyleColor.h" |
|
|
struct unit_def |
struct unit_def |
Line 358 Document doc;
|
Line 357 Document doc;
|
return (res); |
return (res); |
} |
} |
|
|
/*---------------------------------------------------------------------- |
|
GetCSSNames : return the list of strings corresponding to the |
|
CSS names of an element |
|
----------------------------------------------------------------------*/ |
|
#ifdef __STDC__ |
|
static int GetCSSNames (Element el, Document doc, STRING *lst, int max) |
|
#else |
|
static int GetCSSNames (el, doc, lst, max) |
|
Element el; |
|
Document doc; |
|
STRING* lst; |
|
int max; |
|
#endif |
|
{ |
|
STRING res; |
|
int deep; |
|
Element father = el; |
|
|
|
for (deep = 0; deep < max;) |
|
{ |
|
el = father; |
|
if (el == NULL) |
|
break; |
|
father = TtaGetParent (el); |
|
|
|
res = GITagName (el); |
|
|
|
if (res == NULL) |
|
continue; |
|
if (!ustrcmp (res, "BODY")) |
|
break; |
|
if (!ustrcmp (res, "HTML")) |
|
break; |
|
|
|
/* store this level in the array */ |
|
lst[deep] = res; |
|
deep++; |
|
} |
|
return (deep); |
|
} |
|
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
PToCss : translate a PresentationSetting to the |
PToCss : translate a PresentationSetting to the |
Line 3752 Document doc;
|
Line 3711 Document doc;
|
STRING elHtmlName; |
STRING elHtmlName; |
STRING end_str; |
STRING end_str; |
STRING sel = selector; |
STRING sel = selector; |
STRING names[MAX_DEEP]; |
|
int result = 0; |
int result = 0; |
|
|
elHtmlName = GetCSSName (el, doc); |
elHtmlName = GetCSSName (el, doc); |
GetCSSNames (el, doc, names, MAX_DEEP); |
|
|
|
/* |
/* look for a selector (ELEM) */ |
* look for a selector (ELEM) |
|
*/ |
|
selector = SkipBlanksAndComments (selector); |
selector = SkipBlanksAndComments (selector); |
if (*selector == '(') |
if (*selector == '(') |
{ |
{ |