diff options
author | Aaron M. Ucko <ucko@debian.org> | 2010-08-30 01:08:10 -0400 |
---|---|---|
committer | Aaron M. Ucko <ucko@debian.org> | 2010-08-30 01:08:10 -0400 |
commit | eb0fe75837f0b1ffd48822a16cf8cad5d056b911 (patch) | |
tree | 6f8696aaa90980b40dd2253289c858c1405a3d3b /network | |
parent | b4be7afc96f6bd0604ad7e6070c4baf8be8d808f (diff) |
Imported Upstream version 6.1.20100808
Diffstat (limited to 'network')
-rw-r--r-- | network/id2arch/id2.asn | 7 | ||||
-rw-r--r-- | network/id2arch/id2.c | 32 | ||||
-rw-r--r-- | network/id2arch/id2.patch | 143 | ||||
-rw-r--r-- | network/id2arch/makefile | 2 | ||||
-rw-r--r-- | network/id2arch/seqsplit.asn | 5 |
5 files changed, 174 insertions, 15 deletions
diff --git a/network/id2arch/id2.asn b/network/id2arch/id2.asn index 1ab48ed0..1f51ee3c 100644 --- a/network/id2arch/id2.asn +++ b/network/id2arch/id2.asn @@ -1,4 +1,4 @@ ---$Revision: 1.22 $ +--$Revision: 1.23 $ --******************************************************************** -- -- Network Id server network access @@ -70,7 +70,10 @@ ID2-Request-Get-Seq-id ::= SEQUENCE { text (2), -- text Seq-id (accession etc) is preferred general (4), -- general Seq-id is preferred all (127), -- return all qualified Seq-ids of the sequence - label (128) -- return a sequence string label as general id + label (128), -- return a sequence string label as string + -- in general id with db "LABEL" + taxid (256) -- return a sequence taxonomy ID as integer + -- in general id with db "TAXID" } DEFAULT any } diff --git a/network/id2arch/id2.c b/network/id2arch/id2.c index 13fd3160..a0f8cbb0 100644 --- a/network/id2arch/id2.c +++ b/network/id2arch/id2.c @@ -2766,7 +2766,7 @@ ID2ReplyAsnRead(AsnIoPtr aip, AsnTypePtr orig) if ( AsnReadVal(aip, atp, &av) <= 0) { goto erret; } - ptr -> end_of_reply = av.boolvalue; + ptr -> end_of_reply = TRUE; atp = AsnReadId(aip,amp, atp); } if (atp == ID2_REPLY_reply) { @@ -2782,6 +2782,8 @@ ID2ReplyAsnRead(AsnIoPtr aip, AsnTypePtr orig) } ptr -> discard = av.intvalue; atp = AsnReadId(aip,amp, atp); + } else { + ptr -> discard = -1; } if (AsnReadVal(aip, atp, &av) <= 0) { @@ -2961,15 +2963,19 @@ ID2ReplyAsnWrite(ID2ReplyPtr ptr, AsnIoPtr aip, AsnTypePtr orig) } } AsnGenericUserSeqOfAsnWrite(ptr -> error, (AsnWriteFunc) ID2ErrorAsnWrite, aip, ID2_REPLY_error, ID2_REPLY_error_E); - av.boolvalue = ptr -> end_of_reply; - retval = AsnWrite(aip, ID2_REPLY_end_of_reply, &av); + if (ptr -> end_of_reply) { + av.boolvalue = ptr -> end_of_reply; + retval = AsnWrite(aip, ID2_REPLY_end_of_reply, &av); + } if (ptr -> Reply_reply != NULL) { if ( ! Reply_replyAsnWrite(ptr -> Reply_reply, aip, ID2_REPLY_reply)) { goto erret; } } - av.intvalue = ptr -> discard; - retval = AsnWrite(aip, ID2_REPLY_discard, &av); + if (ptr -> discard != -1) { + av.intvalue = ptr -> discard; + retval = AsnWrite(aip, ID2_REPLY_discard, &av); + } if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) { goto erret; } @@ -3517,7 +3523,7 @@ ID2ReplyGetSeqIdAsnRead(AsnIoPtr aip, AsnTypePtr orig) if ( AsnReadVal(aip, atp, &av) <= 0) { goto erret; } - ptr -> end_of_reply = av.boolvalue; + ptr -> end_of_reply = TRUE; atp = AsnReadId(aip,amp, atp); } @@ -3577,8 +3583,10 @@ ID2ReplyGetSeqIdAsnWrite(ID2ReplyGetSeqIdPtr ptr, AsnIoPtr aip, AsnTypePtr orig) } } AsnGenericChoiceSeqOfAsnWrite(ptr -> seq_id, (AsnWriteFunc) SeqIdAsnWrite, aip, ID2_REPLY_GET_SEQ_ID_seq_id, ID2_REPLY_GET_SEQ_ID_seq_id_E); - av.boolvalue = ptr -> end_of_reply; - retval = AsnWrite(aip, REPLY_GET_SEQ_ID_end_of_reply, &av); + if (ptr -> end_of_reply) { + av.boolvalue = ptr -> end_of_reply; + retval = AsnWrite(aip, REPLY_GET_SEQ_ID_end_of_reply, &av); + } if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) { goto erret; } @@ -3707,7 +3715,7 @@ ID2ReplyGetBlobIdAsnRead(AsnIoPtr aip, AsnTypePtr orig) if ( AsnReadVal(aip, atp, &av) <= 0) { goto erret; } - ptr -> end_of_reply = av.boolvalue; + ptr -> end_of_reply = TRUE; atp = AsnReadId(aip,amp, atp); } if (atp == REPLY_GET_BLOB_ID_blob_state) { @@ -3781,8 +3789,10 @@ ID2ReplyGetBlobIdAsnWrite(ID2ReplyGetBlobIdPtr ptr, AsnIoPtr aip, AsnTypePtr ori av.intvalue = ptr -> split_version; retval = AsnWrite(aip, GET_BLOB_ID_split_version, &av); AsnGenericUserSeqOfAsnWrite(ptr -> annot_info, (AsnWriteFunc) ID2SSeqAnnotInfoAsnWrite, aip, REPLY_GET_BLOB_ID_annot_info, REPLY_GET_BLOB_ID_annot_info_E); - av.boolvalue = ptr -> end_of_reply; - retval = AsnWrite(aip, REPLY_GET_BLOB_ID_end_of_reply, &av); + if (ptr -> end_of_reply) { + av.boolvalue = ptr -> end_of_reply; + retval = AsnWrite(aip, REPLY_GET_BLOB_ID_end_of_reply, &av); + } av.intvalue = ptr -> blob_state; retval = AsnWrite(aip, REPLY_GET_BLOB_ID_blob_state, &av); if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) { diff --git a/network/id2arch/id2.patch b/network/id2arch/id2.patch new file mode 100644 index 00000000..069fb0e2 --- /dev/null +++ b/network/id2arch/id2.patch @@ -0,0 +1,143 @@ +*** id2.c Thu Jan 7 15:08:05 2010 +--- id2.c.new Thu Jan 7 13:58:12 2010 +*************** ID2ReplyAsnRead(AsnIoPtr aip, AsnTypePtr +*** 2766,2772 **** + if ( AsnReadVal(aip, atp, &av) <= 0) { + goto erret; + } +! ptr -> end_of_reply = av.boolvalue; + atp = AsnReadId(aip,amp, atp); + } + if (atp == ID2_REPLY_reply) { +--- 2766,2772 ---- + if ( AsnReadVal(aip, atp, &av) <= 0) { + goto erret; + } +! ptr -> end_of_reply = TRUE; + atp = AsnReadId(aip,amp, atp); + } + if (atp == ID2_REPLY_reply) { +*************** ID2ReplyAsnRead(AsnIoPtr aip, AsnTypePtr +*** 2782,2787 **** +--- 2782,2789 ---- + } + ptr -> discard = av.intvalue; + atp = AsnReadId(aip,amp, atp); ++ } else { ++ ptr -> discard = -1; + } + + if (AsnReadVal(aip, atp, &av) <= 0) { +*************** ID2ReplyAsnWrite(ID2ReplyPtr ptr, AsnIoP +*** 2961,2975 **** + } + } + AsnGenericUserSeqOfAsnWrite(ptr -> error, (AsnWriteFunc) ID2ErrorAsnWrite, aip, ID2_REPLY_error, ID2_REPLY_error_E); +! av.boolvalue = ptr -> end_of_reply; +! retval = AsnWrite(aip, ID2_REPLY_end_of_reply, &av); + if (ptr -> Reply_reply != NULL) { + if ( ! Reply_replyAsnWrite(ptr -> Reply_reply, aip, ID2_REPLY_reply)) { + goto erret; + } + } +! av.intvalue = ptr -> discard; +! retval = AsnWrite(aip, ID2_REPLY_discard, &av); + if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) { + goto erret; + } +--- 2963,2981 ---- + } + } + AsnGenericUserSeqOfAsnWrite(ptr -> error, (AsnWriteFunc) ID2ErrorAsnWrite, aip, ID2_REPLY_error, ID2_REPLY_error_E); +! if (ptr -> end_of_reply) { +! av.boolvalue = ptr -> end_of_reply; +! retval = AsnWrite(aip, ID2_REPLY_end_of_reply, &av); +! } + if (ptr -> Reply_reply != NULL) { + if ( ! Reply_replyAsnWrite(ptr -> Reply_reply, aip, ID2_REPLY_reply)) { + goto erret; + } + } +! if (ptr -> discard != -1) { +! av.intvalue = ptr -> discard; +! retval = AsnWrite(aip, ID2_REPLY_discard, &av); +! } + if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) { + goto erret; + } +*************** ID2ReplyGetSeqIdAsnRead(AsnIoPtr aip, As +*** 3517,3523 **** + if ( AsnReadVal(aip, atp, &av) <= 0) { + goto erret; + } +! ptr -> end_of_reply = av.boolvalue; + atp = AsnReadId(aip,amp, atp); + } + +--- 3523,3529 ---- + if ( AsnReadVal(aip, atp, &av) <= 0) { + goto erret; + } +! ptr -> end_of_reply = TRUE; + atp = AsnReadId(aip,amp, atp); + } + +*************** ID2ReplyGetSeqIdAsnWrite(ID2ReplyGetSeqI +*** 3577,3584 **** + } + } + AsnGenericChoiceSeqOfAsnWrite(ptr -> seq_id, (AsnWriteFunc) SeqIdAsnWrite, aip, ID2_REPLY_GET_SEQ_ID_seq_id, ID2_REPLY_GET_SEQ_ID_seq_id_E); +! av.boolvalue = ptr -> end_of_reply; +! retval = AsnWrite(aip, REPLY_GET_SEQ_ID_end_of_reply, &av); + if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) { + goto erret; + } +--- 3583,3592 ---- + } + } + AsnGenericChoiceSeqOfAsnWrite(ptr -> seq_id, (AsnWriteFunc) SeqIdAsnWrite, aip, ID2_REPLY_GET_SEQ_ID_seq_id, ID2_REPLY_GET_SEQ_ID_seq_id_E); +! if (ptr -> end_of_reply) { +! av.boolvalue = ptr -> end_of_reply; +! retval = AsnWrite(aip, REPLY_GET_SEQ_ID_end_of_reply, &av); +! } + if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) { + goto erret; + } +*************** ID2ReplyGetBlobIdAsnRead(AsnIoPtr aip, A +*** 3707,3713 **** + if ( AsnReadVal(aip, atp, &av) <= 0) { + goto erret; + } +! ptr -> end_of_reply = av.boolvalue; + atp = AsnReadId(aip,amp, atp); + } + if (atp == REPLY_GET_BLOB_ID_blob_state) { +--- 3715,3721 ---- + if ( AsnReadVal(aip, atp, &av) <= 0) { + goto erret; + } +! ptr -> end_of_reply = TRUE; + atp = AsnReadId(aip,amp, atp); + } + if (atp == REPLY_GET_BLOB_ID_blob_state) { +*************** ID2ReplyGetBlobIdAsnWrite(ID2ReplyGetBlo +*** 3781,3788 **** + av.intvalue = ptr -> split_version; + retval = AsnWrite(aip, GET_BLOB_ID_split_version, &av); + AsnGenericUserSeqOfAsnWrite(ptr -> annot_info, (AsnWriteFunc) ID2SSeqAnnotInfoAsnWrite, aip, REPLY_GET_BLOB_ID_annot_info, REPLY_GET_BLOB_ID_annot_info_E); +! av.boolvalue = ptr -> end_of_reply; +! retval = AsnWrite(aip, REPLY_GET_BLOB_ID_end_of_reply, &av); + av.intvalue = ptr -> blob_state; + retval = AsnWrite(aip, REPLY_GET_BLOB_ID_blob_state, &av); + if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) { +--- 3789,3798 ---- + av.intvalue = ptr -> split_version; + retval = AsnWrite(aip, GET_BLOB_ID_split_version, &av); + AsnGenericUserSeqOfAsnWrite(ptr -> annot_info, (AsnWriteFunc) ID2SSeqAnnotInfoAsnWrite, aip, REPLY_GET_BLOB_ID_annot_info, REPLY_GET_BLOB_ID_annot_info_E); +! if (ptr -> end_of_reply) { +! av.boolvalue = ptr -> end_of_reply; +! retval = AsnWrite(aip, REPLY_GET_BLOB_ID_end_of_reply, &av); +! } + av.intvalue = ptr -> blob_state; + retval = AsnWrite(aip, REPLY_GET_BLOB_ID_blob_state, &av); + if (! AsnCloseStruct(aip, atp, (Pointer)ptr)) { diff --git a/network/id2arch/makefile b/network/id2arch/makefile index 8e095f75..26df2322 100644 --- a/network/id2arch/makefile +++ b/network/id2arch/makefile @@ -32,6 +32,7 @@ id2.c id2gen.h: id2.l id2.h all.l seqsplit.l $(CODEGEN) -i id2map.h -l id2.l,seqsplit.l,all.l -o id2gen -d . cat id2gen.c | grep -v "^ *\* *Generated" > id2.c && rm -f id2gen.c cat id2gen.h | grep -v "^ *\* *Generated" > x && mv x id2gen.h + @patch id2.c <id2.patch id2.l : id2.asn $(ASNTOOL) -m id2.asn -l x.h @@ -52,6 +53,7 @@ all.l : id2.h : id2.asn $(ASNTOOL) -m id2.asn -o id2.h cat id2.h | grep -v "^ *\* *Generated" >x && mv x id2.h + seqsplit.h : seqsplit.asn $(ASNTOOL) -m seqsplit.asn -o seqsplit.h diff --git a/network/id2arch/seqsplit.asn b/network/id2arch/seqsplit.asn index e64745f8..d1b24322 100644 --- a/network/id2arch/seqsplit.asn +++ b/network/id2arch/seqsplit.asn @@ -1,4 +1,4 @@ ---$Revision: 1.9 $ +--$Revision: 1.10 $ --******************************************************************** -- -- Network Id server network access @@ -114,7 +114,8 @@ ID2S-Seq-annot-place-Info ::= SEQUENCE { ID2S-Seq-feat-Ids-Info ::= SEQUENCE { feat-types SET OF ID2S-Feat-type-Info OPTIONAL, xref-types SET OF ID2S-Feat-type-Info OPTIONAL, - local-ids SET OF INTEGER OPTIONAL + local-ids SET OF INTEGER OPTIONAL, + local-str-ids SET OF VisibleString OPTIONAL } |