~ubuntu-branches/ubuntu/feisty/gnumeric/feisty-security

« back to all changes in this revision

Viewing changes to plugins/html/html_read.c

  • Committer: Bazaar Package Importer
  • Author(s): Gauvain Pocentek
  • Date: 2006-11-14 14:02:03 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20061114140203-iv3j2aii3vch6isl
Tags: 1.7.2-1ubuntu1
* Merge with debian experimental:
  - debian/control, debian/*-gtk-*, debian/rules,
    debian/shlibs.local: Xubuntu changes for
    gtk/gnome multibuild.
  - run intltool-update in po*
  - Build Depend on intltool

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 */
29
29
 
30
30
#include <gnumeric-config.h>
31
 
#include <glib/gi18n.h>
 
31
#include <glib/gi18n-lib.h>
32
32
#include <gnumeric.h>
33
33
#include <string.h>
34
34
#include "html.h"
52
52
#include <libxml/HTMLparser.h>
53
53
#include <libxml/HTMLtree.h>
54
54
 
55
 
#define CC2XML(s) ((const xmlChar *)(s))
 
55
#define CC2XML(s) ((xmlChar const *)(s))
56
56
#define C2XML(s) ((xmlChar *)(s))
57
 
#define CXML2C(s) ((const char *)(s))
 
57
#define CXML2C(s) ((char const *)(s))
58
58
#define XML2C(s) ((char *)(s))
59
59
 
60
60
typedef struct {
332
332
}
333
333
 
334
334
/* Element types which imply that we are inside a table */
335
 
static const char *table_start_elt_types[] = {
 
335
static char const *table_start_elt_types[] = {
336
336
        "caption",
337
337
        "col",
338
338
        "colgroup",
344
344
};
345
345
 
346
346
/* Element types which imply that we are inside a row */
347
 
static const char *row_start_elt_types[] = {
 
347
static char const *row_start_elt_types[] = {
348
348
        "td",
349
349
        "th",
350
350
        NULL
351
351
};
352
352
 
353
353
/* Element types which occur inside tables and rows, but also outside */
354
 
static const char *cont_elt_types[] = {
 
354
static char const *cont_elt_types[] = {
355
355
        "del",
356
356
        "ins",
357
357
        NULL
358
358
};
359
359
 
360
360
static gboolean 
361
 
is_elt_type (htmlNodePtr ptr, const char** types)
 
361
is_elt_type (htmlNodePtr ptr, char const ** types)
362
362
{
363
 
        const char **p;
 
363
        char const **p;
364
364
        gboolean ret = FALSE;
365
365
 
366
366
        for (p = types; *p; p++)
518
518
                                bomlen = 0;
519
519
                        }
520
520
                        ctxt = htmlCreatePushParserCtxt (
521
 
                                NULL, NULL, (const char *)(buf + bomlen),
 
521
                                NULL, NULL, (char const *)(buf + bomlen),
522
522
                                4 - bomlen, gsf_input_name (input), enc);
523
523
                        
524
524
                        for (; size > 0 ; size -= len) {
527
527
                                if (buf == NULL)
528
528
                                        break;
529
529
                                htmlParseChunk (
530
 
                                        ctxt, (const char *)buf, len, 0);
 
530
                                        ctxt, (char const *)buf, len, 0);
531
531
                        }
532
532
 
533
 
                        htmlParseChunk (ctxt, (const char *)buf, 0, 1);
 
533
                        htmlParseChunk (ctxt, (char const *)buf, 0, 1);
534
534
                        doc = ctxt->myDoc;
535
535
                        htmlFreeParserCtxt (ctxt);
536
536
                }