Compare commits
7 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4e7eb6158 | ||
|
|
8049c9f1ff | ||
|
|
b3d894a3c9 | ||
|
|
c523e285fa | ||
|
|
d5a26d56ec | ||
|
|
21ea6bad59 | ||
|
|
67642b31a5 |
10 changed files with 3 additions and 94935 deletions
|
|
@ -1 +0,0 @@
|
||||||
wbxml2-0.9.2.tar.gz
|
|
||||||
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
||||||
# Makefile for source rpm: wbxml2
|
|
||||||
# $Id$
|
|
||||||
NAME := wbxml2
|
|
||||||
SPECFILE = $(firstword $(wildcard *.spec))
|
|
||||||
|
|
||||||
define find-makefile-common
|
|
||||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
|
||||||
endef
|
|
||||||
|
|
||||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
|
||||||
|
|
||||||
ifeq ($(MAKEFILE_COMMON),)
|
|
||||||
# attept a checkout
|
|
||||||
define checkout-makefile-common
|
|
||||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
|
||||||
endef
|
|
||||||
|
|
||||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(MAKEFILE_COMMON)
|
|
||||||
3
dead.package
Normal file
3
dead.package
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
wbxml2 has been superseded by libwbxml:
|
||||||
|
|
||||||
|
http://sourceforge.net/mailarchive/forum.php?thread_name=4975C6CE.50209%40cms.hu-berlin.de&forum_name=wbxmllib-devel
|
||||||
1
sources
1
sources
|
|
@ -1 +0,0 @@
|
||||||
67a48fd9b69db8818a4dca5375c7993a wbxml2-0.9.2.tar.gz
|
|
||||||
|
|
@ -1,305 +0,0 @@
|
||||||
diff -Nur wbxml2-0.9.2-orig/bootstrap wbxml2-0.9.2/bootstrap
|
|
||||||
--- wbxml2-0.9.2-orig/bootstrap 2006-07-11 13:47:43.000000000 +0200
|
|
||||||
+++ wbxml2-0.9.2/bootstrap 2006-07-18 22:37:46.000000000 +0200
|
|
||||||
@@ -1,8 +1,2 @@
|
|
||||||
-#! /bin/sh
|
|
||||||
-libtoolize
|
|
||||||
-aclocal
|
|
||||||
-autoheader
|
|
||||||
-# automake --foreign --add-missing --copy
|
|
||||||
-automake --add-missing
|
|
||||||
-autoconf
|
|
||||||
-./configure --prefix=/usr
|
|
||||||
+#!/bin/sh
|
|
||||||
+autoreconf -i
|
|
||||||
diff -Nur wbxml2-0.9.2-orig/configure.in wbxml2-0.9.2/configure.in
|
|
||||||
--- wbxml2-0.9.2-orig/configure.in 2006-07-11 13:47:44.000000000 +0200
|
|
||||||
+++ wbxml2-0.9.2/configure.in 2006-07-20 12:45:31.000000000 +0200
|
|
||||||
@@ -1,11 +1,11 @@
|
|
||||||
dnl Process this file with autoconf to produce a configure script.
|
|
||||||
AC_INIT(doxygen.h)
|
|
||||||
-AM_INIT_AUTOMAKE(wbxml2, 0.9.0)
|
|
||||||
+AM_INIT_AUTOMAKE(wbxml2, 0.9.2)
|
|
||||||
AM_CONFIG_HEADER(config.h)
|
|
||||||
|
|
||||||
|
|
||||||
dnl Define common variables
|
|
||||||
-VERSION="0.9.0"
|
|
||||||
+VERSION="0.9.2"
|
|
||||||
AC_SUBST(VERSION)
|
|
||||||
RELEASE="1"
|
|
||||||
AC_SUBST(RELEASE)
|
|
||||||
diff -Nur wbxml2-0.9.2-orig/libwbxml2.pc.in wbxml2-0.9.2/libwbxml2.pc.in
|
|
||||||
--- wbxml2-0.9.2-orig/libwbxml2.pc.in 2006-07-11 13:47:44.000000000 +0200
|
|
||||||
+++ wbxml2-0.9.2/libwbxml2.pc.in 2006-07-20 11:57:07.000000000 +0200
|
|
||||||
@@ -8,4 +8,4 @@
|
|
||||||
Version: @VERSION@
|
|
||||||
Requires: libxml-2.0 >= 2.6
|
|
||||||
Libs: -L${libdir} -lwbxml2
|
|
||||||
-Cflags: -I${includedir}
|
|
||||||
+Cflags: -I${includedir} -DHAVE_EXPAT -D_REENTRANT -DWBXML_ENCODER_USE_STRTBL -DWBXML_SUPPORT_WML -DWBXML_SUPPORT_WTA -DWBXML_SUPPORT_SI -DWBXML_SUPPORT_SL -DWBXML_SUPPORT_CO -DWBXML_SUPPORT_PROV -DWBXML_SUPPORT_EMN -DWBXML_SUPPORT_DRMREL -DWBXML_SUPPORT_OTA_SETTINGS -DWBXML_SUPPORT_SYNCML -DWBXML_SUPPORT_WV -DWBXML_SUPPORT_AIRSYNC
|
|
||||||
diff -Nur wbxml2-0.9.2-orig/src/Makefile.am wbxml2-0.9.2/src/Makefile.am
|
|
||||||
--- wbxml2-0.9.2-orig/src/Makefile.am 2006-07-11 13:47:44.000000000 +0200
|
|
||||||
+++ wbxml2-0.9.2/src/Makefile.am 2006-07-20 12:11:20.000000000 +0200
|
|
||||||
@@ -3,7 +3,7 @@
|
|
||||||
INCLUDES =\
|
|
||||||
-I. -I/usr/include
|
|
||||||
|
|
||||||
-CFLAGS =\
|
|
||||||
+AM_CFLAGS =\
|
|
||||||
-DHAVE_CONFIG_H\
|
|
||||||
-DHAVE_EXPAT\
|
|
||||||
-D_REENTRANT\
|
|
||||||
@@ -20,9 +20,7 @@
|
|
||||||
-DWBXML_SUPPORT_SYNCML\
|
|
||||||
-DWBXML_SUPPORT_WV\
|
|
||||||
-DWBXML_SUPPORT_AIRSYNC\
|
|
||||||
- -Wall -Wimplicit -Wreturn-type -Wunused -Wswitch -Wcomment -Wuninitialized -Wparentheses -Wpointer-arith -Wmissing-prototypes\
|
|
||||||
- -O3\
|
|
||||||
- -g
|
|
||||||
+ -Wall
|
|
||||||
|
|
||||||
lib_LTLIBRARIES = libwbxml2.la
|
|
||||||
|
|
||||||
diff -Nur wbxml2-0.9.2-orig/src/wbxml_encoder.c wbxml2-0.9.2/src/wbxml_encoder.c
|
|
||||||
--- wbxml2-0.9.2-orig/src/wbxml_encoder.c 2006-07-11 13:47:45.000000000 +0200
|
|
||||||
+++ wbxml2-0.9.2/src/wbxml_encoder.c 2006-07-20 12:21:15.000000000 +0200
|
|
||||||
@@ -153,6 +153,7 @@
|
|
||||||
WB_BOOL use_strtbl; /**< Do we use String Table when generating WBXML output ? (default: YES) */
|
|
||||||
#endif /* WBXML_ENCODER_USE_STRTBL */
|
|
||||||
WB_BOOL xml_encode_header; /**< Do we generate XML Header ? */
|
|
||||||
+ WB_BOOL produce_anonymous; /**< Do we produce anonymous documents? (default: NO) */
|
|
||||||
WBXMLVersion wbxml_version; /**< WBXML Version to use (when generating WBXML output) */
|
|
||||||
WBXMLCharsetMIBEnum output_charset; /**< Output charset encoding */
|
|
||||||
WB_BOOL flow_mode; /**< Is Flow Mode encoding activated ? */
|
|
||||||
@@ -400,6 +401,7 @@
|
|
||||||
encoder->cdata = NULL;
|
|
||||||
|
|
||||||
encoder->xml_encode_header = TRUE;
|
|
||||||
+ encoder->produce_anonymous = FALSE;
|
|
||||||
|
|
||||||
/* Default Version: WBXML 1.3 */
|
|
||||||
encoder->wbxml_version = WBXML_VERSION_13;
|
|
||||||
@@ -509,6 +511,15 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+WBXML_DECLARE(void) wbxml_encoder_set_produce_anonymous(WBXMLEncoder *encoder, WB_BOOL set_anonymous)
|
|
||||||
+{
|
|
||||||
+ if (encoder == NULL)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ encoder->produce_anonymous = set_anonymous;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
WBXML_DECLARE(void) wbxml_encoder_set_wbxml_version(WBXMLEncoder *encoder, WBXMLVersion version)
|
|
||||||
{
|
|
||||||
if (encoder == NULL)
|
|
||||||
@@ -1464,7 +1475,8 @@
|
|
||||||
|
|
||||||
/* Encode Public ID */
|
|
||||||
/* If WBXML Public Id is '0x01' (unknown), or we forced it, add the XML Public ID in the String Table */
|
|
||||||
- if (encoder->textual_publicid || (public_id == WBXML_PUBLIC_ID_UNKNOWN))
|
|
||||||
+ if ((encoder->textual_publicid || (public_id == WBXML_PUBLIC_ID_UNKNOWN)) &&
|
|
||||||
+ !encoder->produce_anonymous)
|
|
||||||
{
|
|
||||||
if (encoder->lang->publicID->xmlPublicID != NULL)
|
|
||||||
{
|
|
||||||
@@ -1601,7 +1613,7 @@
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
/* Search tag in Tags Table */
|
|
||||||
- if ((tag = wbxml_tables_get_tag_from_xml(encoder->lang, wbxml_tag_get_xml_name(node->name))) != NULL)
|
|
||||||
+ if ((tag = wbxml_tables_get_tag_from_xml(encoder->lang, encoder->tagCodePage, wbxml_tag_get_xml_name(node->name))) != NULL)
|
|
||||||
{
|
|
||||||
token = tag->wbxmlToken;
|
|
||||||
page = tag->wbxmlCodePage;
|
|
||||||
@@ -2897,7 +2909,7 @@
|
|
||||||
/* Date and time can be encoded as OPAQUE data or as a string as specified in [ISO8601]. For now we
|
|
||||||
* keep the string... but if someone wants to code the Date and time encoding function :-)
|
|
||||||
*/
|
|
||||||
- /* return wbxml_encode_wv_datetime(encoder, buffer); */
|
|
||||||
+ return wbxml_encode_wv_datetime(encoder, buffer);
|
|
||||||
break;
|
|
||||||
case WBXML_WV_DATA_TYPE_BINARY:
|
|
||||||
/** @todo Binary Encoding !! */
|
|
||||||
diff -Nur wbxml2-0.9.2-orig/src/wbxml_encoder.h wbxml2-0.9.2/src/wbxml_encoder.h
|
|
||||||
--- wbxml2-0.9.2-orig/src/wbxml_encoder.h 2006-07-11 13:47:45.000000000 +0200
|
|
||||||
+++ wbxml2-0.9.2/src/wbxml_encoder.h 2006-07-20 12:06:27.000000000 +0200
|
|
||||||
@@ -118,6 +118,13 @@
|
|
||||||
WBXML_DECLARE(void) wbxml_encoder_set_use_strtbl(WBXMLEncoder *encoder, WB_BOOL use_strtbl);
|
|
||||||
|
|
||||||
/**
|
|
||||||
+ * @brief Set if we want to produce anonymous WBXML documents [Default: FALSE]
|
|
||||||
+ * @param encoder [in] The WBXML encoder
|
|
||||||
+ * @param set_anonymous [in] TRUE to produce anonymous documents, FALSE otherwise
|
|
||||||
+ */
|
|
||||||
+WBXML_DECLARE(void) wbxml_encoder_set_produce_anonymous(WBXMLEncoder *encoder, WB_BOOL set_anonymous);
|
|
||||||
+
|
|
||||||
+/**
|
|
||||||
* @brief Set the WBXML Version of the output document, when generating WBXML [Default: 'WBXML_VERSION_TOKEN_13' (1.3)]
|
|
||||||
* @param encoder [in] The WBXML Encoder
|
|
||||||
* @param version [in] The WBXML Version
|
|
||||||
diff -Nur wbxml2-0.9.2-orig/src/wbxml.h wbxml2-0.9.2/src/wbxml.h
|
|
||||||
--- wbxml2-0.9.2-orig/src/wbxml.h 2006-07-11 13:47:44.000000000 +0200
|
|
||||||
+++ wbxml2-0.9.2/src/wbxml.h 2006-07-20 11:41:11.000000000 +0200
|
|
||||||
@@ -285,6 +285,7 @@
|
|
||||||
WBXMLVersion wbxml_version; /**< WBXML Version */
|
|
||||||
WB_BOOL keep_ignorable_ws; /**< Keep Ignorable Whitespaces (Default: FALSE) */
|
|
||||||
WB_BOOL use_strtbl; /**< Generate String Table (Default: TRUE) */
|
|
||||||
+ WB_BOOL produce_anonymous; /**< Produce an anonymous document (Default: FALSE) */
|
|
||||||
} WBXMLGenWBXMLParams;
|
|
||||||
|
|
||||||
|
|
||||||
diff -Nur wbxml2-0.9.2-orig/src/wbxml_tables.c wbxml2-0.9.2/src/wbxml_tables.c
|
|
||||||
--- wbxml2-0.9.2-orig/src/wbxml_tables.c 2006-07-11 13:47:45.000000000 +0200
|
|
||||||
+++ wbxml2-0.9.2/src/wbxml_tables.c 2006-07-20 12:32:05.000000000 +0200
|
|
||||||
@@ -2992,17 +2992,40 @@
|
|
||||||
|
|
||||||
|
|
||||||
WBXML_DECLARE(const WBXMLTagEntry *) wbxml_tables_get_tag_from_xml(const WBXMLLangEntry *lang_table,
|
|
||||||
+ const int cur_code_page,
|
|
||||||
const WB_UTINY *xml_name)
|
|
||||||
{
|
|
||||||
- WB_ULONG i = 0;
|
|
||||||
+ WB_ULONG i;
|
|
||||||
+ WB_BOOL found_current = FALSE;
|
|
||||||
|
|
||||||
if ((lang_table == NULL) || (lang_table->tagTable == NULL) || (xml_name == NULL))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
- while (lang_table->tagTable[i].xmlName != NULL) {
|
|
||||||
- if (WBXML_STRCMP(lang_table->tagTable[i].xmlName, xml_name) == 0)
|
|
||||||
- return &(lang_table->tagTable[i]);
|
|
||||||
- i++;
|
|
||||||
+ /* First off, try to find it in the current code page, if provided */
|
|
||||||
+ for (i = 0; cur_code_page >= 0 && lang_table->tagTable[i].xmlName != NULL; i++) {
|
|
||||||
+ const WBXMLTagEntry *entry = &lang_table->tagTable[i];
|
|
||||||
+
|
|
||||||
+ if (entry->wbxmlCodePage == cur_code_page) {
|
|
||||||
+ found_current = TRUE;
|
|
||||||
+
|
|
||||||
+ if (WBXML_STRCMP(entry->xmlName, xml_name) == 0)
|
|
||||||
+ return entry;
|
|
||||||
+ } else {
|
|
||||||
+ if (found_current)
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /* Then try all others */
|
|
||||||
+ for (i = 0; lang_table->tagTable[i].xmlName != NULL; i++) {
|
|
||||||
+ const WBXMLTagEntry *entry = &lang_table->tagTable[i];
|
|
||||||
+
|
|
||||||
+ /* We've already searched the current code page */
|
|
||||||
+ if (cur_code_page >= 0 && entry->wbxmlCodePage == cur_code_page)
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
+ if (WBXML_STRCMP(entry->xmlName, xml_name) == 0)
|
|
||||||
+ return entry;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
diff -Nur wbxml2-0.9.2-orig/src/wbxml_tables.h wbxml2-0.9.2/src/wbxml_tables.h
|
|
||||||
--- wbxml2-0.9.2-orig/src/wbxml_tables.h 2006-07-11 13:47:45.000000000 +0200
|
|
||||||
+++ wbxml2-0.9.2/src/wbxml_tables.h 2006-07-20 12:30:09.000000000 +0200
|
|
||||||
@@ -255,10 +255,12 @@
|
|
||||||
/**
|
|
||||||
* @brief Search for a Tag Entry in Language Table, given the XML Name of the Tag
|
|
||||||
* @param lang_table The Language Table to search in
|
|
||||||
+ * @param cur_code_page The current code page so that it can be searched first, or -1 to start from the first one.
|
|
||||||
* @param xml_name The XML Name of the Tag to search
|
|
||||||
* @return The Tag Entry of this XML Name in Language Table, or NULL if not found
|
|
||||||
*/
|
|
||||||
WBXML_DECLARE(const WBXMLTagEntry *) wbxml_tables_get_tag_from_xml(const WBXMLLangEntry *lang_table,
|
|
||||||
+ const int cur_code_page,
|
|
||||||
const WB_UTINY *xml_name);
|
|
||||||
|
|
||||||
/**
|
|
||||||
diff -Nur wbxml2-0.9.2-orig/src/wbxml_tree.c wbxml2-0.9.2/src/wbxml_tree.c
|
|
||||||
--- wbxml2-0.9.2-orig/src/wbxml_tree.c 2006-07-11 13:47:45.000000000 +0200
|
|
||||||
+++ wbxml2-0.9.2/src/wbxml_tree.c 2006-07-20 12:39:15.000000000 +0200
|
|
||||||
@@ -137,6 +137,9 @@
|
|
||||||
|
|
||||||
/* Use String Table */
|
|
||||||
wbxml_encoder_set_use_strtbl(wbxml_encoder, TRUE);
|
|
||||||
+
|
|
||||||
+ /* Don't produce an anonymous document by default */
|
|
||||||
+ wbxml_encoder_set_produce_anonymous(wbxml_encoder, FALSE);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
/* WBXML Version */
|
|
||||||
@@ -154,6 +157,10 @@
|
|
||||||
/* String Table */
|
|
||||||
wbxml_encoder_set_use_strtbl(wbxml_encoder, params->use_strtbl);
|
|
||||||
|
|
||||||
+ /* Produce an anonymous document? */
|
|
||||||
+ wbxml_encoder_set_produce_anonymous(wbxml_encoder,
|
|
||||||
+ params->produce_anonymous);
|
|
||||||
+
|
|
||||||
/** @todo Add parameter to call : wbxml_encoder_set_output_charset() */
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -455,7 +462,7 @@
|
|
||||||
WBXMLTag *tag = NULL;
|
|
||||||
|
|
||||||
/* Search for XML Tag Name in Table */
|
|
||||||
- if ((tag_entry = wbxml_tables_get_tag_from_xml(lang_table, name)) != NULL) {
|
|
||||||
+ if ((tag_entry = wbxml_tables_get_tag_from_xml(lang_table, -1, name)) != NULL) {
|
|
||||||
/* Found : token tag */
|
|
||||||
tag = wbxml_tag_create_token(tag_entry);
|
|
||||||
}
|
|
||||||
@@ -921,6 +928,7 @@
|
|
||||||
result->lang = wbxml_tables_get_table(lang);
|
|
||||||
result->root = NULL;
|
|
||||||
result->orig_charset = orig_charset;
|
|
||||||
+ result->cur_code_page = 0;
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
@@ -1085,7 +1093,9 @@
|
|
||||||
WBXMLTag *tag = NULL;
|
|
||||||
|
|
||||||
/* Search for XML Tag Name in Table */
|
|
||||||
- if ((tag_entry = wbxml_tables_get_tag_from_xml(tree->lang, (const WB_UTINY *) name)) != NULL) {
|
|
||||||
+ if ((tag_entry = wbxml_tables_get_tag_from_xml(tree->lang, tree->cur_code_page, (const WB_UTINY *) name)) != NULL) {
|
|
||||||
+ tree->cur_code_page = tag_entry->wbxmlCodePage;
|
|
||||||
+
|
|
||||||
/* Found : token tag */
|
|
||||||
tag = wbxml_tag_create_token(tag_entry);
|
|
||||||
}
|
|
||||||
diff -Nur wbxml2-0.9.2-orig/src/wbxml_tree.h wbxml2-0.9.2/src/wbxml_tree.h
|
|
||||||
--- wbxml2-0.9.2-orig/src/wbxml_tree.h 2006-07-11 13:47:45.000000000 +0200
|
|
||||||
+++ wbxml2-0.9.2/src/wbxml_tree.h 2006-07-20 12:27:33.000000000 +0200
|
|
||||||
@@ -97,6 +97,7 @@
|
|
||||||
const WBXMLLangEntry *lang; /**< Language Table */
|
|
||||||
WBXMLTreeNode *root; /**< Root Element */
|
|
||||||
WBXMLCharsetMIBEnum orig_charset; /**< Charset encoding of original document */
|
|
||||||
+ WB_UTINY cur_code_page;/**< Last seen code page */
|
|
||||||
} WBXMLTree;
|
|
||||||
|
|
||||||
|
|
||||||
diff -Nur wbxml2-0.9.2-orig/tools/Makefile.am wbxml2-0.9.2/tools/Makefile.am
|
|
||||||
--- wbxml2-0.9.2-orig/tools/Makefile.am 2006-07-11 13:47:46.000000000 +0200
|
|
||||||
+++ wbxml2-0.9.2/tools/Makefile.am 2006-07-20 12:11:34.000000000 +0200
|
|
||||||
@@ -3,7 +3,7 @@
|
|
||||||
INCLUDES =\
|
|
||||||
-I. -I../src -I/usr/include
|
|
||||||
|
|
||||||
-CFLAGS =\
|
|
||||||
+AM_CFLAGS =\
|
|
||||||
-DHAVE_CONFIG_H\
|
|
||||||
-DHAVE_EXPAT\
|
|
||||||
-D_REENTRANT\
|
|
||||||
@@ -20,9 +20,7 @@
|
|
||||||
-DWBXML_SUPPORT_SYNCML\
|
|
||||||
-DWBXML_SUPPORT_WV\
|
|
||||||
-DWBXML_SUPPORT_AIRSYNC\
|
|
||||||
- -Wall -Wimplicit -Wreturn-type -Wunused -Wswitch -Wcomment -Wuninitialized -Wparentheses -Wpointer-arith -Wmissing-prototypes\
|
|
||||||
- -O3\
|
|
||||||
- -g
|
|
||||||
+ -Wall
|
|
||||||
|
|
||||||
bin_PROGRAMS = wbxml2xml xml2wbxml
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,22 +0,0 @@
|
||||||
--- wbxml2-0.9.2/tools/Makefile.am.cflags 2006-11-24 17:51:58.000000000 +0100
|
|
||||||
+++ wbxml2-0.9.2/tools/Makefile.am 2006-11-24 17:52:09.000000000 +0100
|
|
||||||
@@ -3,7 +3,7 @@
|
|
||||||
INCLUDES =\
|
|
||||||
-I. -I../src -I/usr/include
|
|
||||||
|
|
||||||
-CFLAGS =\
|
|
||||||
+AM_CFLAGS =\
|
|
||||||
-DHAVE_CONFIG_H\
|
|
||||||
-DHAVE_EXPAT\
|
|
||||||
-D_REENTRANT\
|
|
||||||
--- wbxml2-0.9.2/src/Makefile.am.cflags 2006-11-24 17:51:51.000000000 +0100
|
|
||||||
+++ wbxml2-0.9.2/src/Makefile.am 2006-11-24 17:52:12.000000000 +0100
|
|
||||||
@@ -3,7 +3,7 @@
|
|
||||||
INCLUDES =\
|
|
||||||
-I. -I/usr/include
|
|
||||||
|
|
||||||
-CFLAGS =\
|
|
||||||
+AM_CFLAGS =\
|
|
||||||
-DHAVE_CONFIG_H\
|
|
||||||
-DHAVE_EXPAT\
|
|
||||||
-D_REENTRANT\
|
|
||||||
|
|
@ -1,164 +0,0 @@
|
||||||
diff -Naur wbxml2-0.9.2-original/src/wbxml_tables.c wbxml2-0.9.2-modified/src/wbxml_tables.c
|
|
||||||
--- wbxml2-0.9.2-original/src/wbxml_tables.c 2007-03-20 17:39:36.000000000 -0400
|
|
||||||
+++ wbxml2-0.9.2-modified/src/wbxml_tables.c 2007-03-20 17:47:56.000000000 -0400
|
|
||||||
@@ -2806,6 +2806,46 @@
|
|
||||||
{ NULL, 0x00, 0x00 }
|
|
||||||
};
|
|
||||||
|
|
||||||
+/* NOTE:
|
|
||||||
+ * These namespace names differ from the Microsoft-assigned namespaces. The
|
|
||||||
+ * reason for the difference is that the Microsoft-assigned names are not
|
|
||||||
+ * valid URI's and hence produce warning messages when processed by some
|
|
||||||
+ * libraries. The mapping is as follows:
|
|
||||||
+ *
|
|
||||||
+ * Microsoft Ours
|
|
||||||
+ * --------- ----
|
|
||||||
+ * AirSync: http://synce.org/formats/airsync_wm5/airsync
|
|
||||||
+ * POOMCONTACTS: http://synce.org/formats/airsync_wm5/contacts
|
|
||||||
+ * POOMMAIL: http://synce.org/formats/airsync_wm5/mail
|
|
||||||
+ * AirNotify: http://synce.org/formats/airsync_wm5/airnotify
|
|
||||||
+ * POOMCAL: http://synce.org/formats/airsync_wm5/calendar
|
|
||||||
+ * Move: http://synce.org/formats/airsync_wm5/move
|
|
||||||
+ * GetItemEstimate: http://synce.org/formats/airsync_wm5/getitemestimate
|
|
||||||
+ * FolderHierarchy: http://synce.org/formats/airsync_wm5/folderhierarchy
|
|
||||||
+ * MeetingResponse: http://synce.org/formats/airsync_wm5/meetingresponse
|
|
||||||
+ * POOMTASKS: http://synce.org/formats/airsync_wm5/tasks
|
|
||||||
+ * ResolveRecipients: http://synce.org/formats/airsync_wm5/resolverecipients
|
|
||||||
+ * ValidateCert: http://synce.org/formats/airsync_wm5/validatecert
|
|
||||||
+ * POOMCONTACTS2: http://synce.org/formats/airsync_wm5/contacts2
|
|
||||||
+ *
|
|
||||||
+ */
|
|
||||||
+const WBXMLNameSpaceEntry sv_airsync_ns_table[] = {
|
|
||||||
+ { "http://synce.org/formats/airsync_wm5/airsync", 0x00 }, /**< Code Page 0 */
|
|
||||||
+ { "http://synce.org/formats/airsync_wm5/contacts", 0x01 }, /**< Code Page 1 */
|
|
||||||
+ { "http://synce.org/formats/airsync_wm5/mail", 0x02 }, /**< Code Page 2 */
|
|
||||||
+ { "http://synce.org/formats/airsync_wm5/airnotify", 0x03 }, /**< Code Page 3 */
|
|
||||||
+ { "http://synce.org/formats/airsync_wm5/calendar", 0x04 }, /**< Code Page 4 */
|
|
||||||
+ { "http://synce.org/formats/airsync_wm5/move", 0x05 }, /**< Code Page 5 */
|
|
||||||
+ { "http://synce.org/formats/airsync_wm5/getitemestimate", 0x06 }, /**< Code Page 6 */
|
|
||||||
+ { "http://synce.org/formats/airsync_wm5/folderhierarchy", 0x07 }, /**< Code Page 7 */
|
|
||||||
+ { "http://synce.org/formats/airsync_wm5/meetingresponse", 0x08 }, /**< Code Page 8 */
|
|
||||||
+ { "http://synce.org/formats/airsync_wm5/tasks", 0x09 }, /**< Code Page 9 */
|
|
||||||
+ { "http://synce.org/formats/airsync_wm5/resolverecipients", 0x0a }, /**< Code Page 10 */
|
|
||||||
+ { "http://synce.org/formats/airsync_wm5/validatecert", 0x0b }, /**< Code Page 11 */
|
|
||||||
+ { "http://synce.org/formats/airsync_wm5/contacts2", 0x0c }, /**< Code Page 12 */
|
|
||||||
+ { NULL, 0x00 }
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
#endif /* WBXML_SUPPORT_AIRSYNC */
|
|
||||||
|
|
||||||
|
|
||||||
@@ -2885,7 +2925,7 @@
|
|
||||||
#endif /* WBXML_SUPPORT_WV */
|
|
||||||
|
|
||||||
#if defined( WBXML_SUPPORT_AIRSYNC )
|
|
||||||
- { WBXML_LANG_AIRSYNC, &sv_airsync_public_id, sv_airsync_tag_table, NULL, NULL, NULL, NULL },
|
|
||||||
+ { WBXML_LANG_AIRSYNC, &sv_airsync_public_id, sv_airsync_tag_table, sv_airsync_ns_table, NULL, NULL, NULL },
|
|
||||||
#endif /* WBXML_SUPPORT_AIRSYNC */
|
|
||||||
|
|
||||||
{ WBXML_LANG_UNKNOWN, NULL, NULL, NULL, NULL, NULL, NULL }
|
|
||||||
@@ -3169,3 +3209,21 @@
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+WBXML_DECLARE(WB_UTINY) wbxml_tables_get_code_page(const WBXMLNameSpaceEntry *ns_table, const WB_TINY* xmlns)
|
|
||||||
+{
|
|
||||||
+ WB_ULONG i = 0;
|
|
||||||
+
|
|
||||||
+ if (ns_table == NULL)
|
|
||||||
+ return NULL;
|
|
||||||
+
|
|
||||||
+ while (ns_table[i].xmlNameSpace != NULL)
|
|
||||||
+ {
|
|
||||||
+ if (strcmp(ns_table[i].xmlNameSpace, xmlns) == 0)
|
|
||||||
+ return ns_table[i].wbxmlCodePage;
|
|
||||||
+
|
|
||||||
+ i++;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return NULL;
|
|
||||||
+}
|
|
||||||
diff -Naur wbxml2-0.9.2-original/src/wbxml_tables.h wbxml2-0.9.2-modified/src/wbxml_tables.h
|
|
||||||
--- wbxml2-0.9.2-original/src/wbxml_tables.h 2007-03-20 17:39:36.000000000 -0400
|
|
||||||
+++ wbxml2-0.9.2-modified/src/wbxml_tables.h 2007-03-20 17:39:52.000000000 -0400
|
|
||||||
@@ -310,6 +310,9 @@
|
|
||||||
WBXML_DECLARE(const WB_TINY *) wbxml_tables_get_xmlns(const WBXMLNameSpaceEntry *ns_table,
|
|
||||||
WB_UTINY code_page);
|
|
||||||
|
|
||||||
+WBXML_DECLARE(WB_UTINY) wbxml_tables_get_code_page(const WBXMLNameSpaceEntry *ns_table,
|
|
||||||
+ const WB_TINY* xmlns);
|
|
||||||
+
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
diff -Naur wbxml2-0.9.2-original/src/wbxml_tree.c wbxml2-0.9.2-modified/src/wbxml_tree.c
|
|
||||||
--- wbxml2-0.9.2-original/src/wbxml_tree.c 2007-03-20 17:39:36.000000000 -0400
|
|
||||||
+++ wbxml2-0.9.2-modified/src/wbxml_tree.c 2007-03-20 17:39:52.000000000 -0400
|
|
||||||
@@ -34,6 +34,7 @@
|
|
||||||
|
|
||||||
#include "wbxml.h"
|
|
||||||
|
|
||||||
+#define WBXML_NAMESPACE_SEPARATOR ':'
|
|
||||||
|
|
||||||
/***************************************************
|
|
||||||
* Public Functions
|
|
||||||
@@ -201,9 +202,9 @@
|
|
||||||
*tree = NULL;
|
|
||||||
|
|
||||||
/* Create Expat XML Parser */
|
|
||||||
- if ((xml_parser = XML_ParserCreate(NULL)) == NULL)
|
|
||||||
+ if ((xml_parser = XML_ParserCreateNS(NULL, WBXML_NAMESPACE_SEPARATOR)) == NULL)
|
|
||||||
return WBXML_ERROR_NOT_ENOUGH_MEMORY;
|
|
||||||
-
|
|
||||||
+
|
|
||||||
/* Init context */
|
|
||||||
wbxml_tree_clb_ctx.current = NULL;
|
|
||||||
wbxml_tree_clb_ctx.error = WBXML_OK;
|
|
||||||
@@ -1091,9 +1092,32 @@
|
|
||||||
const WBXMLTagEntry *tag_entry = NULL;
|
|
||||||
WBXMLTreeNode *node = NULL;
|
|
||||||
WBXMLTag *tag = NULL;
|
|
||||||
-
|
|
||||||
+ WB_UTINY *sep = NULL;
|
|
||||||
+ const WB_UTINY *namespace_name = NULL;
|
|
||||||
+ const WB_UTINY *element_name = NULL;
|
|
||||||
+
|
|
||||||
+ /* Separate the namespace from the element name */
|
|
||||||
+ sep = (WB_UTINY *)strrchr((const WB_TINY *) name, WBXML_NAMESPACE_SEPARATOR);
|
|
||||||
+ if (sep != NULL) {
|
|
||||||
+ /* Temporarily split the string by changing the separater to a null-terminator */
|
|
||||||
+ *sep = '\0';
|
|
||||||
+
|
|
||||||
+ namespace_name = name;
|
|
||||||
+ element_name = sep+1;
|
|
||||||
+ }
|
|
||||||
+ else {
|
|
||||||
+ /* No namespace, so just set it to an empty string (specifically, the null-terminator at the end of the elemet name */
|
|
||||||
+ namespace_name = name + strlen((const WB_TINY *) name);
|
|
||||||
+ element_name = name;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ WBXML_DEBUG((WBXML_CONV, "Parsed element name: Namespace='%s', Element='%s'", namespace_name, element_name));
|
|
||||||
+
|
|
||||||
+ /* Update the current code page to match the one specified by the namespace */
|
|
||||||
+ tree->cur_code_page = wbxml_tables_get_code_page(tree->lang->nsTable, (const WB_TINY *) namespace_name);
|
|
||||||
+
|
|
||||||
/* Search for XML Tag Name in Table */
|
|
||||||
- if ((tag_entry = wbxml_tables_get_tag_from_xml(tree->lang, tree->cur_code_page, (const WB_UTINY *) name)) != NULL) {
|
|
||||||
+ if ((tag_entry = wbxml_tables_get_tag_from_xml(tree->lang, tree->cur_code_page, element_name)) != NULL) {
|
|
||||||
tree->cur_code_page = tag_entry->wbxmlCodePage;
|
|
||||||
|
|
||||||
/* Found : token tag */
|
|
||||||
@@ -1104,6 +1128,11 @@
|
|
||||||
tag = wbxml_tag_create_literal(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (sep != NULL) {
|
|
||||||
+ /* We are done with the element and namespace names, so put the separator character back */
|
|
||||||
+ *sep = WBXML_NAMESPACE_SEPARATOR;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (tag == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
--- wbxml2-0.9.2/Makefile.am.no-doc 2006-07-11 13:47:43.000000000 +0200
|
|
||||||
+++ wbxml2-0.9.2/Makefile.am 2006-11-24 17:35:47.000000000 +0100
|
|
||||||
@@ -8,26 +8,6 @@
|
|
||||||
pkgconfigdir=$(libdir)/pkgconfig
|
|
||||||
pkgconfig_DATA = libwbxml2.pc
|
|
||||||
|
|
||||||
-wbxmldocdir = ${prefix}/share/doc/wbxml2-${VERSION}
|
|
||||||
-wbxmldoc_DATA = \
|
|
||||||
- AUTHORS\
|
|
||||||
- bootstrap\
|
|
||||||
- BUGS\
|
|
||||||
- ChangeLog\
|
|
||||||
- COPYING\
|
|
||||||
- GNU-LGPL\
|
|
||||||
- INSTALL\
|
|
||||||
- NEWS\
|
|
||||||
- README\
|
|
||||||
- References\
|
|
||||||
- THANKS\
|
|
||||||
- TODO\
|
|
||||||
- doxygen.h
|
|
||||||
-
|
|
||||||
-install-data-local:
|
|
||||||
- $(mkinstalldirs) $(DESTDIR)$(wbxmldocdir)/manual
|
|
||||||
- cp -Rp doc/* $(DESTDIR)$(wbxmldocdir)/manual
|
|
||||||
-
|
|
||||||
dist-bz2: distdir
|
|
||||||
sed -e "s/tar.gz/tar.bz2/g" $(distdir)/wbxml2.spec > $(distdir)/wbxml2.spec.aux
|
|
||||||
mv $(distdir)/wbxml2.spec.aux $(distdir)/wbxml2.spec
|
|
||||||
149
wbxml2.spec
149
wbxml2.spec
|
|
@ -1,149 +0,0 @@
|
||||||
Name: wbxml2
|
|
||||||
Version: 0.9.2
|
|
||||||
Release: 13%{?dist}
|
|
||||||
Summary: Library and tools to parse, encode and handle WBXML documents
|
|
||||||
|
|
||||||
Group: System Environment/Libraries
|
|
||||||
License: LGPLv2+
|
|
||||||
URL: http://libwbxml.aymerick.com:8080/
|
|
||||||
Source0: http://dl.sourceforge.net/wbxmllib/%{name}-%{version}.tar.gz
|
|
||||||
|
|
||||||
Patch0: wbxml2-0.9.2-no-doc.patch
|
|
||||||
Patch2: wbxml2-0.9.2-autoreconf.patch
|
|
||||||
|
|
||||||
#synce patches
|
|
||||||
Patch101: wbxml2-0.9.2-anonymous-support-and-misc-fixes.patch
|
|
||||||
Patch102: wbxml2-0.9.2-namespaces.patch
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
|
|
||||||
BuildRequires: expat-devel zlib-devel popt
|
|
||||||
|
|
||||||
%description
|
|
||||||
The WBXML Library (libwbxml) contains a library and its associated tools to
|
|
||||||
parse, encode and handle WBXML documents. The WBXML format is a binary
|
|
||||||
representation of XML, defined by the Wap Forum, and used to reduce
|
|
||||||
bandwidth in mobile communications.
|
|
||||||
|
|
||||||
%package devel
|
|
||||||
Group: Development/Libraries
|
|
||||||
Summary: Development files of %{name}
|
|
||||||
Requires: %{name} = %{version}-%{release}
|
|
||||||
Requires: expat-devel zlib-devel popt libxml2-devel
|
|
||||||
|
|
||||||
%description devel
|
|
||||||
The %{name}-devel package contains libraries and header files for
|
|
||||||
developing applications that use %{name}.
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup -q
|
|
||||||
%patch0 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch101 -p1
|
|
||||||
%patch102 -p1
|
|
||||||
|
|
||||||
chmod a+x configure
|
|
||||||
|
|
||||||
# Recode to UTF-8 several doc files
|
|
||||||
for file in ChangeLog README NEWS References; do
|
|
||||||
/usr/bin/iconv -f iso8859-1 -t utf-8 $file > ${file}.conv \
|
|
||||||
&& /bin/mv ${file}.conv $file
|
|
||||||
done
|
|
||||||
|
|
||||||
# no line terminator, add one
|
|
||||||
echo >> THANKS
|
|
||||||
echo >> BUGS
|
|
||||||
|
|
||||||
%build
|
|
||||||
%configure --disable-rpath --disable-static
|
|
||||||
make %{?_smp_mflags}
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
sed -i -e 's,Version: 0.9.0,Version: 0.9.2,' \
|
|
||||||
$RPM_BUILD_ROOT%{_libdir}/pkgconfig/libwbxml2.pc
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
|
||||||
|
|
||||||
|
|
||||||
%files
|
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc AUTHORS BUGS ChangeLog COPYING GNU-LGPL NEWS README References THANKS TODO
|
|
||||||
%{_bindir}/wbxml2xml
|
|
||||||
%{_bindir}/xml2wbxml
|
|
||||||
%{_libdir}/libwbxml2.so.0*
|
|
||||||
%exclude %{_libdir}/libwbxml2.la
|
|
||||||
|
|
||||||
%files devel
|
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc AUTHORS BUGS ChangeLog COPYING GNU-LGPL NEWS README References THANKS TODO
|
|
||||||
%{_includedir}/wbxml*.h
|
|
||||||
%{_libdir}/libwbxml2.so
|
|
||||||
%{_libdir}/pkgconfig/libwbxml2.pc
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.9.2-13
|
|
||||||
- Autorebuild for GCC 4.3
|
|
||||||
|
|
||||||
* Sat Jan 12 2008 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
|
|
||||||
- 0.9.2-12
|
|
||||||
- pkgconfig also needs libxml2-devel
|
|
||||||
|
|
||||||
* Sat Jan 12 2008 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
|
|
||||||
- 0.9.2-11
|
|
||||||
- fix devel requires
|
|
||||||
|
|
||||||
* Mon Jan 07 2008 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
|
|
||||||
- 0.9.2-10
|
|
||||||
- add synce patches
|
|
||||||
|
|
||||||
* Sun Aug 26 2007 Laurent Rineau <laurent.rineau__fedora@normalesup.org> - 0.9.2-9
|
|
||||||
- Change the License: tag.
|
|
||||||
|
|
||||||
* Fri Dec 1 2006 Laurent Rineau <laurent.rineau__fedora_extras@normalesup.org> - 0.9.2-8
|
|
||||||
- Stupidity. Fix the use of iconv. Bug #217848 again.
|
|
||||||
- Add an end-of-line to BUGS as well.
|
|
||||||
|
|
||||||
* Thu Nov 30 2006 Laurent Rineau <laurent.rineau__fedora_extras@normalesup.org> - 0.9.2-6
|
|
||||||
- Use iconv instead of recode. Bug #217848.
|
|
||||||
|
|
||||||
* Mon Nov 27 2006 Laurent Rineau <laurent.rineau__fedora_extras@normalesup.org> - 0.9.2-5
|
|
||||||
- Changed the Summarys and descriptions.
|
|
||||||
|
|
||||||
* Mon Nov 27 2006 Laurent Rineau <laurent.rineau__fedora_extras@normalesup.org> - 0.9.2-4
|
|
||||||
- Added BR: popt zlib-devel
|
|
||||||
- Improved changelog.
|
|
||||||
|
|
||||||
* Fri Nov 24 2006 Laurent Rineau <laurent.rineau__fedora_extras@normalesup.org> - 0.9.2-3
|
|
||||||
- Recode some %%doc files.
|
|
||||||
|
|
||||||
* Fri Nov 24 2006 Laurent Rineau <laurent.rineau__fedora_extras@normalesup.org> - 0.9.2-1
|
|
||||||
- New upstream release 0.9.2.
|
|
||||||
- Unorphaned for FE-6 and rawhide. New maintainer. Review request #217180
|
|
||||||
- New spec file.
|
|
||||||
- Header are know in %%{_includedir} instead of %%{_includedir}/wbxml2
|
|
||||||
- New licence.
|
|
||||||
|
|
||||||
* Sun May 22 2005 Jeremy Katz <katzj@redhat.com> - 0.9.0-4
|
|
||||||
- rebuild on all arches
|
|
||||||
|
|
||||||
* Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
|
|
||||||
- rebuilt
|
|
||||||
|
|
||||||
* Wed Jun 30 2004 Michael Schwendt <mschwendt[AT]users.sf.net> 0:0.9.0-0.fdr.2
|
|
||||||
- Set group, own include dir, fix devel description,
|
|
||||||
make %%doc files chmod -x.
|
|
||||||
|
|
||||||
* Wed Jun 30 2004 Panu Matilainen <pmatilai@welho.com> 0:0.9.0-0.fdr.1
|
|
||||||
- Initial RPM release.
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue