summaryrefslogtreecommitdiff
path: root/src/select/properties/voice_family.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-12-13 20:16:52 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2013-12-13 20:16:52 +0000
commit1b95fec601a3d006ba6b99e1dea3f61c3c8318fc (patch)
tree1a0c3a78afe1db919ff6b4c56a6c3f2e01d03607 /src/select/properties/voice_family.c
parente3372335ec1628e1d6ef1a4fd63b11bb47f2e0e6 (diff)
downloadlibcss-1b95fec601a3d006ba6b99e1dea3f61c3c8318fc.tar.gz
libcss-1b95fec601a3d006ba6b99e1dea3f61c3c8318fc.tar.bz2
Various changes which modify API and ABI:
- Remove client allocation function. - Change node_classes callback not to yield array ownership to libcss. - Node bloom filters now built by, during selection libcss. - Added selection callbacks to get and set data on document nodes. Test suite, example, and documentation updated to match.
Diffstat (limited to 'src/select/properties/voice_family.c')
-rw-r--r--src/select/properties/voice_family.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/select/properties/voice_family.c b/src/select/properties/voice_family.c
index e61d2c6..5c70d1e 100644
--- a/src/select/properties/voice_family.c
+++ b/src/select/properties/voice_family.c
@@ -31,7 +31,9 @@ css_error css__cascade_voice_family(uint32_t opv, css_style *style,
switch (v) {
case VOICE_FAMILY_STRING:
case VOICE_FAMILY_IDENT_LIST:
- css__stylesheet_string_get(style->sheet, *((css_code_t *) style->bytecode), &voice);
+ css__stylesheet_string_get(style->sheet,
+ *((css_code_t *) style->bytecode),
+ &voice);
advance_bytecode(style, sizeof(css_code_t));
break;
case VOICE_FAMILY_MALE:
@@ -53,13 +55,11 @@ css_error css__cascade_voice_family(uint32_t opv, css_style *style,
* first generic-family are ignored. */
/** \todo Do this at bytecode generation time? */
if (value == 0 && voice != NULL) {
- temp = state->computed->alloc(voices,
- (n_voices + 1) * sizeof(lwc_string *),
- state->computed->pw);
+ temp = realloc(voices,
+ (n_voices + 1) * sizeof(lwc_string *));
if (temp == NULL) {
if (voices != NULL) {
- state->computed->alloc(voices, 0,
- state->computed->pw);
+ free(voices);
}
return CSS_NOMEM;
}
@@ -80,11 +80,9 @@ css_error css__cascade_voice_family(uint32_t opv, css_style *style,
if (n_voices > 0) {
lwc_string **temp;
- temp = state->computed->alloc(voices,
- (n_voices + 1) * sizeof(lwc_string *),
- state->computed->pw);
+ temp = realloc(voices, (n_voices + 1) * sizeof(lwc_string *));
if (temp == NULL) {
- state->computed->alloc(voices, 0, state->computed->pw);
+ free(voices);
return CSS_NOMEM;
}
@@ -97,10 +95,10 @@ css_error css__cascade_voice_family(uint32_t opv, css_style *style,
isInherit(opv))) {
/** \todo voice-family */
if (n_voices > 0)
- state->computed->alloc(voices, 0, state->computed->pw);
+ free(voices);
} else {
if (n_voices > 0)
- state->computed->alloc(voices, 0, state->computed->pw);
+ free(voices);
}
return CSS_OK;