From 7c3e35e586771fcdd0ebfe59f67f7dbc68ef8226 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 14 Feb 2009 11:54:37 +0000 Subject: Drop css_error_handler and rename css_alloc to css_allocator_fn svn path=/trunk/libcss/; revision=6482 --- src/lex/lex.c | 4 ++-- src/lex/lex.h | 2 +- src/libcss.c | 4 ++-- src/parse/language.c | 4 ++-- src/parse/language.h | 2 +- src/parse/parse.c | 4 ++-- src/parse/parse.h | 2 +- src/select/computed.c | 2 +- src/select/hash.c | 4 ++-- src/select/hash.h | 2 +- src/select/select.c | 4 ++-- src/stylesheet.c | 2 +- src/stylesheet.h | 2 +- 13 files changed, 19 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/lex/lex.c b/src/lex/lex.c index 159be24..70fcdd1 100644 --- a/src/lex/lex.c +++ b/src/lex/lex.c @@ -109,7 +109,7 @@ struct css_lexer uint32_t currentCol; /**< Current column in source */ uint32_t currentLine; /**< Current line in source */ - css_alloc alloc; /**< Memory (de)allocation function */ + css_allocator_fn alloc; /**< Memory (de)allocation function */ void *pw; /**< Pointer to client-specific data */ }; @@ -177,7 +177,7 @@ static inline bool isSpace(uint8_t c); * CSS_NOMEM on memory exhaustion */ css_error css_lexer_create(parserutils_inputstream *input, - css_alloc alloc, void *pw, css_lexer **lexer) + css_allocator_fn alloc, void *pw, css_lexer **lexer) { css_lexer *lex; diff --git a/src/lex/lex.h b/src/lex/lex.h index 81a7355..b2915fc 100644 --- a/src/lex/lex.h +++ b/src/lex/lex.h @@ -69,7 +69,7 @@ typedef struct css_token { } css_token; css_error css_lexer_create(parserutils_inputstream *input, - css_alloc alloc, void *pw, css_lexer **lexer); + css_allocator_fn alloc, void *pw, css_lexer **lexer); css_error css_lexer_destroy(css_lexer *lexer); css_error css_lexer_setopt(css_lexer *lexer, css_lexer_opttype type, diff --git a/src/libcss.c b/src/libcss.c index b5b99c9..aeb1874 100644 --- a/src/libcss.c +++ b/src/libcss.c @@ -22,7 +22,7 @@ * \return CSS_OK on success, applicable error otherwise. */ css_error css_initialise(const char *aliases_file, - css_alloc alloc, void *pw) + css_allocator_fn alloc, void *pw) { if (aliases_file == NULL || alloc == NULL) return CSS_BADPARM; @@ -38,7 +38,7 @@ css_error css_initialise(const char *aliases_file, * \param pw Pointer to client-specific private data (may be NULL) * \return CSS_OK on success, applicable error otherwise. */ -css_error css_finalise(css_alloc alloc, void *pw) +css_error css_finalise(css_allocator_fn alloc, void *pw) { if (alloc == NULL) return CSS_BADPARM; diff --git a/src/parse/language.c b/src/parse/language.c index 01dd3fc..eab4162 100644 --- a/src/parse/language.c +++ b/src/parse/language.c @@ -43,7 +43,7 @@ struct css_language { /** Interned strings */ const parserutils_hash_entry *strings[LAST_KNOWN]; - css_alloc alloc; /**< Memory (de)allocation function */ + css_allocator_fn alloc; /**< Memory (de)allocation function */ void *pw; /**< Client's private data */ }; @@ -122,7 +122,7 @@ static inline bool tokenIsChar(const css_token *token, uint8_t c); * CSS_NOMEM on memory exhaustion */ css_error css_language_create(css_stylesheet *sheet, css_parser *parser, - css_alloc alloc, void *pw, void **language) + css_allocator_fn alloc, void *pw, void **language) { css_language *c; css_parser_optparams params; diff --git a/src/parse/language.h b/src/parse/language.h index 00317c6..cd7dd74 100644 --- a/src/parse/language.h +++ b/src/parse/language.h @@ -18,7 +18,7 @@ typedef struct css_language css_language; css_error css_language_create(css_stylesheet *sheet, css_parser *parser, - css_alloc alloc, void *pw, void **language); + css_allocator_fn alloc, void *pw, void **language); css_error css_language_destroy(css_language *language); #endif diff --git a/src/parse/parse.c b/src/parse/parse.c index 7ac64da..c1b8143 100644 --- a/src/parse/parse.c +++ b/src/parse/parse.c @@ -107,7 +107,7 @@ struct css_parser css_parser_event_handler event; /**< Client's event handler */ void *event_pw; /**< Client data for event handler */ - css_alloc alloc; /**< Memory (de)allocation function */ + css_allocator_fn alloc; /**< Memory (de)allocation function */ void *pw; /**< Client-specific private data */ }; @@ -187,7 +187,7 @@ static css_error (*parseFuncs[])(css_parser *parser) = { * CSS_NOMEM on memory exhaustion */ css_error css_parser_create(const char *charset, css_charset_source cs_source, - parserutils_hash *dictionary, css_alloc alloc, void *pw, + parserutils_hash *dictionary, css_allocator_fn alloc, void *pw, css_parser **parser) { css_parser *p; diff --git a/src/parse/parse.h b/src/parse/parse.h index 1533f7a..5dc1b18 100644 --- a/src/parse/parse.h +++ b/src/parse/parse.h @@ -57,7 +57,7 @@ typedef union css_parser_optparams { } css_parser_optparams; css_error css_parser_create(const char *charset, css_charset_source cs_source, - parserutils_hash *dict, css_alloc alloc, void *pw, + parserutils_hash *dict, css_allocator_fn alloc, void *pw, css_parser **parser); css_error css_parser_destroy(css_parser *parser); diff --git a/src/select/computed.c b/src/select/computed.c index 55036cf..3e01b9c 100644 --- a/src/select/computed.c +++ b/src/select/computed.c @@ -21,7 +21,7 @@ * CSS_NOMEM on memory exhaustion, * CSS_BADPARM on bad parameters. */ -css_error css_computed_style_create(css_alloc alloc, void *pw, +css_error css_computed_style_create(css_allocator_fn alloc, void *pw, css_computed_style **result) { css_computed_style *s; diff --git a/src/select/hash.c b/src/select/hash.c index 7eee644..2a30a5f 100644 --- a/src/select/hash.c +++ b/src/select/hash.c @@ -22,7 +22,7 @@ struct css_selector_hash { hash_entry *slots; - css_alloc alloc; + css_allocator_fn alloc; void *pw; }; @@ -39,7 +39,7 @@ static inline uint32_t _hash_name(const parserutils_hash_entry *name); * \param hash Pointer to location to receive result * \return CSS_OK on success, appropriate error otherwise */ -css_error css_selector_hash_create(css_alloc alloc, void *pw, +css_error css_selector_hash_create(css_allocator_fn alloc, void *pw, css_selector_hash **hash) { css_selector_hash *h; diff --git a/src/select/hash.h b/src/select/hash.h index 8ca1653..2f388b7 100644 --- a/src/select/hash.h +++ b/src/select/hash.h @@ -18,7 +18,7 @@ struct css_selector; typedef struct css_selector_hash css_selector_hash; -css_error css_selector_hash_create(css_alloc alloc, void *pw, +css_error css_selector_hash_create(css_allocator_fn alloc, void *pw, css_selector_hash **hash); css_error css_selector_hash_destroy(css_selector_hash *hash); diff --git a/src/select/select.c b/src/select/select.c index 19b544e..303ba68 100644 --- a/src/select/select.c +++ b/src/select/select.c @@ -29,7 +29,7 @@ struct css_select_ctx { const css_stylesheet **sheets; /**< Array of sheets */ - css_alloc alloc; /**< Allocation routine */ + css_allocator_fn alloc; /**< Allocation routine */ void *pw; /**< Client-specific private data */ }; @@ -231,7 +231,7 @@ static struct prop_table { * \param result Pointer to location to receive created context * \return CSS_OK on success, appropriate error otherwise. */ -css_error css_select_ctx_create(css_alloc alloc, void *pw, +css_error css_select_ctx_create(css_allocator_fn alloc, void *pw, css_select_ctx **result) { css_select_ctx *c; diff --git a/src/stylesheet.c b/src/stylesheet.c index 40230e1..4174859 100644 --- a/src/stylesheet.c +++ b/src/stylesheet.c @@ -39,7 +39,7 @@ css_error css_stylesheet_create(css_language_level level, const char *charset, const char *url, const char *title, css_origin origin, uint64_t media, css_import_handler import_callback, void *import_pw, - css_alloc alloc, void *alloc_pw, css_stylesheet **stylesheet) + css_allocator_fn alloc, void *alloc_pw, css_stylesheet **stylesheet) { parserutils_error perror; css_error error; diff --git a/src/stylesheet.h b/src/stylesheet.h index f1fb3fb..2b5860f 100644 --- a/src/stylesheet.h +++ b/src/stylesheet.h @@ -170,7 +170,7 @@ struct css_stylesheet { parserutils_hash *dictionary; /**< String dictionary */ - css_alloc alloc; /**< Allocation function */ + css_allocator_fn alloc; /**< Allocation function */ void *pw; /**< Private word */ }; -- cgit v1.2.3