libcss selection question
by Paul
Hi all!
How can a user of libcss distinguish between these two situations: a)
property was defined using a default value in CSS and b) property was
undefined in CSS for the node. Those are different because in a latter
case the value of that property should be taken from a node attribute
(in my case of svg styling). As far as I can tell, for a root node, the
property is always initialised using the default value, so when
composing a style I can't distinguish between a and b.
Thanks,
Paul
3 years, 1 month
Libcss fails to compile with msvc 2019 (windows)
by Ranier Vilela
Hi,
I'm trying to compile libcss on windows, with msvc 2019 and the following
error is appearing.
stylesheet.c
libcss\src\parse/language.h(88): error C2059: erro de sintaxe: '{'
libcss\src\parse/language.h(88): error C2059: erro de sintaxe: ')'
libcss\src\parse/language.h(88): error C2059: erro de sintaxe: '=='
libcss\src\parse/language.h(98): error C2059: erro de sintaxe: 'return'
libcss\src\parse/language.h(99): error C2059: erro de sintaxe: '}'
Msvc 2019, translate tokenIsChar to:
static inline _Bool tokenIsChar(const css_token *token, uint8_t c)
{
if (token != ((void *)0) && token->type == CSS_TOKEN_CHAR &&
({(void)( (!!(token->idata != ((void *)0))) ||
(_wassert(L"token->idata != NULL",
L"C:\\usr\\src\\libpdf\\libcss\\src\\parse/language.h", (unsigned)(86)), 0)
); (token->idata)->len;}) == 1) {
char d = ({(void)( (!!(token->idata != ((void *)0))) ||
(_wassert(L"token->idata != NULL",
L"C:\\usr\\src\\libpdf\\libcss\\src\\parse/language.h", (unsigned)(87)), 0)
); (const char *)((token->idata)+1);})[0];
if ('A' <= d && d <= 'Z')
d += 'a' - 'A';
return (d == c);
}
return 0;
}
Libcss uses some gcc resource?
This is compatible with C99?
best regards
Ranier Vilela
3 years, 1 month
(no subject)
by Ranier Vilela
Hi,
I'm trying to compile libcss on windows, with msvc 2019 and the following
error is appearing.
stylesheet.c
libcss\src\parse/language.h(88): error C2059: erro de sintaxe: '{'
libcss\src\parse/language.h(88): error C2059: erro de sintaxe: ')'
libcss\src\parse/language.h(88): error C2059: erro de sintaxe: '=='
libcss\src\parse/language.h(98): error C2059: erro de sintaxe: 'return'
libcss\src\parse/language.h(99): error C2059: erro de sintaxe: '}'
Msvc 2019, translate tokenIsChar to:
static inline _Bool tokenIsChar(const css_token *token, uint8_t c)
{
if (token != ((void *)0) && token->type == CSS_TOKEN_CHAR &&
({(void)( (!!(token->idata != ((void *)0))) ||
(_wassert(L"token->idata != NULL",
L"C:\\usr\\src\\libpdf\\libcss\\src\\parse/language.h", (unsigned)(86)), 0)
); (token->idata)->len;}) == 1) {
char d = ({(void)( (!!(token->idata != ((void *)0))) ||
(_wassert(L"token->idata != NULL",
L"C:\\usr\\src\\libpdf\\libcss\\src\\parse/language.h", (unsigned)(87)), 0)
); (const char *)((token->idata)+1);})[0];
if ('A' <= d && d <= 'Z')
d += 'a' - 'A';
return (d == c);
}
return 0;
}
Libcss uses some gcc resource?
This is compatible with C99?
best regards
Ranier Vilela
3 years, 1 month