Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 73502 | Differences between
and this patch

Collapse All | Expand All

(-)wbxml2-0.9.0/configure.in (-1 / +1 lines)
Lines 46-49 Link Here
46
AC_FUNC_MEMCMP
46
AC_FUNC_MEMCMP
47
AC_FUNC_VPRINTF
47
AC_FUNC_VPRINTF
48
48
49
AC_OUTPUT(Makefile wbxml2.spec src/Makefile tools/Makefile)
49
AC_OUTPUT(Makefile wbxml2.spec src/Makefile tools/Makefile libwbxml2.pc)
(-)wbxml2-0.9.0/libwbxml2.pc.in (+12 lines)
Line 0 Link Here
1
prefix=@prefix@
2
exec_prefix=@exec_prefix@
3
libdir=@libdir@
4
includedir=@includedir@
5
6
Name: libwbxml2
7
Description: C wbxml library
8
Version: @VERSION@
9
Requires: libxml-2.0 >= 2.6
10
Libs: -L${libdir} -lwbxml2
11
Cflags: -I${includedir}
12
(-)wbxml2-0.9.0/Makefile.am (+3 lines)
Lines 5-10 Link Here
5
5
6
SUBDIRS = src tools
6
SUBDIRS = src tools
7
7
8
pkgconfigdir=$(libdir)/pkgconfig
9
pkgconfig_DATA = libwbxml2.pc
10
8
wbxmldocdir = ${prefix}/share/doc/wbxml2-${VERSION}
11
wbxmldocdir = ${prefix}/share/doc/wbxml2-${VERSION}
9
wbxmldoc_DATA = \
12
wbxmldoc_DATA = \
10
	AUTHORS\
13
	AUTHORS\
(-)wbxml2-0.9.0/src/wbxml_tables.c (-1 / +1 lines)
Lines 1624-1630 Link Here
1624
    { "Reserved for future use",    0x00, 0x30 },
1624
    { "Reserved for future use",    0x00, 0x30 },
1625
    { "VerDTD",         0x00, 0x31 },
1625
    { "VerDTD",         0x00, 0x31 },
1626
    { "VerProto",       0x00, 0x32 },
1626
    { "VerProto",       0x00, 0x32 },
1627
    { "NumberOfChanged",0x00, 0x33 },
1627
    { "NumberOfChanges",0x00, 0x33 },
1628
    { "MoreData",       0x00, 0x34 },
1628
    { "MoreData",       0x00, 0x34 },
1629
1629
1630
    /* Code Page 1: MetInf11 */
1630
    /* Code Page 1: MetInf11 */
(-)wbxml2-0.9.0/src/wbxml_encoder.c (-1 / +14 lines)
Lines 855-861 Link Here
855
                /* Must never happen */
855
                /* Must never happen */
856
                return WBXML_ERROR_INTERNAL;
856
                return WBXML_ERROR_INTERNAL;
857
            }
857
            }
858
            
858
859
#if defined( WBXML_SUPPORT_SYNCML )            
860
            /* If this is a SyncML document ? */
861
            if ((encoder->tree->lang->langID == WBXML_LANG_SYNCML_SYNCML10) ||
862
                (encoder->tree->lang->langID == WBXML_LANG_SYNCML_SYNCML11))
863
            {
864
                if (node->content) {
865
                    if (wbxml_buffer_get_cstr(node->content)[0] == 0x0a && wbxml_buffer_len(node->content) == 1) {
866
                        wbxml_buffer_insert_cstr(node->content, "\r", 0);
867
                    }            
868
                }
869
            }
870
#endif /* WBXML_SUPPORT_SYNCML */
871
859
            /* Add text into CDATA Buffer */
872
            /* Add text into CDATA Buffer */
860
            if (!wbxml_buffer_append(encoder->cdata, node->content))
873
            if (!wbxml_buffer_append(encoder->cdata, node->content))
861
                return WBXML_ERROR_ENCODER_APPEND_DATA;
874
                return WBXML_ERROR_ENCODER_APPEND_DATA;
(-)wbxml2-0.9.0/src/wbxml_parser.c (+11 lines)
Lines 1251-1256 Link Here
1251
    if (is_token(parser, WBXML_PI))
1251
    if (is_token(parser, WBXML_PI))
1252
        return parse_pi(parser);
1252
        return parse_pi(parser);
1253
1253
1254
    /**
1255
     * @note Non standard behaviour because of a Nokia 6600 bug
1256
     *       that generate switch pages in wrong places.
1257
     *
1258
     * Thanks to Balaji Alasyam for finding this bug.
1259
     */
1260
1261
    /* switchPage */
1262
    if ( is_token(parser, WBXML_SWITCH_PAGE) )
1263
        return parse_switch_page(parser, WBXML_TAG_TOKEN); 
1264
1254
    /** @note We have recurrency here ! */
1265
    /** @note We have recurrency here ! */
1255
    return parse_element(parser);
1266
    return parse_element(parser);
1256
}
1267
}
(-)wbxml2-0.9.0/src/wbxml_tree.c (-12 / +8 lines)
Lines 296-301 Link Here
296
WBXML_DECLARE(WBXMLSyncMLDataType) wbxml_tree_node_get_syncml_data_type(WBXMLTreeNode *node)
296
WBXML_DECLARE(WBXMLSyncMLDataType) wbxml_tree_node_get_syncml_data_type(WBXMLTreeNode *node)
297
{
297
{
298
    WBXMLTreeNode *tmp_node = NULL;
298
    WBXMLTreeNode *tmp_node = NULL;
299
    WBXMLTreeNode *meta_tmp_node = NULL;
299
300
300
    if (node == NULL)
301
    if (node == NULL)
301
        return WBXML_SYNCML_DATA_TYPE_NORMAL;
302
        return WBXML_SYNCML_DATA_TYPE_NORMAL;
Lines 306-323 Link Here
306
        (WBXML_STRCMP(wbxml_tag_get_xml_name(node->name), "Data") == 0))
307
        (WBXML_STRCMP(wbxml_tag_get_xml_name(node->name), "Data") == 0))
307
    {
308
    {
308
        /* Go to Parent element (or Parent of Parent) and search for <Meta> */
309
        /* Go to Parent element (or Parent of Parent) and search for <Meta> */
309
        if (((node->parent != NULL) && 
310
        if ((node->parent != NULL && node->parent->children != NULL && 
310
             (node->parent->children != NULL) && 
311
		(((meta_tmp_node = wbxml_tree_node_elt_get_from_name(node->parent->children, "Meta", FALSE)) != NULL &&
311
             ((tmp_node = wbxml_tree_node_elt_get_from_name(node->parent->children, "Meta", FALSE)) != NULL)) ||
312
		(tmp_node = wbxml_tree_node_elt_get_from_name(meta_tmp_node->children, "Type", FALSE)) != NULL) ||
312
            ((node->parent != NULL) && 
313
		(node->parent != NULL && node->parent->parent != NULL && node->parent->parent->children != NULL && 
313
             (node->parent->parent != NULL) && 
314
		(meta_tmp_node = wbxml_tree_node_elt_get_from_name(node->parent->parent->children, "Meta", FALSE)) != NULL &&
314
             (node->parent->parent->children != NULL) && 
315
		(tmp_node = wbxml_tree_node_elt_get_from_name(meta_tmp_node->children, "Type", FALSE)) != NULL))))
315
             ((tmp_node = wbxml_tree_node_elt_get_from_name(node->parent->parent->children, "Meta", FALSE)) != NULL))) 
316
        {
316
        {
317
            /* Search for <Type> */
317
		/* Check <Type> value */
318
            if ((tmp_node = wbxml_tree_node_elt_get_from_name(tmp_node->children, "Type", FALSE)) != NULL) 
319
            {
320
                /* Check <Type> value */
321
                if ((tmp_node->children != NULL) && (tmp_node->children->type == WBXML_TREE_TEXT_NODE)) {
318
                if ((tmp_node->children != NULL) && (tmp_node->children->type == WBXML_TREE_TEXT_NODE)) {
322
                    /* application/vnd.syncml-devinf+wbxml */
319
                    /* application/vnd.syncml-devinf+wbxml */
323
                    if (wbxml_buffer_compare_cstr(tmp_node->children->content, "application/vnd.syncml-devinf+wbxml") == 0) {
320
                    if (wbxml_buffer_compare_cstr(tmp_node->children->content, "application/vnd.syncml-devinf+wbxml") == 0) {
Lines 344-350 Link Here
344
					    return WBXML_SYNCML_DATA_TYPE_VCALENDAR;
341
					    return WBXML_SYNCML_DATA_TYPE_VCALENDAR;
345
					}
342
					}
346
                }
343
                }
347
            }
348
        }
344
        }
349
    }
345
    }

Return to bug 73502