blob: 3f1a7d7edda035130ecff25f95ea370b333b83bd [file] [log] [blame]
Robert Bieberd5b24dd2010-05-25 15:19:52 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2010 Robert Bieber
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22
23#ifndef SKIN_DEBUG_H
24#define SKIN_DEBUG_H
25
Robert Bieberc5e14b52010-05-31 17:39:58 +000026#ifdef __cplusplus
27extern "C"
28{
29#endif
30
Jonathan Gordon2d31d772010-07-29 12:37:48 +000031#if !defined(ROCKBOX) || defined(__PCTOOL__)
32#define SKINPARSER_DEBUG
33#endif
34
Robert Bieberd5b24dd2010-05-25 15:19:52 +000035#include "skin_parser.h"
Jonathan Gordon2d31d772010-07-29 12:37:48 +000036#ifdef SKINPARSER_DEBUG
Robert Bieberd5b24dd2010-05-25 15:19:52 +000037/* Debugging functions */
Nils Wallménius804437a2010-07-31 16:30:22 +000038void skin_error(enum skin_errorcode error, const char* cursor);
Björn Stenbergf1a144a2010-06-17 11:04:32 +000039int skin_error_line(void);
Robert Bieber3c4fb8a2010-07-18 00:59:02 +000040int skin_error_col(void);
Björn Stenbergf1a144a2010-06-17 11:04:32 +000041char* skin_error_message(void);
42void skin_clear_errors(void);
Robert Bieberd5b24dd2010-05-25 15:19:52 +000043void skin_debug_tree(struct skin_element* root);
Jonathan Gordon2d31d772010-07-29 12:37:48 +000044void skin_error_format_message();
Robert Bieberd5b24dd2010-05-25 15:19:52 +000045
46/* Auxiliary debug functions */
47void skin_debug_params(int count, struct skin_tag_parameter params[]);
Björn Stenbergf1a144a2010-06-17 11:04:32 +000048void skin_debug_indent(void);
Jonathan Gordon41468822010-06-24 14:46:21 +000049#else
50
51#define skin_error(...)
52#define skin_clear_errors()
53
Jonathan Gordon2d31d772010-07-29 12:37:48 +000054#endif /* SKINPARSER_DEBUG */
Jonathan Gordon41468822010-06-24 14:46:21 +000055
Robert Bieberd5b24dd2010-05-25 15:19:52 +000056
Robert Bieberc5e14b52010-05-31 17:39:58 +000057#ifdef __cplusplus
58}
59#endif
60
Robert Bieberd5b24dd2010-05-25 15:19:52 +000061#endif // SKIN_DEBUG_H