~ubuntu-branches/debian/experimental/ncbi-tools6/experimental

« back to all changes in this revision

Viewing changes to tools/xmlblast.c

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2008-07-14 19:43:15 UTC
  • mfrom: (2.1.12 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080714194315-ed44u9ek7txva2rz
Tags: 6.1.20080302-3
tools/readdb.c: enable madvise()-based code on all glibc (hence all
Debian) systems, not just Linux.  (Closes: #490437.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
static char const rcsid[] = "$Id: xmlblast.c,v 6.39 2005/07/28 14:57:10 coulouri Exp $";
 
1
static char const rcsid[] = "$Id: xmlblast.c,v 6.41 2007/05/07 13:30:54 kans Exp $";
2
2
 
3
 
/* $Id: xmlblast.c,v 6.39 2005/07/28 14:57:10 coulouri Exp $ */
 
3
/* $Id: xmlblast.c,v 6.41 2007/05/07 13:30:54 kans Exp $ */
4
4
/**************************************************************************
5
5
*                                                                         *
6
6
*                             COPYRIGHT NOTICE                            *
32
32
*   
33
33
* Version Creation Date: 05/17/2000
34
34
*
35
 
* $Revision: 6.39 $
 
35
* $Revision: 6.41 $
36
36
*
37
37
* File Description:  Functions to print simplified BLAST output (XML)
38
38
*
39
39
40
40
* $Log: xmlblast.c,v $
 
41
* Revision 6.41  2007/05/07 13:30:54  kans
 
42
* added casts for Seq-data.gap (SeqDataPtr, SeqGapPtr, ByteStorePtr)
 
43
*
 
44
* Revision 6.40  2007/03/23 14:38:31  madden
 
45
* Fix RT 15264581 (ungapped use of std-seg) and add needed BioseqUnlock
 
46
*
41
47
* Revision 6.39  2005/07/28 14:57:10  coulouri
42
48
* remove dead code
43
49
*
653
659
        bs_list = CreateMaskByteStore (mask_loc);
654
660
        if (ISA_na(bsp->mol) && sap->segtype == SAS_STD) {
655
661
            StdSegPtr ssp = (StdSegPtr) sap->segs;
 
662
            int ssp_index = 1;
 
663
            while (ssp_index < chain)
 
664
            {
 
665
                ssp = ssp->next;
 
666
                ssp_index++;
 
667
            }
 
668
            if (ssp == NULL) 
 
669
            {   /* No more to process. */
 
670
                BioseqUnlock(bsp);
 
671
                return NULL;
 
672
            }
656
673
            frame = SeqLocStart(ssp->loc);
657
674
            if (SeqLocStrand(ssp->loc) == Seq_strand_minus) {
658
675
                frame += SeqLocLen(ssp->loc);
663
680
        } else
664
681
            frame = 0;
665
682
        repr = bsp->repr;
666
 
        seq_data = bsp->seq_data;
 
683
        seq_data = (ByteStorePtr) bsp->seq_data;
667
684
        code = bsp->seq_data_type;
668
685
        seq_data_replaced = 
669
686
                replace_bytestore_data(bsp, bs_list, (Uint1)frame);
670
687
        if (!seq_data_replaced) {
671
688
            bsp->repr = repr;
672
 
            bsp->seq_data = seq_data;
 
689
            bsp->seq_data = (SeqDataPtr) seq_data;
673
690
            bsp->seq_data_type = code;
674
691
        }
675
692
    } else {
698
715
        if(matrix_allocated)
699
716
            free_default_matrix(as.matrix);
700
717
        HspFree(hsp);
 
718
        BioseqUnlock(bsp);
701
719
        return NULL;
702
720
    }
703
721
 
741
759
 
742
760
    /* Restore the original query sequence data, if it was replaced. */
743
761
    if (seq_data_replaced) {
744
 
        bsp->seq_data = seq_data;
 
762
        bsp->seq_data = (SeqDataPtr) seq_data;
745
763
        bsp->repr = repr;
746
764
        bsp->seq_data_type = code;
747
765
    }