diff options
author | Shaun McCance <shaunm@src.gnome.org> | 2007-04-12 17:21:16 +0000 |
---|---|---|
committer | Shaun McCance <shaunm@src.gnome.org> | 2007-04-12 17:21:16 +0000 |
commit | 08457617ea71d3d02c3f66e74034076653636152 (patch) | |
tree | e79d5bc553932878c34bc68107519ee9b45d5c0b | |
parent | e64bd0a23bff5349bebc29946e11a30c92fde8ca (diff) | |
download | yelp-08457617ea71d3d02c3f66e74034076653636152.tar.gz |
- Made yelp-man-parser use yelp-debug
* src/yelp-man-parser.c:
* src/Makefile.am:
- Made yelp-man-parser use yelp-debug
svn path=/branches/yelp-document/; revision=2800
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/yelp-man-parser.c | 13 |
3 files changed, 14 insertions, 6 deletions
@@ -1,3 +1,9 @@ +2007-04-12 Shaun McCance <shaunm@gnome.org> + + * src/yelp-man-parser.c: + * src/Makefile.am: + - Made yelp-man-parser use yelp-debug + 2007-04-11 Shaun McCance <shaunm@gnome.org> * src/yelp-error.c: diff --git a/src/Makefile.am b/src/Makefile.am index ba7e7a23..f2fe1987 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -120,6 +120,7 @@ test_document_LDADD = $(YELP_LIBS) test_document_LDFLAGS = $(AM_LDFLAGS) test_man_parser_SOURCES = \ + yelp-debug.c yelp-debug.h \ yelp-error.c yelp-error.h \ yelp-io-channel.c yelp-io-channel.h \ yelp-man-parser.c yelp-man-parser.h \ diff --git a/src/yelp-man-parser.c b/src/yelp-man-parser.c index c01a86d3..edba95c5 100644 --- a/src/yelp-man-parser.c +++ b/src/yelp-man-parser.c @@ -29,6 +29,7 @@ #include <libxml/tree.h> #include <string.h> +#include "yelp-debug.h" #include "yelp-io-channel.h" #include "yelp-man-parser.h" @@ -573,7 +574,7 @@ macro_url_handler (YelpManParser *parser, gchar *macro, GSList *args) tmpNode = parser_stack_pop_node (parser, "UR"); if (tmpNode == NULL) - d (g_warning ("Found unexpected tag: '%s'\n", macro)); + debug_print (DB_WARN, "Found unexpected tag: '%s'\n", macro); else parser->ins = tmpNode->parent; } else @@ -670,7 +671,7 @@ macro_mandoc_list_handler (YelpManParser *parser, gchar *macro, GSList *args) tmpNode = parser_stack_pop_node (parser, "Bl"); if (tmpNode == NULL) - d (g_warning ("Found unexpected tag: '%s'\n", macro)); + debug_print (DB_WARN, "Found unexpected tag: '%s'\n", macro); else parser->ins = tmpNode->parent; } @@ -689,7 +690,7 @@ macro_verbatim_handler (YelpManParser *parser, gchar *macro, GSList *args) tmpNode = parser_stack_pop_node (parser, "Verbatim"); if (tmpNode == NULL) - d (g_warning ("Found unexpected tag: '%s'\n", macro)); + debug_print (DB_WARN, "Found unexpected tag: '%s'\n", macro); else parser->ins = tmpNode->parent; } @@ -1234,7 +1235,7 @@ get_argument: } else if (g_str_equal (str, "TE")) { /* We should only see this from within parser_parse_table */ - d (g_warning ("Found unexpected tag: '%s'\n", str)); + debug_print (DB_WARN, "Found unexpected tag: '%s'\n", str); g_free (str); } /* "ie" and "if" are conditional macros in groff @@ -1419,7 +1420,7 @@ parser_append_given_text_handle_escapes (YelpManParser *parser, gchar *text, gbo if (g_str_equal (str, "fI") || g_str_equal (str, "fB")) parser->ins = parser_append_node (parser, str); else if (!g_str_equal (str, "fR") && !g_str_equal (str, "fP")) - d (g_warning ("No rule matching the tag '%s'\n", str)); + debug_print (DB_WARN, "No rule matching the tag '%s'\n", str); g_free (str); anc = ptr; @@ -1766,7 +1767,7 @@ parser_parse_table (YelpManParser *parser) if (*(parser->buffer + 1) == 'T' && *(parser->buffer + 2) == 'E') { if (parser_stack_pop_node (parser, "TABLE") == NULL) - d (g_warning ("Found unexpected tag: 'TE'\n")); + debug_print (DB_WARN, "Found unexpected tag: 'TE'\n"); else { parser->ins = table_start; |