~ubuntu-branches/ubuntu/precise/ncbi-tools6/precise

« back to all changes in this revision

Viewing changes to api/salpacc.c

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2005-03-27 12:00:15 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050327120015-embhesp32nj73p9r
Tags: 6.1.20041020-3
* Fix FTBFS under GCC 4.0 caused by inconsistent use of "static" on
  functions.  (Closes: #295110.)
* Add a watch file, now that we can.  (Upstream's layout needs version=3.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 *  Please cite the author in any work or product based on this material.
22
22
 *
23
23
 * ===========================================================================
24
 
 * $Id: salpacc.c,v 6.27 2000/11/16 22:13:44 shavirin Exp $
 
24
 * $Id: salpacc.c,v 6.31 2004/09/07 19:25:37 bollin Exp $
25
25
 Collection of SeqAlign Accession utilities.
26
26
 Maintainer: Hugues Sicotte
27
27
 Authors of the original routines: Hugues Sicotte, Colombe Chappey, Tom Madden, Jinghui Zhang
132
132
     sip = SeqIdPtrFromSeqAlign(salp);
133
133
     if (sip != NULL)
134
134
     {
135
 
        for (j=0; j<index; j++)
 
135
        for (j=0; j<index && sip != NULL; j++)
136
136
           sip = sip->next;
137
137
     }
138
138
  }
567
567
  Int2         dim;
568
568
  Uint1        moltype = 0;
569
569
  Boolean      molb;
 
570
  SeqAlignPtr  tmpsalp;
570
571
 
571
572
  if (salp==NULL)
572
573
     return FALSE;
573
 
  if (salp->segtype == 1) {
 
574
  if (salp->segtype == SAS_DENDIAG) {
574
575
     ddp = (DenseDiagPtr) salp->segs;
575
576
     sip = ddp->id;
576
577
     dim = ddp->dim;
577
578
  }
578
 
  else if (salp->segtype == 2) {
 
579
  else if (salp->segtype == SAS_DENSEG) {
579
580
     dsp = (DenseSegPtr) salp->segs;
580
581
     sip = dsp->ids;
581
582
     dim = dsp->dim;
582
583
  }
583
 
  else if (salp->segtype == 3) {
 
584
  else if (salp->segtype == SAS_STD) {
584
585
     ssp = (StdSegPtr) salp->segs;
585
586
     sip = ssp->ids;
586
587
     dim = ssp->dim; 
587
588
  }
 
589
  else if (salp->segtype == SAS_DISC) 
 
590
  {
 
591
         tmpsalp = (SeqAlignPtr) salp->segs;
 
592
         return SeqAlignMolType (tmpsalp);
 
593
  }
588
594
  if (sip!=NULL) {
589
595
   for (k = 0; k < dim && sip!=NULL; k++, sip = sip->next)
590
596
   {