diff options
author | Aaron M. Ucko <ucko@debian.org> | 2005-03-23 17:39:07 +0000 |
---|---|---|
committer | Aaron M. Ucko <ucko@debian.org> | 2005-03-23 17:39:07 +0000 |
commit | a7c5bff619aa4850d09825888b5f46c7cd086f11 (patch) | |
tree | 2ab2dd2ff2977a5e0bcfdd90a17ca4f1a73181fc /cdromlib | |
parent | bfbecafe8b6142e8356e8447f0822b43e94b64b7 (diff) |
Load ncbi (6.1.20010709) into ncbi-tools6/branches/upstream/current.
Diffstat (limited to 'cdromlib')
-rw-r--r-- | cdromlib/accentr.c | 9 | ||||
-rw-r--r-- | cdromlib/accentr.h | 315 | ||||
-rw-r--r-- | cdromlib/accmmdbs.c | 19 | ||||
-rw-r--r-- | cdromlib/accutils.c | 480 | ||||
-rw-r--r-- | cdromlib/accutils.h | 32 | ||||
-rw-r--r-- | cdromlib/casn.c | 9 | ||||
-rw-r--r-- | cdromlib/cdentrez.c | 9 | ||||
-rw-r--r-- | cdromlib/cdnewlib.c | 9 | ||||
-rw-r--r-- | cdromlib/ncbicdr.dsp | 142 | ||||
-rw-r--r-- | cdromlib/ncbinacc.dsp | 111 | ||||
-rw-r--r-- | cdromlib/objentr.h | 7 |
11 files changed, 515 insertions, 627 deletions
diff --git a/cdromlib/accentr.c b/cdromlib/accentr.c index 0b2219b1..d01b6a6d 100644 --- a/cdromlib/accentr.c +++ b/cdromlib/accentr.c @@ -23,7 +23,7 @@ * * =========================================================================== * - * RCS $Id: accentr.c,v 6.5 1999/01/06 14:18:35 grisha Exp $ + * RCS $Id: accentr.c,v 6.6 2000/01/12 20:17:12 vakatov Exp $ * * Author: Ostell * @@ -48,6 +48,9 @@ * modification comments. * * Revision $Log: accentr.c,v $ + * Revision Revision 6.6 2000/01/12 20:17:12 vakatov + * Revision Get rid of the LIBCALL specifier at EntrezSeqEntryGet() + * Revision * Revision Revision 6.5 1999/01/06 14:18:35 grisha * Revision add defines to switch ID0/ID1 usage * Revision @@ -277,7 +280,7 @@ * ========================================================================== */ -#define REVISION_STR "$Revision: 6.5 $" +#define REVISION_STR "$Revision: 6.6 $" #include <accentr.h> #include <seqmgr.h> @@ -2350,7 +2353,7 @@ NLM_EXTERN Int2 LIBCALL EntrezSeqEntryListGet (SeqEntryPtr PNTR result, Int2 num * get one SeqEntry * *****************************************************************************/ -NLM_EXTERN SeqEntryPtr LIBCALL EntrezSeqEntryGet (Int4 uid, Int2 retcode) +NLM_EXTERN SeqEntryPtr EntrezSeqEntryGet (Int4 uid, Int2 retcode) { SeqEntryPtr sep = NULL; diff --git a/cdromlib/accentr.h b/cdromlib/accentr.h index 9db1e773..4cf8b352 100644 --- a/cdromlib/accentr.h +++ b/cdromlib/accentr.h @@ -23,7 +23,7 @@ * * =========================================================================== * -* RCS $Id: accentr.h,v 6.0 1997/08/25 18:12:31 madden Exp $ +* RCS $Id: accentr.h,v 6.1 2000/01/12 20:17:13 vakatov Exp $ * * Author: Ostell * @@ -51,90 +51,66 @@ * 05-16-94 Schuler Added RCS Log directive. Comments will henceforth * be inserted automatically into the source at the * time it is checked into the system. -$Log: accentr.h,v $ -Revision 6.0 1997/08/25 18:12:31 madden -Revision changed to 6.0 - -Revision 5.10 1997/07/28 13:30:41 ostell -Moved GetUniGeneIDForSeqId() to seqmgr.c - -Revision 5.9 1997/06/26 21:55:14 vakatov -[PC] DLL'd "ncbicdr.lib", "ncbiacc.lib", "ncbinacc.lib" and "ncbicacc.lib" - -Revision 5.8 1996/12/02 22:20:52 brandon -*** empty log message *** - - * Revision 5.7 1996/12/02 22:14:52 brandon - * *** empty log message *** - * - * Revision 5.6 1996/12/02 22:10:46 brandon - * *** empty log message *** - * - * Revision 5.5 1996/09/23 21:21:33 shavirin - * Added definition for the function AccessionToFasta - * - * Revision 5.4 1996/08/14 19:56:09 epstein - * add APIs for fetching pieces of biostruc annots - * - * Revision 5.3 1996/08/14 17:08:29 brandon - * *** empty log message *** - * - * Revision 5.1 1996/08/14 15:15:05 brandon - * added date parameter to tleval functions - * - * Revision 5.0 1996/05/28 13:55:34 ostell - * Set to revision 5.0 - * - * Revision 4.8 1996/05/14 21:02:10 epstein - * adjust field descriptions to reflect current reality - * - * Revision 4.7 1996/03/29 18:52:51 epstein - * add support for structure alignments - * - * Revision 4.6 1996/03/11 21:51:03 ostell - * made GetUniGeneIDForSeqId() externally visible - * - * Revision 4.5 1995/10/11 13:39:29 epstein - * add EntrezIsInited() function - * - * Revision 4.4 1995/10/02 02:35:50 epstein - * add range-checking - * - * Revision 4.3 1995/08/28 23:20:47 kans - * Biostruc_supported restored - * - * Revision 4.2 1995/08/21 19:42:16 epstein - * add cluster analysis - * - * Revision 4.1 1995/08/11 20:25:53 epstein - * add max-models support for biostrucs - * - * Revision 4.0 1995/07/26 13:50:32 ostell - * force revision to 4.0 - * - * Revision 2.44 1995/07/25 18:47:57 kans - * revert to no Biostruc_supported - * - * Revision 2.43 1995/07/05 19:15:46 ostell - * changed prototype for BiostrucAvail to be included only once - * - * Revision 2.42 1995/06/29 15:57:46 epstein - * added Complexity argument when fetching structures - * - * Revision 2.41 95/06/26 18:07:13 kans - * restored #define Biostruc_supported - * - * Revision 2.39 1995/06/23 16:02:43 kans - * support for accmmdbs.c stub to resolve symbols without MMDB link - * - * Revision 2.38 1995/06/22 21:21:22 kans - * #define Biostruc_supported - * - * Revision 2.37 1995/05/16 14:12:46 schuler - * Automatic comment insertion enabled - * - - +* $Log: accentr.h,v $ +* Revision 6.1 2000/01/12 20:17:13 vakatov +* Get rid of the LIBCALL specifier at EntrezSeqEntryGet() +* +* Revision 5.10 1997/07/28 13:30:41 ostell +* Moved GetUniGeneIDForSeqId() to seqmgr.c +* +* Revision 5.9 1997/06/26 21:55:14 vakatov +* [PC] DLL'd "ncbicdr.lib", "ncbiacc.lib", "ncbinacc.lib" and "ncbicacc.lib" +* +* Revision 5.5 1996/09/23 21:21:33 shavirin +* Added definition for the function AccessionToFasta +* +* Revision 5.4 1996/08/14 19:56:09 epstein +* add APIs for fetching pieces of biostruc annots +* +* Revision 5.1 1996/08/14 15:15:05 brandon +* added date parameter to tleval functions +* +* Revision 4.8 1996/05/14 21:02:10 epstein +* adjust field descriptions to reflect current reality +* +* Revision 4.7 1996/03/29 18:52:51 epstein +* add support for structure alignments +* +* Revision 4.6 1996/03/11 21:51:03 ostell +* made GetUniGeneIDForSeqId() externally visible +* +* Revision 4.5 1995/10/11 13:39:29 epstein +* add EntrezIsInited() function +* +* Revision 4.4 1995/10/02 02:35:50 epstein +* add range-checking +* +* Revision 4.3 1995/08/28 23:20:47 kans +* Biostruc_supported restored +* +* Revision 4.2 1995/08/21 19:42:16 epstein +* add cluster analysis +* +* Revision 4.1 1995/08/11 20:25:53 epstein +* add max-models support for biostrucs +* +* Revision 2.44 1995/07/25 18:47:57 kans +* revert to no Biostruc_supported +* +* Revision 2.43 1995/07/05 19:15:46 ostell +* changed prototype for BiostrucAvail to be included only once +* +* Revision 2.42 1995/06/29 15:57:46 epstein +* added Complexity argument when fetching structures +* +* Revision 2.41 95/06/26 18:07:13 kans +* restored #define Biostruc_supported +* +* Revision 2.39 1995/06/23 16:02:43 kans +* support for accmmdbs.c stub to resolve symbols without MMDB link +* +* Revision 2.38 1995/06/22 21:21:22 kans +* #define Biostruc_supported * ========================================================================== */ @@ -167,18 +143,6 @@ Revision 5.8 1996/12/02 22:20:52 brandon #include <mmdbapi1.h> #include <mmdbapi2.h> #include <mmdbapi3.h> -#else -typedef struct { int bogus; } Biostruc, *BiostrucPtr; - -/***************************************************************************** -* -* BiostrucAvail is in the accmmdbs.c stub (returning FALSE) and in -* bios2ff7.c (returning TRUE). The stub file also has BiostrucAsnRead -* and BiostrucAsnWrite empty functions for proper linking without MMDB. -* -*****************************************************************************/ - -NLM_EXTERN Boolean LIBCALL BiostrucAvail PROTO((void)); #endif @@ -193,6 +157,22 @@ NLM_EXTERN Boolean LIBCALL BiostrucAvail PROTO((void)); extern "C" { #endif + +#ifndef Biostruc_supported +typedef struct { int bogus; } Biostruc, *BiostrucPtr; + +/***************************************************************************** +* +* BiostrucAvail is in the accmmdbs.c stub (returning FALSE) and in +* bios2ff7.c (returning TRUE). The stub file also has BiostrucAsnRead +* and BiostrucAsnWrite empty functions for proper linking without MMDB. +* +*****************************************************************************/ + +NLM_EXTERN Boolean LIBCALL BiostrucAvail(void); +#endif + + /* --- Type Definitions --- */ typedef DocUid *DocUidPtr; @@ -271,7 +251,7 @@ typedef struct FastaSeq { #define TERM__EXPLODE 1 -typedef Boolean (*DocSumListCallBack) PROTO((DocSumPtr dsp, DocUid uid)); +typedef Boolean (*DocSumListCallBack)(DocSumPtr dsp, DocUid uid); typedef struct EntrezHierarchyChild { @@ -314,122 +294,122 @@ typedef struct EntrezNeighborText { /**** Initialize and close session *********************/ -/* Note: */ -/* The EntrezInitWithExtras() capability is provided for backwards */ -/* compatability until May, 1994. This name was introduced as a temporary */ -/* interface to EntrezInit(), to smooth the transition for EntrezInit()'s */ -/* use of three parameters; previously it took no parameters. */ -/* */ -/* - J. Epstein, 17 Feb 1994 */ +/* Note: */ +/* The EntrezInitWithExtras() capability is provided for backwards */ +/* compatability until May, 1994. This name was introduced as a temporary */ +/* interface to EntrezInit(), to smooth the transition for EntrezInit()'s */ +/* use of three parameters; previously it took no parameters. */ +/* */ +/* - J. Epstein, 17 Feb 1994 */ #define EntrezInitWithExtras(a,b,c) EntrezInit(a,b,c) -NLM_EXTERN Boolean LIBCALL EntrezInit PROTO((CharPtr appl_id, Boolean no_warnings, BoolPtr is_network)); -NLM_EXTERN Boolean LIBCALL EntrezIsInited PROTO((void)); -NLM_EXTERN void LIBCALL EntrezFini PROTO((void)); +NLM_EXTERN Boolean LIBCALL EntrezInit(CharPtr appl_id, Boolean no_warnings, BoolPtr is_network); +NLM_EXTERN Boolean LIBCALL EntrezIsInited(void); +NLM_EXTERN void LIBCALL EntrezFini(void); /**** Get names and numbers of fields and types ********/ -NLM_EXTERN EntrezInfoPtr LIBCALL EntrezGetInfo PROTO((void)); +NLM_EXTERN EntrezInfoPtr LIBCALL EntrezGetInfo(void); /**** Creates a term node from the uid parameter ********/ -NLM_EXTERN void LIBCALL EntrezCreateNamedUidList PROTO((CharPtr term, DocType type, DocField field, Int4 num, DocUidPtr uids)); -NLM_EXTERN void LIBCALL EntrezCreateNamedUidListX PROTO((CharPtr term, DocType type, DocField field, ByteStorePtr bsp)); +NLM_EXTERN void LIBCALL EntrezCreateNamedUidList(CharPtr term, DocType type, DocField field, Int4 num, DocUidPtr uids); +NLM_EXTERN void LIBCALL EntrezCreateNamedUidListX(CharPtr term, DocType type, DocField field, ByteStorePtr bsp); /**** Get detailed text information about the current status *****/ -NLM_EXTERN CharPtr LIBCALL EntrezDetailedInfo PROTO((void)); +NLM_EXTERN CharPtr LIBCALL EntrezDetailedInfo(void); /**** Get Links and Neighbors **************************/ -NLM_EXTERN Int4 LIBCALL EntrezGetMaxLinks PROTO((void)); -NLM_EXTERN Int4 LIBCALL EntrezSetUserMaxLinks PROTO((Int4 usermax)); -NLM_EXTERN Int4 LIBCALL EntrezGetUserMaxLinks PROTO((void)); +NLM_EXTERN Int4 LIBCALL EntrezGetMaxLinks(void); +NLM_EXTERN Int4 LIBCALL EntrezSetUserMaxLinks(Int4 usermax); +NLM_EXTERN Int4 LIBCALL EntrezGetUserMaxLinks(void); -NLM_EXTERN LinkSetPtr LIBCALL EntrezUidLinks PROTO((DocType type, DocUid uid, DocType link_to_type)); -NLM_EXTERN Int2 LIBCALL EntrezLinkUidList PROTO((LinkSetPtr PNTR result, DocType type, DocType link_to_type, Int2 numuid, Int4Ptr uids, Boolean mark_missing)); +NLM_EXTERN LinkSetPtr LIBCALL EntrezUidLinks(DocType type, DocUid uid, DocType link_to_type); +NLM_EXTERN Int2 LIBCALL EntrezLinkUidList(LinkSetPtr PNTR result, DocType type, DocType link_to_type, Int2 numuid, Int4Ptr uids, Boolean mark_missing); /**** Get Summaries ************************************/ -NLM_EXTERN DocSumPtr LIBCALL EntrezDocSum PROTO((DocType type, DocUid uid)); -NLM_EXTERN DocSumPtr LIBCALL DocSumFree PROTO((DocSumPtr dsp)); -NLM_EXTERN Int2 LIBCALL EntrezDocSumListGet PROTO((Int2 numuid, DocType type, DocUidPtr uids, DocSumListCallBack callback)); -NLM_EXTERN Int2 LIBCALL EntrezMlSumListGet PROTO((DocSumPtr PNTR result, Int2 numuid, Int4Ptr uids)); -NLM_EXTERN Int2 LIBCALL EntrezSeqSumListGet PROTO((DocSumPtr PNTR result, Int2 numuid, DocType type, Int4Ptr uids)); +NLM_EXTERN DocSumPtr LIBCALL EntrezDocSum(DocType type, DocUid uid); +NLM_EXTERN DocSumPtr LIBCALL DocSumFree(DocSumPtr dsp); +NLM_EXTERN Int2 LIBCALL EntrezDocSumListGet(Int2 numuid, DocType type, DocUidPtr uids, DocSumListCallBack callback); +NLM_EXTERN Int2 LIBCALL EntrezMlSumListGet(DocSumPtr PNTR result, Int2 numuid, Int4Ptr uids); +NLM_EXTERN Int2 LIBCALL EntrezSeqSumListGet(DocSumPtr PNTR result, Int2 numuid, DocType type, Int4Ptr uids); /**** Get Term Lists ***********************************/ -typedef Boolean (*TermListProc) PROTO((CharPtr term, Int4 special, Int4 total)); +typedef Boolean (*TermListProc)(CharPtr term, Int4 special, Int4 total); -NLM_EXTERN Int2 LIBCALL EntrezTermListByPage PROTO((DocType type, DocField field, Int2 page, Int2 numpage, TermListProc proc)); -NLM_EXTERN Int2 LIBCALL EntrezTermListByTerm PROTO((DocType type, DocField field, CharPtr term, Int2 numterms, TermListProc proc, Int2Ptr first_page)); +NLM_EXTERN Int2 LIBCALL EntrezTermListByPage(DocType type, DocField field, Int2 page, Int2 numpage, TermListProc proc); +NLM_EXTERN Int2 LIBCALL EntrezTermListByTerm(DocType type, DocField field, CharPtr term, Int2 numterms, TermListProc proc, Int2Ptr first_page); -NLM_EXTERN Boolean LIBCALL EntrezFindTerm PROTO((DocType type, DocField field, CharPtr term, Int4Ptr spcl, Int4Ptr totl)); +NLM_EXTERN Boolean LIBCALL EntrezFindTerm(DocType type, DocField field, CharPtr term, Int4Ptr spcl, Int4Ptr totl); /**** Look up terms with Boolean operations ************/ -NLM_EXTERN ValNodePtr LIBCALL EntrezTLNew PROTO((DocType type)); -NLM_EXTERN ValNodePtr LIBCALL EntrezTLAddTerm PROTO((ValNodePtr elst, CharPtr term, DocType type, DocField field, Boolean special)); -NLM_EXTERN ValNodePtr LIBCALL EntrezTLAddTermWithRange PROTO((ValNodePtr elst, CharPtr term, DocType type, DocField field, Boolean special, CharPtr highRange)); -NLM_EXTERN ValNodePtr LIBCALL EntrezTLAddLParen PROTO((ValNodePtr elst)); -NLM_EXTERN ValNodePtr LIBCALL EntrezTLAddRParen PROTO((ValNodePtr elst)); -NLM_EXTERN ValNodePtr LIBCALL EntrezTLAddAND PROTO((ValNodePtr elst)); -NLM_EXTERN ValNodePtr LIBCALL EntrezTLAddOR PROTO((ValNodePtr elst)); -NLM_EXTERN ValNodePtr LIBCALL EntrezTLAddBUTNOT PROTO((ValNodePtr elst)); -NLM_EXTERN ValNodePtr LIBCALL EntrezTLFree PROTO((ValNodePtr elst)); -NLM_EXTERN LinkSetPtr LIBCALL EntrezPMTLEval PROTO((ValNodePtr elst, void * edc)); -NLM_EXTERN Int4 LIBCALL EntrezPMTLEvalCount PROTO((ValNodePtr elst, void * edc)); -NLM_EXTERN ByteStorePtr LIBCALL EntrezPMTLEvalX PROTO((ValNodePtr elst, void * edc)); -NLM_EXTERN LinkSetPtr LIBCALL EntrezTLEval PROTO((ValNodePtr elst)); -NLM_EXTERN Int4 LIBCALL EntrezTLEvalCount PROTO((ValNodePtr elst)); -NLM_EXTERN ByteStorePtr LIBCALL EntrezTLEvalX PROTO((ValNodePtr elst)); +NLM_EXTERN ValNodePtr LIBCALL EntrezTLNew(DocType type); +NLM_EXTERN ValNodePtr LIBCALL EntrezTLAddTerm(ValNodePtr elst, CharPtr term, DocType type, DocField field, Boolean special); +NLM_EXTERN ValNodePtr LIBCALL EntrezTLAddTermWithRange(ValNodePtr elst, CharPtr term, DocType type, DocField field, Boolean special, CharPtr highRange); +NLM_EXTERN ValNodePtr LIBCALL EntrezTLAddLParen(ValNodePtr elst); +NLM_EXTERN ValNodePtr LIBCALL EntrezTLAddRParen(ValNodePtr elst); +NLM_EXTERN ValNodePtr LIBCALL EntrezTLAddAND(ValNodePtr elst); +NLM_EXTERN ValNodePtr LIBCALL EntrezTLAddOR(ValNodePtr elst); +NLM_EXTERN ValNodePtr LIBCALL EntrezTLAddBUTNOT(ValNodePtr elst); +NLM_EXTERN ValNodePtr LIBCALL EntrezTLFree(ValNodePtr elst); +NLM_EXTERN LinkSetPtr LIBCALL EntrezPMTLEval(ValNodePtr elst, void * edc); +NLM_EXTERN Int4 LIBCALL EntrezPMTLEvalCount(ValNodePtr elst, void * edc); +NLM_EXTERN ByteStorePtr LIBCALL EntrezPMTLEvalX(ValNodePtr elst, void * edc); +NLM_EXTERN LinkSetPtr LIBCALL EntrezTLEval(ValNodePtr elst); +NLM_EXTERN Int4 LIBCALL EntrezTLEvalCount(ValNodePtr elst); +NLM_EXTERN ByteStorePtr LIBCALL EntrezTLEvalX(ValNodePtr elst); /**** Look Up a Uid from a SeqId using the Terms list ****/ -NLM_EXTERN Int4 LIBCALL EntrezFindSeqId PROTO((SeqIdPtr sip)); +NLM_EXTERN Int4 LIBCALL EntrezFindSeqId(SeqIdPtr sip); /**** Look Up the source SeqId given a GI ****************/ -NLM_EXTERN SeqIdPtr LIBCALL EntrezSeqIdForGI PROTO ((Int4 gi)); +NLM_EXTERN SeqIdPtr LIBCALL EntrezSeqIdForGI(Int4 gi); /**** Look Up the Fasta entry given a GI or Accession ****/ -NLM_EXTERN FastaSeqPtr LIBCALL AccessionToFasta PROTO ((CharPtr string)); +NLM_EXTERN FastaSeqPtr LIBCALL AccessionToFasta(CharPtr string); /**** Get Sequence or MEDLINE data **********************/ -NLM_EXTERN Int2 LIBCALL EntrezSeqEntryListGet PROTO((SeqEntryPtr PNTR result, Int2 numuid, Int4Ptr uids, Int2 retcode, Boolean mark_missing)); -NLM_EXTERN SeqEntryPtr LIBCALL EntrezSeqEntryGet PROTO((Int4 uid, Int2 retcode)); +NLM_EXTERN Int2 LIBCALL EntrezSeqEntryListGet(SeqEntryPtr PNTR result, Int2 numuid, Int4Ptr uids, Int2 retcode, Boolean mark_missing); +NLM_EXTERN SeqEntryPtr EntrezSeqEntryGet(Int4 uid, Int2 retcode); -NLM_EXTERN Int2 LIBCALL EntrezMedlineEntryListGet PROTO((MedlineEntryPtr PNTR result, Int2 numuid, Int4Ptr uids, Boolean mark_missing)); -NLM_EXTERN MedlineEntryPtr LIBCALL EntrezMedlineEntryGet PROTO((Int4 uid)); +NLM_EXTERN Int2 LIBCALL EntrezMedlineEntryListGet(MedlineEntryPtr PNTR result, Int2 numuid, Int4Ptr uids, Boolean mark_missing); +NLM_EXTERN MedlineEntryPtr LIBCALL EntrezMedlineEntryGet(Int4 uid); #ifdef _PMENTREZ_ -Int2 LIBCALL EntrezPubmedEntryListGet PROTO((PubmedEntryPtr PNTR result, Int2 numuid, Int4Ptr uids, Boolean mark_missing)); -PubmedEntryPtr LIBCALL EntrezPubmedEntryGet PROTO((Int4 uid)); +Int2 LIBCALL EntrezPubmedEntryListGet(PubmedEntryPtr PNTR result, Int2 numuid, Int4Ptr uids, Boolean mark_missing); +PubmedEntryPtr LIBCALL EntrezPubmedEntryGet(Int4 uid); #endif -NLM_EXTERN BiostrucPtr LIBCALL EntrezBiostrucGet PROTO((DocUid uid, Int4 mdlLvl, Int4 maxModels)); -NLM_EXTERN BiostrucAnnotSetPtr LIBCALL EntrezBiostrucAnnotSetGet PROTO((DocUid uid)); -NLM_EXTERN LinkSetPtr LIBCALL EntrezBiostrucFeatIds PROTO((DocUid mmdbid, Int2 feature_type, Int4 feature_set_id)); -NLM_EXTERN BiostrucAnnotSetPtr LIBCALL EntrezBiostrucAnnotSetGetByFid PROTO((DocUid mmdbid, Int4 feature_id, Int4 feature_set_id)); +NLM_EXTERN BiostrucPtr LIBCALL EntrezBiostrucGet(DocUid uid, Int4 mdlLvl, Int4 maxModels); +NLM_EXTERN BiostrucAnnotSetPtr LIBCALL EntrezBiostrucAnnotSetGet(DocUid uid); +NLM_EXTERN LinkSetPtr LIBCALL EntrezBiostrucFeatIds(DocUid mmdbid, Int2 feature_type, Int4 feature_set_id); +NLM_EXTERN BiostrucAnnotSetPtr LIBCALL EntrezBiostrucAnnotSetGetByFid(DocUid mmdbid, Int4 feature_id, Int4 feature_set_id); -NLM_EXTERN EntrezHierarchyPtr LIBCALL EntrezHierarchyGet PROTO((CharPtr term,DocType type, DocField fld)); -NLM_EXTERN EntrezHierarchyPtr LIBCALL EntrezHierarchyFree PROTO ((EntrezHierarchyPtr ehp)); +NLM_EXTERN EntrezHierarchyPtr LIBCALL EntrezHierarchyGet(CharPtr term,DocType type, DocField fld); +NLM_EXTERN EntrezHierarchyPtr LIBCALL EntrezHierarchyFree(EntrezHierarchyPtr ehp); /***** Neighbor text on-the-fly ***********/ -NLM_EXTERN EntrezNeighborTextPtr LIBCALL EntrezNeighborTextFree PROTO ((EntrezNeighborTextPtr )); -NLM_EXTERN EntrezNeighborTextPtr LIBCALL EntrezNeighborTextNew PROTO (( void )); -NLM_EXTERN LinkSetPtr LIBCALL EntrezDoNeighborText PROTO((EntrezNeighborTextPtr entp)); -NLM_EXTERN Boolean LIBCALL EntrezCanNeighborText PROTO((void)); +NLM_EXTERN EntrezNeighborTextPtr LIBCALL EntrezNeighborTextFree(EntrezNeighborTextPtr ); +NLM_EXTERN EntrezNeighborTextPtr LIBCALL EntrezNeighborTextNew(void); +NLM_EXTERN LinkSetPtr LIBCALL EntrezDoNeighborText(EntrezNeighborTextPtr entp); +NLM_EXTERN Boolean LIBCALL EntrezCanNeighborText(void); -NLM_EXTERN Boolean LIBCALL EntrezExpandedMedlineFeatures PROTO((void)); -NLM_EXTERN Int4 LIBCALL EntrezClusterAnalysis PROTO((DocUidPtr uids, Int4 numuids, DocField fld, Int4 minCluster, Int4 maxCluster, Int4 maxTerms, CharPtr *terms, Int4Ptr termTotals)); +NLM_EXTERN Boolean LIBCALL EntrezExpandedMedlineFeatures(void); +NLM_EXTERN Int4 LIBCALL EntrezClusterAnalysis(DocUidPtr uids, Int4 numuids, DocField fld, Int4 minCluster, Int4 maxCluster, Int4 maxTerms, CharPtr *terms, Int4Ptr termTotals); /***** on-the-fly BLAST *****/ -NLM_EXTERN LinkSetPtr LIBCALL EntrezBlastBioseq PROTO((BioseqPtr bsp, DocType db, CharPtr program, CharPtr database, CharPtr options, Boolean usemonitor)); -NLM_EXTERN Boolean LIBCALL EntrezCanBlast PROTO((void)); +NLM_EXTERN LinkSetPtr LIBCALL EntrezBlastBioseq(BioseqPtr bsp, DocType db, CharPtr program, CharPtr database, CharPtr options, Boolean usemonitor); +NLM_EXTERN Boolean LIBCALL EntrezCanBlast(void); /***************************************************************************** * @@ -445,11 +425,12 @@ NLM_EXTERN Boolean LIBCALL EntrezCanBlast PROTO((void)); * call, and yours will be call AFTER entrez. * *****************************************************************************/ -NLM_EXTERN Boolean LIBCALL EntrezBioseqFetchEnable PROTO((CharPtr progname, Boolean now)); -NLM_EXTERN void LIBCALL EntrezBioseqFetchDisable PROTO((void)); +NLM_EXTERN Boolean LIBCALL EntrezBioseqFetchEnable(CharPtr progname, Boolean now); +NLM_EXTERN void LIBCALL EntrezBioseqFetchDisable(void); + #ifdef __cplusplus -} +} /* extern "C" */ #endif #undef NLM_EXTERN diff --git a/cdromlib/accmmdbs.c b/cdromlib/accmmdbs.c index 996f48a9..ca84b092 100644 --- a/cdromlib/accmmdbs.c +++ b/cdromlib/accmmdbs.c @@ -38,6 +38,12 @@ * ------- ---------- ----------------------------------------------------- * * $Log: accmmdbs.c,v $ + * Revision 6.2 2001/06/21 14:21:55 thiessen + * add BiostrucId... stubs + * + * Revision 6.1 1999/03/03 21:27:34 kans + * added stub for ClearStructures + * * Revision 6.0 1997/08/25 18:12:33 madden * Revision changed to 6.0 * @@ -134,6 +140,9 @@ NLM_EXTERN void LIBCALL FreeAModelstruc(PDNMS pdnmsThis) NLM_EXTERN PDNMS LIBCALL MakeAModelstruc(BiostrucPtr pbsThis) { return NULL; } +NLM_EXTERN void LIBCALL ClearStructures(void) +{ } + NLM_EXTERN BiostrucPtr LIBCALL BiostrucAsnRead(AsnIoPtr aip, AsnTypePtr orig) { return NULL; } @@ -208,3 +217,13 @@ NLM_EXTERN BiostrucFeatureSetPtr LIBCALL BiostrucFeatureSetNew(void) NLM_EXTERN BiostrucFeaturePtr LIBCALL BiostrucFeatureNew(void) { return NULL; } + +NLM_EXTERN BiostrucIdPtr LIBCALL BiostrucIdFree(BiostrucIdPtr ptr) +{ return NULL; } + +NLM_EXTERN BiostrucIdPtr LIBCALL BiostrucIdAsnRead(AsnIoPtr io, AsnTypePtr type) +{ return NULL; } + +NLM_EXTERN Boolean LIBCALL BiostrucIdAsnWrite(BiostrucIdPtr id, AsnIoPtr io, AsnTypePtr type) +{ return FALSE; } + diff --git a/cdromlib/accutils.c b/cdromlib/accutils.c index 4f433114..50c98d81 100644 --- a/cdromlib/accutils.c +++ b/cdromlib/accutils.c @@ -23,7 +23,7 @@ * * =========================================================================== * - * RCS $Id: accutils.c,v 6.7 1999/01/06 14:18:36 grisha Exp $ + * RCS $Id: accutils.c,v 6.15 1999/04/01 13:56:34 sicotte Exp $ * * Author: J. Epstein * @@ -35,6 +35,37 @@ * Modifications: * -------------------------------------------------------------------------- * $Log: accutils.c,v $ + * Revision 6.15 1999/04/01 13:56:34 sicotte + * Moved WHICH_db_accession,IS_ntdb_accession,IS_protdb_accession to + * sequtil.ch + * Removed old static functions of Colombe (that are public in salutil.c) + * The only code left in accutils.c is the Entrez Access code. + * + * Revision 6.14 1999/03/31 21:13:47 sicotte + * Add info on N-accessions + * + * Revision 6.13 1999/03/31 13:34:18 sicotte + * in WHICH_ntdb_accession, swapped (C** and B** prot accession for embl/ddbj) + * + * Revision 6.12 1999/03/18 20:24:05 sicotte + * changed the define name for NC_ accession + * + * Revision 6.11 1999/03/18 20:18:18 sicotte + * added REFSEQ accession numbers and macro ACCN_IS_GENBANK() + * + * Revision 6.10 1999/03/18 15:34:04 sicotte + * Updated Accession List and added protein Accessions + * for functions IS_ntdb_accession and IS_protdb_accession. + * New function WHICH_db_accession with return code allowing + * to figure out the molecule type and the database from macros + * in accutils.h + * + * Revision 6.9 1999/02/24 16:48:09 kans + * added IS_ntdb_accession and IS_protdb_accession, removed NormalizeSeqAlignId + * + * Revision 6.8 1999/01/27 16:20:51 chappey + * update IS_ntdb_accession with AB, AJ + * * Revision 6.7 1999/01/06 14:18:36 grisha * add defines to switch ID0/ID1 usage * @@ -113,7 +144,7 @@ * ========================================================================== */ -#define REVISION_STR "$Revision: 6.7 $" +#define REVISION_STR "$Revision: 6.15 $" #include <accutils.h> #ifndef _CDROMLIB_ @@ -168,444 +199,7 @@ static ValNode nextRealNode; static Int2 lastGood = -1; static Int2 lastBad = -1; -/****************************COLOMBE **************************/ - -static Int4 CCAccessionToGi (CharPtr string) -{ - CharPtr str; - LinkSetPtr lsp; - Int4 gi; - - str = MemNew (StringLen (string) + 10); - sprintf (str, "\"%s\" [ACCN]", string); - lsp = EntrezTLEvalString (str, TYP_NT, -1, NULL, NULL); - MemFree (str); - if (lsp == NULL) return 0; - if (lsp->num <= 0) { - LinkSetFree (lsp); - return 0; - } - gi = lsp->uids [0]; - LinkSetFree (lsp); - return gi; -} - -/***************************************************************************** -* -* Function: IS_ntdb_accession -* -* Description: Return TRUE if the input string is a validly formatted -* nucleotide database accession number (GenBank, EMBL, DDBJ) -* -* Arguments: s : CharPtr; pointer to accession number string. -* Must be null terminated. -* -* Author: Mark Cavanaugh -* Date: 7/96 -* -* WARNING: IS_ntdb_accession() does not communicate with any central -* resource about accession numbers. So there's no way to -* inform it automatically about new accession number prefixes. -* -*****************************************************************************/ -static Boolean IS_ntdb_accession(CharPtr s) -{ - Boolean retval = TRUE; - - Boolean first = TRUE; - CharPtr temp; - - if (s == NULL || ! *s) - return FALSE; - - switch (StringLen(s)) { - - case 6: /* Old-style 6-character accession */ - while (*s) { - if (retval == FALSE) - break; - - if (first) { - if (! IS_ALPHA(*s)) { - retval = FALSE; - break; - } - - switch (TO_UPPER(*s)) { - case 'H': case 'N': case 'R': case 'T': case 'W': /* GenBank : EST */ - break; - case 'B': case 'G': case 'I': case 'S': case 'U': /* GenBank : non-EST */ - break; - case 'J': case 'K': case 'L': case 'M': /* GenBank : before NCBI */ - break; - case 'A': case 'F': case 'V': case 'X': case 'Y': case 'Z': /* EMBL */ - break; - case 'C': case 'D': case 'E': /* DDBJ */ - break; - default: - retval = FALSE; - break; - } - first = FALSE; - } - else { - if (! IS_DIGIT(*s)) { - retval = FALSE; - } - } - s++; - } - break; - case 8: /* New 8-character accession, two letters + 6 digits */ - - /* Copy the first two chars of the accession to a buffer */ - - temp = (CharPtr) MemNew(3); - - temp[0] = *s; s++; - temp[1] = *s; s++; - temp[2] = '\0'; - - if ((StringICmp(temp,"AA") == 0) || /* NCBI EST */ - (StringICmp(temp,"AC") == 0) || /* NCBI HTGS */ - (StringICmp(temp,"AF") == 0) || /* NCBI ??? */ - (StringICmp(temp,"AD") == 0) ) { /* NCBI accessions assigned to GSDB entries */ - /* No-op */ - } - else if ( (StringICmp(temp,"AB") == 0) ) { /* DDBJ */ - /* No-op */ - } - else { - retval = FALSE; - break; - } - - while (*s) { - if (! IS_DIGIT(*s)) { - retval = FALSE; - break; - } - s++; - } - break; - - default: - - retval = FALSE; - break; - } /* Endswitch, StringLen(s) */ - - return retval; -} -/***************************************************************************** -* -* Function: IS_protdb_accession -* -* Description: Return TRUE if the input string is a validly formatted -* protein database accession number (SWISS-PROT) -* -* Arguments: s : CharPtr; pointer to accession number string. -* Must be null terminated. -* -* Author: Mark Cavanaugh -* Date: 8/96 -* -* WARNING: IS_protdb_accession() does not communicate with any central -* resource about accession numbers. So there's no way to -* inform it automatically about new accession number prefixes. -* -*****************************************************************************/ -static Boolean IS_protdb_accession(CharPtr s) -{ - Boolean retval = TRUE; - Boolean first = TRUE; - - if (s == NULL || ! *s) - return FALSE; - - if (StringLen(s) != 6) - return FALSE; - - while (*s) { - if (retval == FALSE) - break; - - if (first) { - if (! IS_ALPHA(*s)) { - retval = FALSE; - break; - } - - switch (TO_UPPER(*s)) { - case 'P': case 'Q': /* SWISS-PROT accessions */ - break; - default: - retval = FALSE; - break; - } - first = FALSE; - } - else { - if (! IS_DIGIT(*s)) { - retval = FALSE; - break; - } - } - s++; - } - return retval; -} - -/**************************************************** -*** Copy of Read SeqPort.bsp from SeqPort.start to stop -*** in : spp, from + to in seq coordinates -*** out: length of buffer + buffer -*** compiled with -D SAP -*****************************************************/ -static Int4 AccutReadBufferFromSep (SeqPortPtr spp, CharPtr buffer, Int4 from, Int4 to, Int4 buffsegstart) -{ - Uint1 residue; - Int4 k; - Int4 pos; - - SeqPortSeek (spp, from, SEEK_SET); - k = buffsegstart; - pos = from; - residue = SeqPortGetResidue(spp); - while (pos < to && residue != SEQPORT_EOF) - { - if ( ! IS_residue(residue)) { - /* - switch (residue) - { - case SEQPORT_VIRT: - Message(MSG_OK,"SEQPORT_VIRT [%d=%c] at %ld\n", (int)residue, (char)residue, (long)pos); - break; - case SEQPORT_EOS: - Message(MSG_OK,"[EOS]\n"); - break; - default: - Message(MSG_OK,"unknown char\n"); - break; - } - pos++; - */ - } else { - buffer[k] = (Char) residue; - k++; - pos++; - } - residue = SeqPortGetResidue(spp); - } - buffer[k] = '\0'; - return k; -} - - -/************************************************************* -*** -*** load_seq_data -*** loads bioseq sequence into a string -*** sip: SeqId of the bioseq -*** from, to: included bondaries -*** returns the length of the string (lenp) -*** -***************************************************************/ -static CharPtr load_seq_data (SeqIdPtr sip, Int4 from, Int4 to, Int4 *lenp) -{ - BioseqPtr bsp; - SeqLocPtr slp; - SeqPortPtr spp; - CharPtr str = NULL; - Int4 lens; - - if (from > -1 && to > -1 && from >= to) - return NULL; - bsp = BioseqLockById (sip); - if (bsp != NULL) { - if (from < 0 || from > bsp->length -1) - from = 0; - if (to < 0 || to > bsp->length -1) - to = bsp->length -1; - BioseqUnlock (bsp); - slp = SeqLocIntNew (from, to, Seq_strand_plus, sip); - spp = SeqPortNewByLoc (slp, Seq_code_iupacna); - if (spp != NULL) { - str = MemNew ((to-from+4) * sizeof(Char)); - lens = AccutReadBufferFromSep (spp, str, 0, to -from +1, 0); - SeqPortFree (spp); - if (lenp != NULL) - *lenp = lens; - } - SeqLocFree (slp); - } - return str; -} - -static Int4 getlengthforid (SeqIdPtr sip) -{ - BioseqPtr bsp; - Int4 lens=0; - - if (sip==NULL) - return 0; - bsp = BioseqLockById (sip); - if (bsp != NULL) { - lens = bsp->length; - BioseqUnlock (bsp); - } - return lens; -} - -/******************************************************** -*** -*** NormalizeSeqAlignId -*** Checks local seqid . if a seqid string contains "acc" -*** seqid has a correspondant sequence in db. -*** This local seqid is replaced by its gi number. -*** -*** The local sequence is compared to the sequence from -*** the db. If the local sequence is a region of the db sequence -*** the positions in the seqalign are updaded with the offset. -*** -*** local copy of IS_ntdb_accession & IS_protdb_accession -*** Thanks to Mark for this useful function! -**********************************************************/ -NLM_EXTERN ValNodePtr NormalizeSeqAlignId (SeqAlignPtr salp, ValNodePtr vnp) -{ - ValNodePtr vnptmp; - DenseSegPtr dsp; - SeqIdPtr sip, - dbsip, - presip, - next, - siptmp; - CharPtr TmpBuff, tmp; - CharPtr strlcl, - strdb, - strtmp; - Char str [52]; - Int4 gi = 0; - Int4 offset; - Int4 lenlcl, lendb; - Int4 totlenlcl, totlendb; - Int4 j, k, k1; - Int2 index; - Boolean ok, goOn, found; - - Int4 step = 1000; - Int4 window = 1020; - - EntrezInit ("Sequin", FALSE, NULL); - - if (salp!=NULL) { - if (salp->segtype == 2) { - dsp = (DenseSegPtr) salp->segs; - presip = NULL; - sip = dsp->ids; - index = 0; - while (sip != NULL) { - next = sip->next; - SeqIdWrite (sip, str, PRINTID_FASTA_LONG, 50); - tmp = StringStr (str, "acc"); - if (tmp==NULL) { - tmp = StringStr (str, "ACC"); - } - if (tmp!=NULL) { - tmp++; tmp++; tmp++; - if (*tmp == '|') - tmp++; - TmpBuff = tmp; - while (*tmp!='\0' && *tmp != '|' && *tmp!='\n') - tmp++; - *tmp = '\0'; - - ok = FALSE; - j = StringLen (TmpBuff); - for(k =0; k < j; k++) { - if(!isdigit(TmpBuff[k])) { - break; - } - } - if(k != j) { - ok=(IS_ntdb_accession(TmpBuff) || IS_protdb_accession(TmpBuff)); - } - if (ok) { - gi = CCAccessionToGi(TmpBuff); - ok = (gi>0); - } - if (ok) { - dbsip = ValNodeNew (NULL); - dbsip->choice = SEQID_GI; - dbsip->data.intvalue = (Int4)gi; - sip->next = NULL; - found = FALSE; - totlenlcl = getlengthforid(sip); - strlcl = load_seq_data (sip, 0, MIN(totlenlcl, 20), &lenlcl); - k1=0; - totlendb = getlengthforid(dbsip); - k = MIN(totlendb, k1+window); - goOn = (Boolean) (strlcl!=NULL && k > 0); - while (goOn) - { - strdb = load_seq_data (dbsip, k1, k, &lendb); - if (strlcl != NULL && strdb != NULL) - { - offset = 0; - strtmp = StringStr (strdb, strlcl); - if (strtmp != NULL) { - offset =(Int4)abs(abs((long)strdb)-abs((long)strtmp)); - offset += k1; - if (offset > 0) { - for (j=0; j<dsp->numseg; j++) { - if (dsp->starts[dsp->dim*j+index] != -1) - dsp->starts[dsp->dim*j+index] += offset; - } - } - if (presip == NULL) { - dsp->ids = dbsip; - } else { - presip->next = dbsip; - } - dbsip->next = next; - vnptmp=NULL; - if (vnp!=NULL) { - for (vnptmp=vnp; vnptmp!=NULL; vnptmp=vnptmp->next) { - siptmp=(SeqIdPtr)vnptmp->data.ptrvalue; - if (SeqIdForSameBioseq(sip, siptmp)) - break; - } - } - if (vnptmp==NULL) - ValNodeAddPointer(&vnp, 0, sip); - found = TRUE; - sip = dbsip; - } - MemFree (strdb); - } - goOn = (Boolean)(!found && k<totlendb); - k1=k1+step; - k = MIN(totlendb, k1+window); - } - if (!found) - sip->next = next; - if (strlcl != NULL) - MemFree (strlcl); - } - } - presip = sip; - sip = next; - index++; - } - } - } - EntrezFini (); - return vnp; -} -/****************************COLOMBE **************************/ - -static -Int2 LexClassifyChar(Char c) +static Int2 LexClassifyChar(Char c) { Int2 retval; @@ -635,8 +229,7 @@ Int2 LexClassifyChar(Char c) } /* Returns -1 if no token available, else the position of the token */ -static Int2 -EntrezLexExpression(CharPtr str, ValNodePtr vnp) +static Int2 EntrezLexExpression(CharPtr str, ValNodePtr vnp) { Int2 startPos; Int2 classChar; @@ -841,8 +434,7 @@ static Boolean FindTermRequired(CharPtr term) /* traverse all the possible fields, and take the "union" of this term */ /* over all the possibilities for the specified database */ -static Boolean -AddAllFields(ValNodePtr elst, CharPtr term, DocType db, Boolean special) +static Boolean AddAllFields(ValNodePtr elst, CharPtr term, DocType db, Boolean special) { EntrezInfoPtr eip; Boolean first = TRUE; diff --git a/cdromlib/accutils.h b/cdromlib/accutils.h index 6576a18f..c661435b 100644 --- a/cdromlib/accutils.h +++ b/cdromlib/accutils.h @@ -23,7 +23,7 @@ * * =========================================================================== * -* RCS $Id: accutils.h,v 6.3 1997/11/14 22:13:52 vakatov Exp $ +* RCS $Id: accutils.h,v 6.8 1999/04/01 13:56:35 sicotte Exp $ * * Author: J. Epstein * @@ -41,6 +41,28 @@ * time it is checked into the system. $Log: accutils.h,v $ +Revision 6.8 1999/04/01 13:56:35 sicotte +Moved WHICH_db_accession,IS_ntdb_accession,IS_protdb_accession to + sequtil.ch +Removed old static functions of Colombe (that are public in salutil.c) +The only code left in accutils.c is the Entrez Access code. + +Revision 6.7 1999/03/18 20:24:06 sicotte +changed the define name for NC_ accession + +Revision 6.6 1999/03/18 20:18:18 sicotte +added REFSEQ accession numbers and macro ACCN_IS_GENBANK() + +Revision 6.5 1999/03/18 15:34:04 sicotte +Updated Accession List and added protein Accessions +for functions IS_ntdb_accession and IS_protdb_accession. +New function WHICH_db_accession with return code allowing +to figure out the molecule type and the database from macros +in accutils.h + +Revision 6.4 1999/02/24 16:48:10 kans +added IS_ntdb_accession and IS_protdb_accession, removed NormalizeSeqAlignId + Revision 6.3 1997/11/14 22:13:52 vakatov [WIN32,DLL] Added NLM_EXTERN's @@ -100,6 +122,11 @@ add GetFullEntrezTermList() function #include <tofasta.h> #include <lsqfetch.h> +/* 4/1/99 Temporately include sequtil.h to avoid breaking code that + uses IS_ntdb_accession + */ +#include <sequtil.h> + #undef NLM_EXTERN #ifdef NLM_IMPORT #define NLM_EXTERN NLM_IMPORT @@ -111,7 +138,8 @@ add GetFullEntrezTermList() function extern "C" { #endif -NLM_EXTERN ValNodePtr NormalizeSeqAlignId (SeqAlignPtr salp, ValNodePtr vnp); + + NLM_EXTERN CharPtr LIBCALL EntrezFieldToString PROTO((DocType db, DocField fld)); NLM_EXTERN DocField LIBCALL EntrezStringToField PROTO((DocType db, CharPtr str)); diff --git a/cdromlib/casn.c b/cdromlib/casn.c index 4f656eb8..a8002079 100644 --- a/cdromlib/casn.c +++ b/cdromlib/casn.c @@ -23,7 +23,7 @@ * * =========================================================================== * - * RCS $Id: casn.c,v 6.0 1997/08/25 18:12:41 madden Exp $ + * RCS $Id: casn.c,v 6.1 2001/04/27 18:00:30 juran Exp $ * * Author: Greg Schuler * @@ -47,6 +47,9 @@ * modification comments. * * Revision $Log: casn.c,v $ + * Revision Revision 6.1 2001/04/27 18:00:30 juran + * Revision Warnings. + * Revision * Revision Revision 6.0 1997/08/25 18:12:41 madden * Revision Revision changed to 6.0 * Revision @@ -75,7 +78,7 @@ * ========================================================================== */ -#define REVISION_STR "$Revision: 6.0 $" +#define REVISION_STR "$Revision: 6.1 $" #include <asn.h> @@ -261,7 +264,7 @@ NLM_EXTERN SeqEntry* LIBCALL CASN_NextSeqEntry (CASN_Handle handle) AsnTypePtr atp; ASSERT(Handle_IsValid(handle)); - if(atp = AsnReadId(handle->aio, handle->amp, handle->atp)) { + if ((atp = AsnReadId(handle->aio, handle->amp, handle->atp))) { SeqEntryPtr sep = SeqEntryAsnRead(handle->aio, atp); while(handle->compr != -1) { char buf[4]; diff --git a/cdromlib/cdentrez.c b/cdromlib/cdentrez.c index 4ecbd32c..568a695b 100644 --- a/cdromlib/cdentrez.c +++ b/cdromlib/cdentrez.c @@ -23,7 +23,7 @@ * * =========================================================================== * - * RCS $Id: cdentrez.c,v 6.1 1998/08/24 18:42:15 kans Exp $ + * RCS $Id: cdentrez.c,v 6.2 1999/03/11 23:20:07 kans Exp $ * * Author: Ostell, Kans * @@ -46,6 +46,9 @@ * modification comments. * * Revision $Log: cdentrez.c,v $ + * Revision Revision 6.2 1999/03/11 23:20:07 kans + * Revision sprintf cast + * Revision * Revision Revision 6.1 1998/08/24 18:42:15 kans * Revision fixed -v -fd warnings * Revision @@ -149,7 +152,7 @@ * ========================================================================== */ -#define REVISION_STR "$Revision: 6.1 $" +#define REVISION_STR "$Revision: 6.2 $" static char * _this_module = "CdEntrez"; #define THIS_MODULE _this_module @@ -3705,7 +3708,7 @@ NLM_EXTERN BiostrucAnnotSetPtr CdEntrezBiostrucAnnotSetGet (DocUid uid) if (CdMountEntrezVolume(1,fname,PATH_MAX-32)) { - sprintf(strchr(fname,0), "/vast/%ld.bas.Z", uid); + sprintf(strchr(fname,0), "/vast/%ld.bas.Z", (long) uid); if (FileLength(fname) <= 0) { return NULL; diff --git a/cdromlib/cdnewlib.c b/cdromlib/cdnewlib.c index 7b3d9030..461292ce 100644 --- a/cdromlib/cdnewlib.c +++ b/cdromlib/cdnewlib.c @@ -23,7 +23,7 @@ * * =========================================================================== * - * RCS $Id: cdnewlib.c,v 6.1 1998/08/24 18:42:16 kans Exp $ + * RCS $Id: cdnewlib.c,v 6.2 1999/03/12 18:44:57 kans Exp $ * * Author: Gregory Schuler * @@ -91,6 +91,9 @@ * modification comments. * * Revision $Log: cdnewlib.c,v $ + * Revision Revision 6.2 1999/03/12 18:44:57 kans + * Revision fixed ErrPostEx problem + * Revision * Revision Revision 6.1 1998/08/24 18:42:16 kans * Revision fixed -v -fd warnings * Revision @@ -132,7 +135,7 @@ * ========================================================================== */ -#define REVISION_STR "$Revision: 6.1 $" +#define REVISION_STR "$Revision: 6.2 $" @@ -3694,7 +3697,7 @@ static int FileNotRecognized (const char *fname) { ErrPostEx(SEV_ERROR,ERR_BadFile,SUB_NeedUpdate, "The file %s cannot be read by this release of " - "the software. Please obtain a newer version."); + "the software. Please obtain a newer version.", fname); return FALSE; } diff --git a/cdromlib/ncbicdr.dsp b/cdromlib/ncbicdr.dsp new file mode 100644 index 00000000..f7880e1e --- /dev/null +++ b/cdromlib/ncbicdr.dsp @@ -0,0 +1,142 @@ +# Microsoft Developer Studio Project File - Name="ncbicdr" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=ncbicdr - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ncbicdr.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ncbicdr.mak" CFG="ncbicdr - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ncbicdr - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "ncbicdr - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ncbicdr - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ncbicdr___Win32_Debug" +# PROP BASE Intermediate_Dir "ncbicdr___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "ncbicdr___Win32_Debug" +# PROP Intermediate_Dir "ncbicdr___Win32_Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W2 /Gm /GX /ZI /Od /I ".." /I "..\ddv" /I "..\cn3d" /I "..\access" /I "..\asnstat" /I "..\connect\lbapi" /I "..\connect" /I "..\asnlib" /I "..\vibrant" /I "..\biostruc" /I "..\object" /I "..\api" /I "..\cdromlib" /I "..\desktop" /I "..\tools" /I "..\corelib" /I "..\network\taxon1\common" /I "..\network\vibnet" /I "..\network\entrez\client" /I "..\network\nsclilib" /I "..\network\medarch\client" /I "..\network\id1arch" /I "..\network\taxon1\taxon2" /I "..\network\blast3\client" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "ncbicdr - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ncbicdr___Win32_Release" +# PROP BASE Intermediate_Dir "ncbicdr___Win32_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "ncbicdr___Win32_Release" +# PROP Intermediate_Dir "ncbicdr___Win32_Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W2 /Gm /GX /ZI /Od /I ".." /I "..\ddv" /I "..\cn3d" /I "..\access" /I "..\asnstat" /I "..\connect\lbapi" /I "..\connect" /I "..\asnlib" /I "..\vibrant" /I "..\biostruc" /I "..\object" /I "..\api" /I "..\cdromlib" /I "..\desktop" /I "..\tools" /I "..\corelib" /I "..\network\taxon1\common" /I "..\network\vibnet" /I "..\network\entrez\client" /I "..\network\nsclilib" /I "..\network\medarch\client" /I "..\network\id1arch" /I "..\network\taxon1\taxon2" /I "..\network\blast3\client" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /W2 /Gm /GX /Zi /I ".." /I "..\ddv" /I "..\cn3d" /I "..\access" /I "..\asnstat" /I "..\connect\lbapi" /I "..\connect" /I "..\asnlib" /I "..\vibrant" /I "..\biostruc" /I "..\object" /I "..\api" /I "..\cdromlib" /I "..\desktop" /I "..\tools" /I "..\corelib" /I "..\network\taxon1\common" /I "..\network\vibnet" /I "..\network\entrez\client" /I "..\network\nsclilib" /I "..\network\medarch\client" /I "..\network\id1arch" /I "..\network\taxon1\taxon2" /I "..\network\blast3\client" /D "_LIB" /D "WIN32" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "ncbicdr - Win32 Debug" +# Name "ncbicdr - Win32 Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\casn.c +# End Source File +# Begin Source File + +SOURCE=.\cdconfig.c +# End Source File +# Begin Source File + +SOURCE=.\cdentrez.c +# End Source File +# Begin Source File + +SOURCE=.\cdnewlib.c +# End Source File +# Begin Source File + +SOURCE=.\cdromlib.c +# End Source File +# Begin Source File + +SOURCE=.\objentr.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\casn.h +# End Source File +# Begin Source File + +SOURCE=.\cdconfig.h +# End Source File +# Begin Source File + +SOURCE=.\cdentrez.h +# End Source File +# Begin Source File + +SOURCE=.\cdnewlib.h +# End Source File +# Begin Source File + +SOURCE=.\cdromlib.h +# End Source File +# Begin Source File + +SOURCE=.\objentr.h +# End Source File +# End Group +# End Target +# End Project diff --git a/cdromlib/ncbinacc.dsp b/cdromlib/ncbinacc.dsp new file mode 100644 index 00000000..e3dfaa76 --- /dev/null +++ b/cdromlib/ncbinacc.dsp @@ -0,0 +1,111 @@ +# Microsoft Developer Studio Project File - Name="ncbinacc" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=ncbinacc - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ncbinacc.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ncbinacc.mak" CFG="ncbinacc - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ncbinacc - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "ncbinacc - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ncbinacc - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W2 /Gm /GX /ZI /Od /I ".." /I "..\ddv" /I "..\cn3d" /I "..\access" /I "..\asnstat" /I "..\connect\lbapi" /I "..\connect" /I "..\asnlib" /I "..\vibrant" /I "..\biostruc" /I "..\object" /I "..\api" /I "..\cdromlib" /I "..\desktop" /I "..\tools" /I "..\corelib" /I "..\network\taxon1\common" /I "..\network\vibnet" /I "..\network\entrez\client" /I "..\network\nsclilib" /I "..\network\medarch\client" /I "..\network\id1arch" /I "..\network\taxon1\taxon2" /I "..\network\blast3\client" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# SUBTRACT CPP /Fr +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "ncbinacc - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ncbinacc___Win32_Release" +# PROP BASE Intermediate_Dir "ncbinacc___Win32_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "ncbinacc___Win32_Release" +# PROP Intermediate_Dir "ncbinacc___Win32_Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W2 /Gm /GX /ZI /Od /I ".." /I "..\ddv" /I "..\cn3d" /I "..\access" /I "..\asnstat" /I "..\connect\lbapi" /I "..\connect" /I "..\asnlib" /I "..\vibrant" /I "..\biostruc" /I "..\object" /I "..\api" /I "..\cdromlib" /I "..\desktop" /I "..\tools" /I "..\corelib" /I "..\network\taxon1\common" /I "..\network\vibnet" /I "..\network\entrez\client" /I "..\network\nsclilib" /I "..\network\medarch\client" /I "..\network\id1arch" /I "..\network\taxon1\taxon2" /I "..\network\blast3\client" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /W2 /Gm /GX /Zi /I ".." /I "..\ddv" /I "..\cn3d" /I "..\access" /I "..\asnstat" /I "..\connect\lbapi" /I "..\connect" /I "..\asnlib" /I "..\vibrant" /I "..\biostruc" /I "..\object" /I "..\api" /I "..\cdromlib" /I "..\desktop" /I "..\tools" /I "..\corelib" /I "..\network\taxon1\common" /I "..\network\vibnet" /I "..\network\entrez\client" /I "..\network\nsclilib" /I "..\network\medarch\client" /I "..\network\id1arch" /I "..\network\taxon1\taxon2" /I "..\network\blast3\client" /D "_LIB" /D "WIN32" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "ncbinacc - Win32 Debug" +# Name "ncbinacc - Win32 Release" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\accentr.c +# ADD CPP /D "_NETENT_" +# End Source File +# Begin Source File + +SOURCE=.\accutils.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\accentr.h +# End Source File +# Begin Source File + +SOURCE=.\accutils.h +# End Source File +# End Group +# End Target +# End Project diff --git a/cdromlib/objentr.h b/cdromlib/objentr.h index 863feeaf..8b1bdc91 100644 --- a/cdromlib/objentr.h +++ b/cdromlib/objentr.h @@ -23,7 +23,7 @@ * * =========================================================================== * -* RCS $Id: objentr.h,v 6.2 1998/03/26 23:23:19 yaschenk Exp $ +* RCS $Id: objentr.h,v 6.3 1999/08/17 16:31:27 kans Exp $ * * Author: Ostell, Schuler * @@ -46,6 +46,9 @@ * time it is checked into the system. $Log: objentr.h,v $ +Revision 6.3 1999/08/17 16:31:27 kans +increased field tag size to handle current data + Revision 6.2 1998/03/26 23:23:19 yaschenk adding CdRomAsnLoad() as extern function to load Asn tree @@ -172,7 +175,7 @@ EntrezTypeInfo; typedef struct EntrezFieldInfo { short id; /* id number to pass to APIs */ - char tag[6]; /* 4-letter tag (for internal use) */ + char tag[7]; /* 4-letter tag (for internal use) */ char *name; /* short string to go on menu */ char *descr; /* longer, descriptive string */ unsigned single_token :1; /* all terms are single-token */ |