65 g_return_val_if_fail (a_this && a_attr_sel,
68 for (cur_sel = a_this;
70 cur_sel = cur_sel->
next) ;
72 cur_sel->
next = a_attr_sel;
73 a_attr_sel->
prev = cur_sel;
91 g_return_val_if_fail (a_this && a_attr_sel,
94 a_attr_sel->
next = a_this;
95 a_this->
prev = a_attr_sel;
111 guchar *result = NULL;
112 GString *str_buf = NULL;
114 g_return_val_if_fail (a_this, NULL);
116 str_buf = g_string_new (NULL);
118 for (cur = a_this; cur; cur = cur->
next) {
120 g_string_append_c (str_buf,
' ');
126 name = (guchar *) g_strndup (cur->
name->stryng->str,
127 cur->
name->stryng->len);
129 g_string_append (str_buf, (
const gchar *) name);
136 guchar *value = NULL;
138 value = (guchar *) g_strndup (cur->
value->stryng->str,
139 cur->
value->stryng->len);
146 g_string_append_c (str_buf,
'=');
150 g_string_append (str_buf,
"~=");
154 g_string_append (str_buf,
"|=");
161 g_string_append_printf
162 (str_buf,
"\"%s\"", value);
171 result = (guchar *) str_buf->str;
172 g_string_free (str_buf, FALSE);
189 guchar *tmp_str = NULL;
191 g_return_if_fail (a_this);
196 fprintf (a_fp,
"%s", tmp_str);
213 g_return_if_fail (a_this);
222 a_this->
value = NULL;
enum AttrMatchWay match_way
guchar * cr_attr_sel_to_string(CRAttrSel const *a_this)
cr_attr_sel_to_string: @a_this: the current instance of CRAttrSel.
void cr_string_destroy(CRString *a_this)
enum CRStatus cr_attr_sel_prepend_attr_sel(CRAttrSel *a_this, CRAttrSel *a_attr_sel)
cr_attr_sel_prepend_attr_sel: @a_this: the "this pointer" of the current instance *of CRAttrSel.
CRStatus
The status type returned by the methods of the croco library.
CRAttrSel * cr_attr_sel_new(void)
CRAttrSel:
enum CRStatus cr_attr_sel_append_attr_sel(CRAttrSel *a_this, CRAttrSel *a_attr_sel)
cr_attr_sel_append_attr_sel: @a_this: the this pointer of the current instance of CRAttrSel.
void cr_attr_sel_destroy(CRAttrSel *a_this)
cr_attr_sel_destroy: @a_this: the "this pointer" of the current instance of CRAttrSel.
void cr_attr_sel_dump(CRAttrSel const *a_this, FILE *a_fp)
cr_attr_sel_dump: @a_this: the "this pointer" of the current instance of CRAttrSel.