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

« back to all changes in this revision

Viewing changes to object/objfdef.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:
29
29
*   
30
30
* Version Creation Date: 9/94
31
31
*
32
 
* $Revision: 6.21 $
 
32
* $Revision: 6.28 $
33
33
*
34
34
* File Description:  Object manager for feature definitions
35
35
*
187
187
*
188
188
*   FeatDefAsnRead(aip, atp)
189
189
*       atp is the current type (if identifier of a parent struct)
190
 
*            assumption is readIdent has occured
 
190
*            assumption is readIdent has occurred
191
191
*       if atp == NULL, then assumes it stands alone and read ident
192
 
*            has not occured.
 
192
*            has not occurred.
193
193
*
194
194
*****************************************************************************/
195
195
NLM_EXTERN FeatDefPtr LIBCALL FeatDefAsnRead (AsnIoPtr aip, AsnTypePtr orig)
316
316
*
317
317
*   FeatDefSetAsnRead(aip, atp)
318
318
*       atp is the current type (if identifier of a parent struct)
319
 
*            assumption is readIdent has occured
 
319
*            assumption is readIdent has occurred
320
320
*       if atp == NULL, then assumes it stands alone and read ident
321
 
*            has not occured.
 
321
*            has not occurred.
322
322
*
323
323
*****************************************************************************/
324
324
NLM_EXTERN FeatDefPtr LIBCALL FeatDefSetAsnRead (AsnIoPtr aip, AsnTypePtr orig)
442
442
*
443
443
*   FeatDispGroupAsnRead(aip, atp)
444
444
*       atp is the current type (if identifier of a parent struct)
445
 
*            assumption is readIdent has occured
 
445
*            assumption is readIdent has occurred
446
446
*       if atp == NULL, then assumes it stands alone and read ident
447
 
*            has not occured.
 
447
*            has not occurred.
448
448
*
449
449
*****************************************************************************/
450
450
NLM_EXTERN FeatDispGroupPtr LIBCALL FeatDispGroupAsnRead (AsnIoPtr aip, AsnTypePtr orig)
561
561
*
562
562
*   FeatDispGroupSetAsnRead(aip, atp)
563
563
*       atp is the current type (if identifier of a parent struct)
564
 
*            assumption is readIdent has occured
 
564
*            assumption is readIdent has occurred
565
565
*       if atp == NULL, then assumes it stands alone and read ident
566
 
*            has not occured.
 
566
*            has not occurred.
567
567
*
568
568
*****************************************************************************/
569
569
NLM_EXTERN FeatDispGroupPtr LIBCALL FeatDispGroupSetAsnRead (AsnIoPtr aip, AsnTypePtr orig)
609
609
}
610
610
 
611
611
static FeatDefPtr featdefp = NULL;
612
 
static FeatDefPtr PNTR featdeflookup;  /* kludge which assumes featdef_key in order */
 
612
static FeatDefPtr PNTR featdeflookup = NULL;  /* kludge which assumes featdef_key in order */
613
613
static Int2 numfdef, numfdispg;
614
614
static FeatDispGroupPtr featdgp;
615
615
 
643
643
"{ typelabel \"RNA\" , menulabel \"Other Types of RNA\" , featdef-key 11 , seqfeat-key 5 , entrygroup 3 , displaygroup 3 , molgroup na } ,\n" \
644
644
"{ typelabel \"Cit\" , menulabel \"Bibliographic Citations\" , featdef-key 12 , seqfeat-key 6 , entrygroup 4 , displaygroup 4 , molgroup both } ,\n" \
645
645
"{ typelabel \"Xref\" , menulabel \"Reference to Another Sequence\" , featdef-key 13 , seqfeat-key 7 , entrygroup 4 , displaygroup 4 , molgroup both } ,\n" \
646
 
"{ typelabel \"Imp\" , menulabel \"Unclassified ImpFeat\" , featdef-key 14 , seqfeat-key 8 , entrygroup 0 , displaygroup 0 , molgroup na } ,\n" \
 
646
"{ typelabel \"Import\" , menulabel \"Unclassified ImpFeat\" , featdef-key 14 , seqfeat-key 8 , entrygroup 0 , displaygroup 0 , molgroup na } ,\n" \
647
647
"{ typelabel \"allele\" , menulabel \"Allelic Varient\" , featdef-key 15 , seqfeat-key 8 , entrygroup 0 , displaygroup 1 , molgroup na } ,\n" \
648
648
"{ typelabel \"attenuator\" , menulabel \"Attenuator\" , featdef-key 16 , seqfeat-key 8 , entrygroup 0 , displaygroup 5 , molgroup na } ,\n" \
649
649
"{ typelabel \"C_region\" , menulabel \"Immunoglobin/T-cell receptor constant region\" , featdef-key 17 , seqfeat-key 8 , entrygroup 0 , displaygroup 1 , molgroup na } ,\n" \
719
719
"{ typelabel \"mat_peptide\" , menulabel \"Mature Peptide\" , featdef-key 87 , seqfeat-key 4 , entrygroup 1 , displaygroup 1 , molgroup aa } ,\n" \
720
720
"{ typelabel \"sig_peptide\" , menulabel \"Signal Peptide\" , featdef-key 88 , seqfeat-key 4 , entrygroup 1 , displaygroup 1 , molgroup aa } ,\n" \
721
721
"{ typelabel \"transit_peptide\" , menulabel \"Transit Peptide\" , featdef-key 89 , seqfeat-key 4 , entrygroup 1 , displaygroup 1 , molgroup aa } ,\n" \
722
 
"{ typelabel \"snoRNA\" , menulabel \"Small Nucleolar RNA\" , featdef-key 90 , seqfeat-key 5 , entrygroup 3 , displaygroup 3 , molgroup na } } };\n";
 
722
"{ typelabel \"snoRNA\" , menulabel \"Small Nucleolar RNA\" , featdef-key 90 , seqfeat-key 5 , entrygroup 3 , displaygroup 3 , molgroup na } ,\n" \
 
723
"{ typelabel \"gap\" , menulabel \"Gap\" , featdef-key 91 , seqfeat-key 8 , entrygroup 0 , displaygroup 4 , molgroup na } ,\n" \
 
724
"{ typelabel \"operon\" , menulabel \"Operon\" , featdef-key 92 , seqfeat-key 8 , entrygroup 1 , displaygroup 1 , molgroup na } ,\n" \
 
725
"{ typelabel \"oriT\" , menulabel \"Origin of Transcription\" , featdef-key 93 , seqfeat-key 8 , entrygroup 5 , displaygroup 5 , molgroup na  } } };\n";
723
726
#endif
724
727
 
725
728
/*****************************************************************************
733
736
{
734
737
        FeatDefPtr fdp;
735
738
        FeatDispGroupPtr fdgp;
736
 
        Int2 i;
 
739
        Int2 i, num;
737
740
        DataVal av;
738
741
        AsnTypePtr atp, oldtype;
739
742
 
774
777
        for (numfdef = 0, fdp = featdefp; fdp != NULL; fdp = fdp->next)
775
778
                numfdef++;
776
779
 
777
 
        featdeflookup = MemNew((size_t)(sizeof(FeatDefPtr) * numfdef));
 
780
        num = numfdef;
 
781
        if (num < FEATDEF_MAX) {
 
782
                num = FEATDEF_MAX;
 
783
        }
 
784
        featdeflookup = MemNew((size_t)(sizeof(FeatDefPtr) * num));
778
785
 
779
 
        for (i = 0, fdp = featdefp; i < numfdef; fdp = fdp->next, i++)
 
786
        for (i = 0, fdp = featdefp; fdp != NULL && i < numfdef; fdp = fdp->next, i++)
780
787
                featdeflookup[i] = fdp;
781
788
 
782
789
        for (numfdispg = 0, fdgp = featdgp; fdgp != NULL; fdgp = fdgp->next)
1044
1051
                                label = (grp->locus);
1045
1052
                        else if (grp->desc != NULL)
1046
1053
                                label = (grp->desc);
 
1054
                        else if (grp->locus_tag != NULL)
 
1055
                                label = (grp->locus_tag);
1047
1056
                        else if (grp->syn != NULL)
1048
1057
                                label = (CharPtr)(grp->syn->data.ptrvalue);
1049
1058
                        else if (grp->db != NULL)
1102
1111
                        if (grp != NULL &&
1103
1112
                                ((grp->locus != NULL && grp->locus [0] != '\0') ||
1104
1113
                                        grp->allele != NULL || grp->desc != NULL ||
1105
 
                                        grp->maploc != NULL || grp->pseudo ||
 
1114
                                        grp->maploc != NULL || grp->locus_tag != NULL || grp->pseudo ||
1106
1115
                                        grp->db != NULL || grp->syn != NULL)) goto generef;
1107
1116
                        break;
1108
1117
                case SEQFEAT_PROT: