~ubuntu-branches/ubuntu/trusty/libxml-bare-perl/trusty

« back to all changes in this revision

Viewing changes to parser.c

  • Committer: Bazaar Package Importer
  • Author(s): Antonio Radici, Antonio Radici, gregor herrmann
  • Date: 2009-03-22 10:49:56 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090322104956-a5hx63ijvvmy4ao6
Tags: 0.43-1
[ Antonio Radici ]
* New upstream release
* debian/copyright:
  + added copyright for src/bench/xmlio_testread.cpp
  + removed repack.sh references because there are no licensing issues
  + set the proper license for the upstream source (it is dual licensed)
* debian/control:
  + upgrade to Standards-Version 3.8.1, no changes required
* removed debian/repack.sh
* debian/watch:
  + removed versionmangle and the reference to repack

[ gregor herrmann ]
* debian/control: add missing full stop to long description, thanks to
  Rhonda for spotting.

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
    int    attname_len    = 0;
77
77
    int    attval_len     = 0;
78
78
    struct nodec *curnode = root;
 
79
    struct nodec *temp;
79
80
    struct attc  *curatt  = NULL;
80
81
    char   *cpos          = &xmlin[0];
81
82
    int    pos            = 0;
121
122
                    *(cpos+6) == 'T' &&
122
123
                    *(cpos+7) == 'A'    ) {
123
124
                  cpos += 9;
 
125
                  curnode->type = 1;
124
126
                  goto cdata;
125
127
                }
126
128
                else {
279
281
          cpos++;
280
282
          goto val_1;
281
283
        case '/': // self closing
282
 
          nodec_addchildr( curnode, tagname, tagname_len );
 
284
          temp = nodec_addchildr( curnode, tagname, tagname_len );
 
285
          temp->z = cpos +1 - xmlin;
283
286
          tagname_len            = 0;
284
287
          cpos+=2;
285
288
          goto val_1;
303
306
          cpos++;
304
307
          goto val_1;
305
308
        case '/': // self closing
 
309
          curnode->z = cpos+1-xmlin;
306
310
          curnode = curnode->parent;
307
311
          if( !curnode ) goto done;
308
312
          cpos+=2; // am assuming next char is >
337
341
      let = *cpos;
338
342
      switch( let ) {
339
343
        case 0: goto done;
340
 
        case '/': // self closing
 
344
        case '/': // self closing     !! /> is assumed !!
341
345
          curatt = nodec_addattr( curnode, attname, attname_len );
342
346
          attname_len            = 0;
343
347
          
 
348
          curnode->z = cpos+1-xmlin;
344
349
          curnode = curnode->parent;
345
350
          if( !curnode ) goto done;
346
351
          cpos += 2;
379
384
          goto done;
380
385
        case '/': // self closing
381
386
          if( *(cpos+1) == '>' ) {
 
387
            curnode->z = cpos+1-xmlin;
382
388
            curnode = curnode->parent;
383
389
            if( !curnode ) goto done;
384
390
            cpos+=2;
410
416
          goto done;
411
417
        case '/': // self closing
412
418
          if( *(cpos+1) == '>' ) {
 
419
            curnode->z = cpos+1-xmlin;
413
420
            curnode = curnode->parent;
414
421
            if( !curnode ) goto done;
415
422
            curatt->value = attval;
482
489
      
483
490
      if( let == '>' ) {
484
491
        curnode->namelen = tagname_len;
 
492
        curnode->z = cpos-xmlin;
485
493
        curnode = curnode->parent; // jump up
486
494
        if( !curnode ) goto done;
487
495
        tagname_len++;
508
516
          cpos += res - 1;
509
517
          goto error;
510
518
        }
511
 
        
 
519
        curnode->z = cpos-xmlin;
512
520
        curnode = curnode->parent; // jump up
513
521
        if( !curnode ) goto done;
514
522
        tagname_len++;