~ubuntu-branches/ubuntu/saucy/ncbi-tools6/saucy-proposed

« back to all changes in this revision

Viewing changes to object/objseq.c

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2009-08-11 22:03:47 UTC
  • mfrom: (1.4.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: james.westby@ubuntu.com-20090811220347-g4b6lzdvphvvbpiu
* New upstream release.
* debian/libncbi6.symbols: update accordingly.
* debian/control: clean up obsolete or redundant relationship declarations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
*   
30
30
* Version Creation Date: 4/1/91
31
31
*
32
 
* $Revision: 6.33 $
 
32
* $Revision: 6.35 $
33
33
*
34
34
* File Description:  Object manager for module NCBI-Seq
35
35
*
760
760
        }
761
761
    }
762
762
 
 
763
    SeqIdSetFree(bsp->id);
 
764
    BioseqFreeComponents(bsp);
 
765
 
763
766
    if (! SeqMgrDelete(SM_BIOSEQ, (Pointer)bsp))
764
767
        ErrPostEx(SEV_ERROR, 0,0, "BioseqFree: pointer not registered");
765
768
 
766
 
    SeqIdSetFree(bsp->id);
767
 
    BioseqFreeComponents(bsp);
768
 
 
769
769
    if (top) {
770
770
        ObjMgrDeleteAllInRecord ();
771
771
    }
1015
1015
    AsnTypePtr tmp;
1016
1016
    DataVal    av;
1017
1017
    Boolean    tofree;
1018
 
    Boolean    retval;
 
1018
    Boolean    retval = FALSE;
1019
1019
    Uint1      newseqtype;
1020
1020
    ByteStorePtr  bsp;
 
1021
    AsnWriteFunc func = NULL;
1021
1022
 
1022
1023
    if((!loaded && !SeqAsnLoad()) || aip == NULL)
1023
1024
        return(FALSE);
1033
1034
        return(FALSE);
1034
1035
    }
1035
1036
 
1036
 
    if (seqtype == Seq_code_gap) return FALSE;
 
1037
    /* if (seqtype == Seq_code_gap) return FALSE; */
1037
1038
    bsp = (ByteStorePtr) sdp;
1038
1039
 
1039
1040
    tofree = FALSE;
1083
1084
        tmp = SEQ_DATA_ncbipaa;
1084
1085
    else if(seqtype == Seq_code_ncbistdaa)
1085
1086
        tmp = SEQ_DATA_ncbistdaa;
1086
 
    else if(seqtype == Seq_code_gap)
 
1087
    else if(seqtype == Seq_code_gap) {
1087
1088
        tmp = SEQ_DATA_gap;
1088
 
    else
 
1089
        func = (AsnWriteFunc) SeqGapAsnWrite;
 
1090
    } else
1089
1091
        tmp = NULL;
1090
1092
 
1091
 
    retval = AsnWrite(aip, tmp, &av);
 
1093
    if (func != NULL) {
 
1094
        retval = (* func) ((SeqGapPtr) sdp, aip, tmp);
 
1095
    } else {
 
1096
        retval = AsnWrite(aip, tmp, &av);
 
1097
    }
1092
1098
 
1093
1099
    AsnUnlinkType(orig);            /* unlink local tree */
1094
1100
    if(tofree != FALSE)