49 result->simple_sel = a_simple_sel;
58 g_return_val_if_fail (a_char_buf, NULL);
62 g_return_val_if_fail (parser, NULL);
87 for (cur = a_this; cur && cur->next; cur = cur->next) ;
110 a_new->next = a_this;
111 a_this->prev = a_new;
113 for (cur = a_new; cur && cur->prev; cur = cur->prev) ;
135 g_return_val_if_fail (selector, NULL);
143 guchar *result = NULL;
144 GString *str_buf = NULL;
146 str_buf = g_string_new (NULL);
147 g_return_val_if_fail (str_buf, NULL);
152 for (cur = a_this; cur; cur = cur->next) {
153 if (cur->simple_sel) {
154 guchar *tmp_str = NULL;
161 g_string_append (str_buf,
164 g_string_append (str_buf, (
const gchar *) tmp_str);
174 result = (guchar *) str_buf->str;
175 g_string_free (str_buf, FALSE);
193 guchar *tmp_buf = NULL;
198 fprintf (a_fp,
"%s", tmp_buf);
216 g_return_if_fail (a_this);
237 g_return_val_if_fail (a_this, FALSE);
239 if (a_this->ref_count) {
243 if (a_this->ref_count == 0) {
263 g_return_if_fail (a_this);
269 for (cur = a_this; cur && cur->next; cur = cur->next) {
270 if (cur->simple_sel) {
272 cur->simple_sel = NULL;
277 if (cur->simple_sel) {
279 cur->simple_sel = NULL;
284 if (cur && !cur->prev) {
290 for (cur = cur->prev; cur && cur->prev; cur = cur->prev) {
The implementation of the SAC parser.
void cr_selector_destroy(CRSelector *a_this)
cr_selector_destroy:
guchar * cr_simple_sel_to_string(CRSimpleSel const *a_this)
The declaration file of the CRSelector file.
CREncoding
Encoding values.
gboolean cr_selector_unref(CRSelector *a_this)
cr_selector_unref:
typedefG_BEGIN_DECLS struct _CRSelector CRSelector
The abstraction of a css2 simple selection list as defined by the right part of the "selector" produc...
CRSelector * cr_selector_append(CRSelector *a_this, CRSelector *a_new)
cr_selector_append:
void cr_simple_sel_destroy(CRSimpleSel *a_this)
cr_simple_sel_destroy:
CRSelector * cr_selector_append_simple_sel(CRSelector *a_this, CRSimpleSel *a_simple_sel)
cr_selector_append_simple_sel:
CRSelector * cr_selector_new(CRSimpleSel *a_simple_sel)
cr_selector_new:
CRParser * cr_parser_new_from_buf(guchar *a_buf, gulong a_len, enum CREncoding a_enc, gboolean a_free_buf)
cr_parser_new_from_buf: @a_buf: the buffer to parse.
guchar * cr_selector_to_string(CRSelector const *a_this)
void cr_selector_ref(CRSelector *a_this)
cr_selector_ref:
CRSelector * cr_selector_prepend(CRSelector *a_this, CRSelector *a_new)
cr_selector_prepend:
The declaration file of the CRParser class.
CRSelector * cr_selector_parse_from_buf(const guchar *a_char_buf, enum CREncoding a_enc)
#define cr_utils_trace_info(a_msg)
Traces an info message.
void cr_selector_dump(CRSelector const *a_this, FILE *a_fp)
cr_selector_dump: