summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xine-utils/xmllexer.c35
-rw-r--r--src/xine-utils/xmllexer.h31
-rw-r--r--src/xine-utils/xmlparser.c41
-rw-r--r--src/xine-utils/xmlparser.h34
4 files changed, 82 insertions, 59 deletions
diff --git a/src/xine-utils/xmllexer.c b/src/xine-utils/xmllexer.c
index cc112b64a..575c37611 100644
--- a/src/xine-utils/xmllexer.c
+++ b/src/xine-utils/xmllexer.c
@@ -1,23 +1,24 @@
/*
- * Copyright (C) 2002-2003 the xine project
+ * Copyright (C) 2002-2003,2007 the xine project
*
* This file is part of xine, a free video player.
*
- * xine is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * xine 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.
+ * The xine-lib XML parser is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
*
- * You should have received a copy of the GNU 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
+ * The xine-lib XML parser 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
+ * Library General Public License for more details.
*
- * $Id: xmllexer.c,v 1.12 2006/06/20 00:35:08 dgp85 Exp $
+ * You should have received a copy of the GNU Library General Public
+ * License along with the Gnome Library; see the file COPYING.LIB. If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * $Id: xmllexer.c,v 1.13 2007/03/04 16:19:12 hadess Exp $
*
*/
@@ -27,11 +28,17 @@
#define LOG
*/
+#ifdef XINE_COMPILE
#include "xineutils.h"
+#else
+#define lprintf(...)
+#define xine_xmalloc malloc
+#endif
#include "xmllexer.h"
#include <stdio.h>
#include <ctype.h>
#include <string.h>
+#include <stdlib.h>
/* private constants*/
#define NORMAL 0 /* normal lex mode */
diff --git a/src/xine-utils/xmllexer.h b/src/xine-utils/xmllexer.h
index bd69204ff..5a217fcd8 100644
--- a/src/xine-utils/xmllexer.h
+++ b/src/xine-utils/xmllexer.h
@@ -1,23 +1,24 @@
/*
- * Copyright (C) 2002-2003 the xine project
+ * Copyright (C) 2002-2003,2007 the xine project
*
* This file is part of xine, a free video player.
*
- * xine is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * The xine-lib XML parser is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
*
- * xine 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.
+ * The xine-lib XML parser 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
+ * Library General Public License for more details.
*
- * You should have received a copy of the GNU 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
+ * You should have received a copy of the GNU Library General Public
+ * License along with the Gnome Library; see the file COPYING.LIB. If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
*
- * $Id: xmllexer.h,v 1.7 2006/09/26 05:19:49 dgp85 Exp $
+ * $Id: xmllexer.h,v 1.8 2007/03/04 16:19:12 hadess Exp $
*
*/
@@ -25,6 +26,10 @@
#ifndef XML_LEXER_H
#define XML_LEXER_H
+#ifndef XINE_PROTECTED
+#define XINE_PROTECTED
+#endif
+
/* public constants */
#define T_ERROR -1 /* lexer error */
#define T_EOF 0 /* end of file */
diff --git a/src/xine-utils/xmlparser.c b/src/xine-utils/xmlparser.c
index 2e8c84ae0..47096705a 100644
--- a/src/xine-utils/xmlparser.c
+++ b/src/xine-utils/xmlparser.c
@@ -1,24 +1,24 @@
/*
- * Copyright (C) 2002-2003 the xine project
+ * Copyright (C) 2002-2003,2007 the xine project
*
* This file is part of xine, a free video player.
- * This file is part of gxine, a free video player.
*
- * xine is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * The xine-lib XML parser is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
*
- * xine 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.
+ * The xine-lib XML parser 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
+ * Library General Public License for more details.
*
- * You should have received a copy of the GNU 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
+ * You should have received a copy of the GNU Library General Public
+ * License along with the Gnome Library; see the file COPYING.LIB. If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
*
- * $Id: xmlparser.c,v 1.15 2006/02/14 02:25:01 dsalt Exp $
+ * $Id: xmlparser.c,v 1.16 2007/03/04 16:19:12 hadess Exp $
*
*/
@@ -35,7 +35,12 @@
#define LOG
*/
+#ifdef XINE_COMPILE
#include "xineutils.h"
+#else
+#define lprintf(...)
+#define xine_xmalloc malloc
+#endif
#include "xmllexer.h"
#include "xmlparser.h"
@@ -466,7 +471,7 @@ int xml_parser_build_tree(xml_node_t **root_node) {
return res;
}
-char *xml_parser_get_property (const xml_node_t *node, const char *name) {
+const char *xml_parser_get_property (const xml_node_t *node, const char *name) {
xml_property_t *prop;
@@ -489,8 +494,8 @@ char *xml_parser_get_property (const xml_node_t *node, const char *name) {
int xml_parser_get_property_int (const xml_node_t *node, const char *name,
int def_value) {
- char *v;
- int ret;
+ const char *v;
+ int ret;
v = xml_parser_get_property (node, name);
@@ -506,7 +511,7 @@ int xml_parser_get_property_int (const xml_node_t *node, const char *name,
int xml_parser_get_property_bool (const xml_node_t *node, const char *name,
int def_value) {
- char *v;
+ const char *v;
v = xml_parser_get_property (node, name);
diff --git a/src/xine-utils/xmlparser.h b/src/xine-utils/xmlparser.h
index a19c81ec3..f202ca28d 100644
--- a/src/xine-utils/xmlparser.h
+++ b/src/xine-utils/xmlparser.h
@@ -1,28 +1,34 @@
/*
- * Copyright (C) 2002-2003 the xine project
+ * Copyright (C) 2002-2003,2007 the xine project
*
* This file is part of xine, a free video player.
*
- * xine is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * The xine-lib XML parser is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
*
- * xine 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.
+ * The xine-lib XML parser 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
+ * Library General Public License for more details.
*
- * You should have received a copy of the GNU 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
+ * You should have received a copy of the GNU Library General Public
+ * License along with the Gnome Library; see the file COPYING.LIB. If not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
*
- * $Id: xmlparser.h,v 1.5 2006/09/26 05:19:49 dgp85 Exp $
+ * $Id: xmlparser.h,v 1.6 2007/03/04 16:19:12 hadess Exp $
*
*/
+
#ifndef XML_PARSER_H
#define XML_PARSER_H
+#ifndef XINE_PROTECTED
+#define XINE_PROTECTED
+#endif
+
/* parser modes */
#define XML_PARSER_CASE_INSENSITIVE 0
#define XML_PARSER_CASE_SENSITIVE 1
@@ -54,7 +60,7 @@ int xml_parser_build_tree(xml_node_t **root_node) XINE_PROTECTED;
void xml_parser_free_tree(xml_node_t *root_node) XINE_PROTECTED;
-char *xml_parser_get_property (const xml_node_t *node, const char *name) XINE_PROTECTED;
+const char *xml_parser_get_property (const xml_node_t *node, const char *name) XINE_PROTECTED;
int xml_parser_get_property_int (const xml_node_t *node, const char *name,
int def_value) XINE_PROTECTED;
int xml_parser_get_property_bool (const xml_node_t *node, const char *name,