/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pcilib/xml.c

  • Committer: Vasilii Chernov
  • Date: 2016-02-11 13:24:01 UTC
  • mto: This revision was merged to the branch mainline in revision 353.
  • Revision ID: vchernov@inr.ru-20160211132401-w37eyhdwxj87vvmv
Change no_set_check parameter name. Move Python wrap to separate directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
493
493
    xmlAttrPtr cur;
494
494
    const char *value, *name;
495
495
    
496
 
    int register_no_chk = 0;
 
496
    int register_incosistent = 0;
497
497
 
498
498
    for (cur = node->properties; cur != NULL; cur = cur->next) {
499
499
        if (!cur->children) continue;
541
541
                return PCILIB_ERROR_INVALID_DATA;
542
542
            }
543
543
        }
544
 
                else if (!strcasecmp(name, "no_set_check")) {
545
 
                        if (!strcasecmp(value, "1"))
546
 
                                register_no_chk = 1;
 
544
                else if (!strcasecmp(name, "write_verification")) {
 
545
                        if (!strcasecmp(value, "0"))
 
546
                        {
 
547
                                register_incosistent = 1;
 
548
                        }
547
549
                }
548
550
        }
549
 
        if(register_no_chk)
 
551
        
 
552
        if(register_incosistent)
550
553
        {
551
 
                desc->mode |= PCILIB_REGISTER_NO_CHK;
 
554
                desc->mode |= PCILIB_REGISTER_INCONSISTENT;
552
555
        }
553
556
 
554
557
    return 0;
560
563
    const char *value, *name;
561
564
    pcilib_view_context_t *view_ctx;
562
565
 
563
 
    pcilib_access_mode_t mode = PCILIB_REGISTER_NO_CHK;
 
566
    pcilib_access_mode_t mode = PCILIB_REGISTER_INCONSISTENT;
564
567
    pcilib_transform_view_description_t desc = {{0}};
565
568
 
566
569
    desc.base.api = &pcilib_transform_view_api;
603
606
                        
604
607
                        err = pcilib_init_py_script(ctx, script_name, &(desc.script), &mode);
605
608
                        if(err) return err;
606
 
                        mode |= PCILIB_REGISTER_NO_CHK;
 
609
                        mode |= PCILIB_REGISTER_INCONSISTENT;
607
610
                        break;
608
611
        }
609
612
    }