/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
/*
* This file is part of The Croco Library
*
* modify it under the terms of version 2.1 of the GNU Lesser General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* Author: Dodji Seketeli.
* See COPYRIGHTS files for copyrights information.
*/
#include <string.h>
#include "cr-statement.h"
#include "cr-parser.h"
/**
*@file
*Definition of the #CRStatement class.
*/
static void
{
(void) a_location;
}
static void
{
cr_utils_trace_info ("Couldn't get parsing context. "
"This may lead to some memory leaks.");
return;
}
if (stmt) {
return;
}
}
static void
{
(void) a_important;
if (!decl) {
cr_utils_trace_info ("cr_declaration_new () failed.");
goto error;
}
decl);
goto error;
if (decl) {
}
if (name) {
}
}
static void
{
}
static void
{
(void) a_location;
if (a_name)
if (a_pseudo_page)
pseudo_name = NULL ;
}
static void
{
cr_utils_trace_info ("Couldn't get parsing context. "
"This may lead to some memory leaks.");
return;
}
if (stmt) {
}
}
static void
{
}
static void
{
(void) a_name;
(void) a_pseudo_page;
}
static void
{
(void) a_location;
if (a_media_list) {
/*duplicate media list */
(a_media_list);
}
/*make sure cr_statement_new_at_media_rule works in this case. */
}
static void
{
cr_utils_trace_info ("Couldn't get parsing context. "
"This may lead to some memory leaks.");
return;
}
if (stmt) {
}
}
static void
{
at_media_ptr = &at_media;
}
static void
{
/*
*the current ruleset stmt, child of the
*current at-media being parsed.
*/
}
static void
{
/*
*the current ruleset stmt, child of the
*current at-media being parsed.
*/
}
static void
{
(void) a_media_list;
at_media_ptr = &at_media;
(gpointer *) at_media_ptr);
}
static void
{
}
static void
{
cr_utils_trace_info ("Couldn't get parsing context. "
"This may lead to some memory leaks.");
return;
}
if (stmt) {
}
}
static void
{
rulesetptr = &ruleset;
&& ruleset
}
static void
{
&& result
}
static void
{
case AT_RULE_STMT:
break;
case RULESET_STMT:
return;
}
}
break;
case AT_IMPORT_RULE_STMT:
return;
}
break;
case AT_MEDIA_RULE_STMT:
return;
}
}
}
}
break;
case AT_PAGE_RULE_STMT:
return;
}
}
}
break;
case AT_CHARSET_RULE_STMT:
return;
}
break;
case AT_FONT_FACE_RULE_STMT:
return;
}
break;
default:
break;
}
}
/**
* cr_statement_ruleset_to_string:
*
*@a_this: the current instance of #CRStatement
*@a_indent: the number of whitespace to use for indentation
*
*Serializes the ruleset statement into a string
*
*Returns the newly allocated serialised string. Must be freed
*by the caller, using g_free().
*/
static gchar *
{
if (!stringue) {
return result;
}
if (a_indent)
tmp_str =
sel_list);
if (tmp_str) {
}
}
if (tmp_str) {
}
}
if (tmp_str) {
}
return result;
}
/**
* cr_statement_font_face_rule_to_string:
*
*@a_this: the current instance of #CRStatement to consider
*It must be a font face rule statement.
*@a_indent: the number of white spaces of indentation.
*
*Serializes a font face rule statement into a string.
*
*Returns the serialized string. Must be deallocated by the caller
*using g_free().
*/
static gchar *
{
NULL);
if (a_indent)
a_indent);
if (tmp_str) {
tmp_str) ;
}
}
if (stringue) {
}
return result ;
}
/**
* cr_statement_charset_to_string:
*
*Serialises an \@charset statement into a string.
*@a_this: the statement to serialize.
*@a_indent: the number of indentation spaces
*
*Returns the serialized charset statement. Must be
*freed by the caller using g_free().
*/
static gchar *
{
NULL) ;
"@charset \"%s\" ;", str);
if (str) {
}
}
if (stringue) {
}
return str ;
}
/**
* cr_statement_at_page_rule_to_string:
*
*Serialises the at page rule statement into a string
*@a_this: the current instance of #CRStatement. Must
*be an "\@page" rule statement.
*
*Returns the serialized string. Must be freed by the caller
*/
static gchar *
{
(stringue, " %s",
} else {
}
(stringue, " :%s",
}
if (str) {
}
}
return result ;
}
/**
*Serializes an \@media statement.
*@param a_this the current instance of #CRStatement
*@param a_indent the number of spaces of indentation.
*@return the serialized \@media statement. Must be freed
*by the caller using g_free().
*/
static gchar *
{
NULL);
if (str2) {
(stringue,
",");
}
(stringue,
" %s", str2);
}
}
}
if (str) {
}
}
if (stringue) {
}
return str ;
}
static gchar *
{
NULL) ;
if (str) {
"@import url(\"%s\")",
str);
} else /*there is no url, so no import rule, get out! */
return NULL;
(stringue, ", ");
}
if (crstr
(stringue,
}
}
}
}
}
if (stringue) {
}
return str ;
}
/*******************
*public functions
******************/
/**
* cr_statement_does_buf_parses_against_core:
*
*@a_buf: the buffer to parse.
*@a_encoding: the character encoding of a_buf.
*
*Tries to parse a buffer and says whether if the content of the buffer
*is a css statement as defined by the "Core CSS Grammar" (chapter 4 of the
*css spec) or not.
*
*Returns TRUE if the buffer parses against the core grammar, false otherwise.
*/
enum CREncoding a_encoding)
{
a_encoding, FALSE);
goto cleanup;
}
}
if (parser) {
}
return result;
}
/**
* cr_statement_parse_from_buf:
*
*@a_buf: the buffer to parse.
*@a_encoding: the character encoding of a_buf.
*
*Parses a buffer that contains a css statement and returns
*an instance of #CRStatement in case of successful parsing.
*TODO: at support of "\@import" rules.
*
*Returns the newly built instance of #CRStatement in case
*of successful parsing, NULL otherwise.
*/
{
/*
*The strategy of this function is "brute force".
*It tries to parse all the types of CRStatement it knows about.
*I could do this a smarter way but I don't have the time now.
*I think I will revisit this when time of performances and
*pull based incremental parsing comes.
*/
if (!result) {
(a_buf, a_encoding);
} else {
goto out;
}
if (!result) {
(a_buf, a_encoding);
} else {
goto out;
}
if (!result) {
(a_buf, a_encoding);
} else {
goto out;
}
if (!result) {
(a_buf, a_encoding);
} else {
goto out;
}
if (!result) {
(a_buf, a_encoding);
} else {
goto out;
}
if (!result) {
(a_buf, a_encoding);
} else {
goto out;
}
out:
return result;
}
/**
* cr_statement_ruleset_parse_from_buf:
*
*@a_buf: the buffer to parse.
*@a_enc: the character encoding of a_buf.
*
*Parses a buffer that contains a ruleset statement and instanciates
*a #CRStatement of type RULESET_STMT.
*
*Returns the newly built instance of #CRStatement in case of successful parsing,
*NULL otherwise.
*/
enum CREncoding a_enc)
{
goto cleanup;
}
if (result) {
}
}
if (parser) {
sac_handler = NULL ;
}
if (sac_handler) {
sac_handler = NULL;
}
return result;
}
/**
* cr_statement_new_ruleset:
*
*@a_sel_list: the list of #CRSimpleSel (selectors)
*the rule applies to.
*@a_decl_list: the list of instances of #CRDeclaration
*that composes the ruleset.
*@a_media_types: a list of instances of GString that
*describe the media list this ruleset applies to.
*
*Creates a new instance of #CRStatement of type
*#CRRulSet.
*
*Returns the new instance of #CRStatement or NULL if something
*went wrong.
*/
{
if (a_parent_media_rule) {
NULL);
NULL);
}
if (!result) {
cr_utils_trace_info ("Out of memory");
return NULL;
}
cr_utils_trace_info ("Out of memory");
if (result)
return NULL;
}
if (a_sel_list)
if (a_parent_media_rule) {
result);
}
return result;
}
/**
* cr_statement_at_media_rule_parse_from_buf:
*
*@a_buf: the input to parse.
*@a_enc: the encoding of the buffer.
*
*Parses a buffer that contains an "\@media" declaration
*and builds an \@media css statement.
*
*Returns the \@media statement, or NULL if the buffer could not
*be successfully parsed.
*/
enum CREncoding a_enc)
{
if (!parser) {
cr_utils_trace_info ("Instanciation of the parser failed");
goto cleanup;
}
if (!sac_handler) {
("Instanciation of the sac handler failed");
goto cleanup;
}
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
if (parser) {
sac_handler = NULL ;
}
if (sac_handler) {
sac_handler = NULL;
}
return result;
}
/**
* cr_statement_new_at_media_rule:
*
*@a_ruleset: the ruleset statements contained
*in the \@media rule.
*@a_media: the media string list. A list of GString pointers.
*
*Instanciates an instance of #CRStatement of type
*AT_MEDIA_RULE_STMT (\@media ruleset).
*
*/
{
if (a_rulesets)
if (!result) {
cr_utils_trace_info ("Out of memory");
return NULL;
}
cr_utils_trace_info ("Out of memory");
return NULL;
}
cr_utils_trace_info ("Bad parameter a_rulesets. "
"It should be a list of "
"correct ruleset statement only !");
goto error;
}
}
if (a_sheet) {
}
return result;
return NULL;
}
/**
* cr_statement_new_at_import_rule:
*
*@a_url: the url to connect to the get the file
*to be imported.
*@a_sheet: the imported parsed stylesheet.
*
*Creates a new instance of #CRStatment of type
*#CRAtImportRule.
*
*Returns the newly built instance of #CRStatement.
*/
{
if (!result) {
cr_utils_trace_info ("Out of memory");
return NULL;
}
cr_utils_trace_info ("Out of memory");
return NULL;
}
if (a_container_sheet)
return result;
}
/**
* cr_statement_at_import_rule_parse_from_buf:
*
*@a_buf: the buffer to parse.
*@a_encoding: the encoding of a_buf.
*
*Parses a buffer that contains an "\@import" rule and
*instanciate a #CRStatement of type AT_IMPORT_RULE_STMT
*
*Returns the newly built instance of #CRStatement in case of
*a successful parsing, NULL otherwise.
*/
enum CREncoding a_encoding)
{
a_encoding, FALSE);
if (!parser) {
cr_utils_trace_info ("Instanciation of parser failed.");
goto cleanup;
}
goto cleanup;
&location);
goto cleanup;
media_list, NULL);
if (result) {
&location) ;
media_list = NULL;
}
if (parser) {
}
if (media_list) {
for (; media_list;
if (media_list->data) {
}
}
media_list = NULL;
}
if (import_string) {
}
return result;
}
/**
* cr_statement_new_at_page_rule:
*
*@a_decl_list: a list of instances of #CRDeclarations
*which is actually the list of declarations that applies to
*this page rule.
*@a_selector: the page rule selector.
*
*Creates a new instance of #CRStatement of type
*#CRAtPageRule.
*
*Returns the newly built instance of #CRStatement or NULL
*in case of error.
*/
{
if (!result) {
cr_utils_trace_info ("Out of memory");
return NULL;
}
cr_utils_trace_info ("Out of memory");
return NULL;
}
if (a_decl_list) {
}
if (a_sheet)
return result;
}
/**
* cr_statement_at_page_rule_parse_from_buf:
*
*@a_buf: the character buffer to parse.
*@a_encoding: the character encoding of a_buf.
*
*Parses a buffer that contains an "\@page" production and,
*if the parsing succeeds, builds the page statement.
*
*Returns the newly built at page statement in case of successful parsing,
*NULL otherwise.
*/
enum CREncoding a_encoding)
{
a_encoding, FALSE);
if (!parser) {
cr_utils_trace_info ("Instanciation of the parser failed.");
goto cleanup;
}
if (!sac_handler) {
("Instanciation of the sac handler failed.");
goto cleanup;
}
goto cleanup;
/*Now, invoke the parser to parse the "@page production" */
goto cleanup;
goto cleanup;
if (parser) {
sac_handler = NULL ;
}
if (sac_handler) {
sac_handler = NULL;
}
return result;
}
/**
* cr_statement_new_at_charset_rule:
*
*@a_charset: the string representing the charset.
*Note that the newly built instance of #CRStatement becomes
*the owner of a_charset. The caller must not free a_charset !!!.
*
*Creates a new instance of #CRStatement of type
*#CRAtCharsetRule.
*
*Returns the newly built instance of #CRStatement or NULL
*if an error arises.
*/
{
if (!result) {
cr_utils_trace_info ("Out of memory");
return NULL;
}
cr_utils_trace_info ("Out of memory");
return NULL;
}
return result;
}
/**
* cr_statement_at_charset_rule_parse_from_buf:
*
*@a_buf: the buffer to parse.
*@a_encoding: the character encoding of the buffer.
*
*Parses a buffer that contains an '\@charset' rule and
*creates an instance of #CRStatement of type AT_CHARSET_RULE_STMT.
*
*Returns the newly built instance of #CRStatement.
*/
enum CREncoding a_encoding)
{
a_encoding, FALSE);
if (!parser) {
cr_utils_trace_info ("Instanciation of the parser failed.");
goto cleanup;
}
/*Now, invoke the parser to parse the "@charset production" */
goto cleanup;
goto cleanup;
if (result)
if (parser) {
}
if (charset) {
}
return result;
}
/**
* cr_statement_new_at_font_face_rule:
*
*@a_font_decls: a list of instances of #CRDeclaration. Each declaration
*is actually a font declaration.
*
*Creates an instance of #CRStatement of type #CRAtFontFaceRule.
*
*Returns the newly built instance of #CRStatement.
*/
{
if (!result) {
cr_utils_trace_info ("Out of memory");
return NULL;
}
(sizeof (CRAtFontFaceRule));
cr_utils_trace_info ("Out of memory");
return NULL;
}
if (a_sheet)
return result;
}
/**
* cr_statement_font_face_rule_parse_from_buf:
*
*
*@a_buf: the buffer to parse.
*@a_encoding: the character encoding of a_buf.
*
*Parses a buffer that contains an "\@font-face" rule and builds
*an instance of #CRStatement of type AT_FONT_FACE_RULE_STMT out of it.
*
*Returns the newly built instance of #CRStatement in case of successufull
*parsing, NULL otherwise.
*/
enum CREncoding a_encoding)
{
a_encoding, FALSE);
if (!parser)
goto cleanup;
if (!sac_handler)
goto cleanup;
/*
*set sac callbacks here
*/
goto cleanup;
/*
*cleanup spaces of comment that may be there before the real
*"@font-face" thing.
*/
goto cleanup;
goto cleanup;
goto cleanup;
if (parser) {
sac_handler = NULL ;
}
if (sac_handler) {
sac_handler = NULL;
}
return result;
}
/**
* cr_statement_set_parent_sheet:
*
*@a_this: the current instance of #CRStatement.
*@a_sheet: the sheet that contains the current statement.
*
*Sets the container stylesheet.
*
*Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
{
return CR_OK;
}
/**
* cr_statement_get_parent_sheet:
*
*@a_this: the current #CRStatement.
*@a_sheet: out parameter. A pointer to the sheets that
*
*Gets the sheets that contains the current statement.
*
*Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
{
return CR_OK;
}
/**
* cr_statement_append:
*
*@a_this: the current instance of the statement list.
*@a_new: a_new the new instance of #CRStatement to append.
*
*Appends a new statement to the statement list.
*
*Returns the new list statement list, or NULL in cas of failure.
*/
{
if (!a_this) {
return a_new;
}
/*walk forward in the current list to find the tail list element */
return a_this;
}
/**
* cr_statement_prepend:
*
*@a_this: the current instance of #CRStatement.
*@a_new: the new statement to prepend.
*
*Prepends the an instance of #CRStatement to
*the current statement list.
*
*Returns the new list with the new statement prepended,
*or NULL in case of an error.
*/
{
if (!a_this)
return a_new;
/*walk backward in the prepended list to find the head list element */
return cur;
}
/**
* cr_statement_unlink:
*
*@a_this: the current statements list.
*@a_to_unlink: the statement to unlink from the list.
*
*Unlinks a statement from the statements list.
*
*Returns the new list where a_to_unlink has been unlinked
*from, or NULL in case of error.
*/
{
/**
*Some sanity checks first
*/
}
}
/**
*Now, the real unlinking job.
*/
}
}
if (a_stmt->parent_sheet
}
return result;
}
/**
* cr_statement_nr_rules:
*
*@a_this: the current instance of #CRStatement.
*
*Gets the number of rules in the statement list;
*
*Returns number of rules in the statement list.
*/
{
int nr = 0;
nr++;
return nr;
}
/**
* cr_statement_get_from_list:
*
*@a_this: the current instance of #CRStatement.
*@itemnr: the index into the statement list.
*
*Use an index to get a CRStatement from the statement list.
*
*Returns CRStatement at position itemnr, if itemnr > number of statements - 1,
*it will return NULL.
*/
{
int nr = 0;
return cur;
return NULL;
}
/**
* cr_statement_ruleset_set_sel_list:
*
*@a_this: the current ruleset statement.
*@a_sel_list: the selector list to set. Note
*that this function increments the ref count of a_sel_list.
*The sel list will be destroyed at the destruction of the
*current instance of #CRStatement.
*
*Sets a selector list to a ruleset statement.
*
*Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
{
if (a_sel_list)
return CR_OK;
}
/**
* cr_statement_ruleset_get_declarations:
*
*@a_this: the current instance of #CRStatement.
*@a_decl_list: out parameter. A pointer to the returned
*list of declaration. Must not be NULL.
*
*Gets a pointer to the list of declaration contained
*in the ruleset statement.
*
*Returns CR_OK upon successful completion, an error code if something
*bad happened.
*/
enum CRStatus
{
return CR_OK;
}
/**
* cr_statement_ruleset_get_sel_list:
*
*@a_this: the current ruleset statement.
*@a_list: out parameter. The returned selector list,
*if and only if the function returned CR_OK.
*
*Gets a pointer to the selector list contained in
*the current ruleset statement.
*
*Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
{
return CR_OK;
}
/**
* cr_statement_ruleset_set_decl_list:
*
*@a_this: the current ruleset statement.
*@a_list: the declaration list to be added to the current
*ruleset statement.
*
*Sets a declaration list to the current ruleset statement.
*
*Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
{
return CR_OK;
}
return CR_OK;
}
/**
* cr_statement_ruleset_append_decl2:
*
*@a_this: the current statement.
*@a_prop: the property of the declaration.
*@a_value: the value of the declaration.
*
*Appends a declaration to the current ruleset statement.
*
*Returns CR_OK upon successful completion, an error code
*otherwise.
*/
enum CRStatus
{
return CR_OK;
}
/**
* cr_statement_ruleset_append_decl:
*
*Appends a declaration to the current statement.
*
*@a_this: the current statement.
*@a_declaration: the declaration to append.
*
*Returns CR_OK upon sucessful completion, an error code
*otherwise.
*/
enum CRStatus
{
return CR_OK;
}
/**
* cr_statement_at_import_rule_set_imported_sheet:
*
*Sets a stylesheet to the current \@import rule.
*@a_this: the current \@import rule.
*@a_sheet: the stylesheet. The stylesheet is owned
*by the current instance of #CRStatement, that is, the
*stylesheet will be destroyed when the current instance
*of #CRStatement is destroyed.
*
*Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
{
return CR_OK;
}
/**
* cr_statement_at_import_rule_get_imported_sheet:
*
*@a_this: the current \@import rule statement.
*@a_sheet: out parameter. The returned stylesheet if and
*only if the function returns CR_OK.
*
*Gets the stylesheet contained by the \@import rule statement.
*Returns CR_OK upon sucessful completion, an error code otherwise.
*/
enum CRStatus
CRStyleSheet ** a_sheet)
{
return CR_OK;
}
/**
* cr_statement_at_import_rule_set_url:
*
*@a_this: the current \@import rule statement.
*@a_url: the url to set.
*
*Sets an url to the current \@import rule statement.
*
*Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
{
}
return CR_OK;
}
/**
* cr_statement_at_import_rule_get_url:
*
*@a_this: the current \@import rule statement.
*@a_url: out parameter. The returned url if
*and only if the function returned CR_OK.
*
*Gets the url of the \@import rule statement.
*Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
{
return CR_OK;
}
/**
* cr_statement_at_media_nr_rules:
*
*@a_this: the current instance of #CRStatement.
*
*Returns the number of rules in the media rule;
*/
int
{
}
/**
* cr_statement_at_media_get_from_list:
*
*@a_this: the current instance of #CRStatement.
*@itemnr: the index into the media rule list of rules.
*
*Use an index to get a CRStatement from the media rule list of rules.
*
*Returns CRStatement at position itemnr, if itemnr > number of rules - 1,
*it will return NULL.
*/
{
itemnr);
}
/**
* cr_statement_at_page_rule_set_declarations:
*
*@a_this: the current \@page rule statement.
*@a_decl_list: the declaration list to add. Will be freed
*by the current instance of #CRStatement when it is destroyed.
*
*Sets a declaration list to the current \@page rule statement.
*
*Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
{
}
if (a_decl_list) {
}
return CR_OK;
}
/**
* cr_statement_at_page_rule_get_declarations:
*
*@a_this: the current \@page rule statement.
*@a_decl_list: out parameter. The returned declaration list.
*
*Gets the declaration list associated to the current \@page rule
*statement.
*
*Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
{
return CR_OK;
}
/**
* cr_statement_at_charset_rule_set_charset:
*
*
*@a_this: the current \@charset rule statement.
*@a_charset: the charset to set.
*
*Sets the charset of the current \@charset rule statement.
*
*Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
{
}
return CR_OK;
}
/**
* cr_statement_at_charset_rule_get_charset:
*@a_this: the current \@charset rule statement.
*@a_charset: out parameter. The returned charset string if
*and only if the function returned CR_OK.
*
*Gets the charset string associated to the current
*\@charset rule statement.
*
* Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
{
return CR_OK;
}
/**
* cr_statement_at_font_face_rule_set_decls:
*
*@a_this: the current \@font-face rule statement.
*@a_decls: the declarations list to set.
*
*Sets a declaration list to the current \@font-face rule statement.
*
*Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
{
}
return CR_OK;
}
/**
* cr_statement_at_font_face_rule_get_decls:
*
*@a_this: the current \@font-face rule statement.
*@a_decls: out parameter. The returned declaration list if
*and only if this function returns CR_OK.
*
*Gets the declaration list associated to the current instance
*of \@font-face rule statement.
*
*Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
CRDeclaration ** a_decls)
{
return CR_OK;
}
/**
* cr_statement_at_font_face_rule_add_decl:
*
*@a_this: the current \@font-face rule statement.
*@a_prop: the property of the declaration.
*@a_value: the value of the declaration.
*
*Adds a declaration to the current \@font-face rule
*statement.
*
*Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
{
return CR_OK;
}
/**
* cr_statement_to_string:
*
*@a_this: the current statement to serialize
*@a_indent: the number of white space of indentation.
*
*Serializes a css statement into a string
*
*Returns the serialized statement. Must be freed by the caller
*using g_free().
*/
gchar *
{
if (!a_this)
return NULL;
case RULESET_STMT:
break;
case AT_FONT_FACE_RULE_STMT:
break;
case AT_CHARSET_RULE_STMT:
break;
case AT_PAGE_RULE_STMT:
break;
case AT_MEDIA_RULE_STMT:
break;
case AT_IMPORT_RULE_STMT:
break;
default:
cr_utils_trace_info ("Statement unrecognized");
break;
}
return str ;
}
{
if (!stringue) {
cr_utils_trace_info ("Out of memory") ;
return NULL ;
}
if (str) {
} else {
}
}
}
return str ;
}
/**
* cr_statement_dump:
*
*@a_this: the current css2 statement.
*@a_fp: the destination file pointer.
*@a_indent: the number of white space indentation characters.
*
*Dumps the css2 statement to a file.
*/
void
{
if (!a_this)
return;
if (str) {
}
}
/**
* cr_statement_dump_ruleset:
*
*@a_this: the current instance of #CRStatement.
*@a_fp: the destination file pointer.
*@a_indent: the number of indentation white spaces to add.
*
*Dumps a ruleset statement to a file.
*/
void
{
if (str) {
}
}
/**
* cr_statement_dump_font_face_rule:
*
*@a_this: the current instance of font face rule statement.
*@a_fp: the destination file pointer.
*@a_indent: the number of white space indentation.
*
*Dumps a font face rule statement to a file.
*/
void
{
a_indent) ;
if (str) {
}
}
/**
* cr_statement_dump_charset:
*
*@a_this: the current instance of the \@charset rule statement.
*@a_fp: the destination file pointer.
*@a_indent: the number of indentation white spaces.
*
*Dumps an \@charset rule statement to a file.
*/
void
{
a_indent) ;
if (str) {
}
}
/**
* cr_statement_dump_page:
*
*@a_this: the statement to dump on stdout.
*@a_fp: the destination file pointer.
*@a_indent: the number of indentation white spaces.
*
*Dumps an \@page rule statement on stdout.
*/
void
{
if (str) {
}
}
/**
* cr_statement_dump_media_rule:
*
*@a_this: the statement to dump.
*@a_fp: the destination file pointer
*@a_indent: the number of white spaces indentation.
*
*Dumps an \@media rule statement to a file.
*/
void
{
if (str) {
}
}
/**
* cr_statement_dump_import_rule:
*
*@a_fp: the destination file pointer.
*@a_indent: the number of white space indentations.
*
*Dumps an \@import rule statement to a file.
*/
void
{
&& a_fp
if (str) {
}
}
/**
* cr_statement_destroy:
*
* @a_this: the current instance of #CRStatement.
*
*Destructor of #CRStatement.
*/
void
{
/*go get the tail of the list */
}
if (cur)
return;
}
/*walk backward and free next element */
}
}
if (!cur)
return;
/*free the one remaining list */
}
}