summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@gnome.org>2003-12-27 17:48:12 +0000
committerDodji Seketeli <dodji@src.gnome.org>2003-12-27 17:48:12 +0000
commit0770337b2b35ea9ece19ef37de8efcb9cc828e99 (patch)
tree4a62cd48c82e6f325df88f8f9effd929c259260a /src
parentd502de118110eccf135cca563f8c535759f743e4 (diff)
downloadlibcroco-0770337b2b35ea9ece19ef37de8efcb9cc828e99.tar.gz
did some fixes/cleanup here. Make sure csslint --help shows a proper help.
2003-12-27 Dodji Seketeli <dodji@gnome.org> * csslint/csslint.c: did some fixes/cleanup here. Make sure csslint --help shows a proper help. * src/parser/cr-statement.c: (cr_statement_dump): when a NULL statement is given, do not dump anything, instead considering this as an error. * src/parser/cr-stylesheet.c: (cr_stylesheet_dump): give the possibility to dump empty sheets, instead of considering this case as an error case.
Diffstat (limited to 'src')
-rw-r--r--src/parser/cr-parser.c5
-rw-r--r--src/parser/cr-statement.c4
-rw-r--r--src/parser/cr-stylesheet.c4
-rw-r--r--src/parser/cr-utils.c2
4 files changed, 9 insertions, 6 deletions
diff --git a/src/parser/cr-parser.c b/src/parser/cr-parser.c
index d6252a5..c580799 100644
--- a/src/parser/cr-parser.c
+++ b/src/parser/cr-parser.c
@@ -176,7 +176,7 @@ if ((status) != CR_OK) \
*on the parser error stack when an error arises.
*@param a_this the current instance of #CRParser .
*@param a_status the status to check. Is of type enum #CRStatus.
- *@param a_is_exception in case of error, if is FALSE, the status
+ *@param a_is_exception in case of error, if is TRUE, the status
*is set to CR_PARSING_ERROR before goto error. If is false, the
*real low level status is kept and will be returned by the
*upper level function that called this macro. Usally,this must
@@ -4001,7 +4001,7 @@ cr_parser_parse_ruleset (CRParser *a_this)
}
}
- CHECK_PARSING_STATUS_ERR
+ CHECK_PARSING_STATUS_ERR
(a_this, status, FALSE,
"while parsing ruleset: next construction should be a declaration",
CR_SYNTAX_ERROR) ;
@@ -4018,6 +4018,7 @@ cr_parser_parse_ruleset (CRParser *a_this)
status = cr_parser_parse_declaration (a_this, &property,
&expr) ;
+
if (expr)
{
cr_term_ref (expr) ;
diff --git a/src/parser/cr-statement.c b/src/parser/cr-statement.c
index 88ef9c0..a857680 100644
--- a/src/parser/cr-statement.c
+++ b/src/parser/cr-statement.c
@@ -2303,7 +2303,9 @@ cr_statement_at_font_face_rule_add_decl (CRStatement *a_this,
void
cr_statement_dump (CRStatement *a_this, FILE *a_fp, gulong a_indent)
{
- g_return_if_fail (a_this) ;
+
+ if (!a_this)
+ return ;
if (a_this->prev)
{
diff --git a/src/parser/cr-stylesheet.c b/src/parser/cr-stylesheet.c
index 4b3cba6..06b1c5f 100644
--- a/src/parser/cr-stylesheet.c
+++ b/src/parser/cr-stylesheet.c
@@ -3,7 +3,7 @@
/*
* This file is part of The Croco Library
*
- * Copyright (C) 2002-2003 Dodji Seketeli <dodji@seketeli.org>
+ * Copyright (C) 2002-2003 Dodji Seketeli <dodji seketeli.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2.1 of the GNU Lesser General Public
@@ -68,7 +68,7 @@ cr_stylesheet_dump (CRStyleSheet *a_this, FILE *a_fp)
{
CRStatement * cur_stmt = NULL ;
- g_return_if_fail (a_this && a_this->statements) ;
+ g_return_if_fail (a_this) ;
for (cur_stmt = a_this->statements ;
cur_stmt ;
diff --git a/src/parser/cr-utils.c b/src/parser/cr-utils.c
index cbc4593..4c7c00a 100644
--- a/src/parser/cr-utils.c
+++ b/src/parser/cr-utils.c
@@ -3,7 +3,7 @@
/*
* This file is part of The Croco Library
*
- * Copyright (C) 2002-2003 Dodji Seketeli <dodji@seketeli.org>
+ * Copyright (C) 2002-2003 Dodji Seketeli <dodji at seketeli.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2.1 of the GNU Lesser General Public