summaryrefslogtreecommitdiff
path: root/asnlib
diff options
context:
space:
mode:
authorAaron M. Ucko <ucko@debian.org>2005-03-24 18:46:06 +0000
committerAaron M. Ucko <ucko@debian.org>2005-03-24 18:46:06 +0000
commit63b21a5f6060202b6d5c888d203e78ba871abcc2 (patch)
tree03fb3548fb6902e89097d17630f910e220b420a8 /asnlib
parentd5cd243f986e2366bd1dfe5f923d2ce7e1002f93 (diff)
Load ncbi (6.1.20041020) into ncbi-tools6/branches/upstream/current.
Diffstat (limited to 'asnlib')
-rw-r--r--asnlib/asncode.c9
-rw-r--r--asnlib/asnprint.c38
-rw-r--r--asnlib/asntool.c7
3 files changed, 48 insertions, 6 deletions
diff --git a/asnlib/asncode.c b/asnlib/asncode.c
index 75e1affc..d047c2d9 100644
--- a/asnlib/asncode.c
+++ b/asnlib/asncode.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 7/8/93
*
-* $Revision: 6.14 $
+* $Revision: 6.15 $
*
* File Description:
* Automatically generate C code from ASN.1 specifications
@@ -47,6 +47,9 @@
* ------- ---------- -----------------------------------------------------
*
* $Log: asncode.c,v $
+* Revision 6.15 2004/07/08 15:24:05 kans
+* needed a couple additional TESTNIL wrappers
+*
* Revision 6.14 2002/03/07 21:36:27 beloslyu
* typo fixed
*
@@ -138,7 +141,7 @@
static Boolean AsnCodeIsEnumType PROTO ((AsnTypePtr atp));
-static char RCS_Rev [] = "$Revision: 6.14 $";
+static char RCS_Rev [] = "$Revision: 6.15 $";
/*******************
* Interator structure
@@ -2192,7 +2195,7 @@ userobj_CHECK_LIST (AsnIterPtr iter)
} else {
ErrPost (CTX_NCBIASN1, 101,
"userobj CHECK LIST Unresolved imported type at %s.%s",
- iter->atp->name, this_type->name);
+ TESTNIL (iter->atp->name), TESTNIL (this_type->name));
use_type = (AsnTypePtr) NULL;
}
} else {
diff --git a/asnlib/asnprint.c b/asnlib/asnprint.c
index 5d142c66..0895b3fa 100644
--- a/asnlib/asnprint.c
+++ b/asnlib/asnprint.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 3/4/91
*
-* $Revision: 6.20 $
+* $Revision: 6.21 $
*
* File Description:
* Routines for printing ASN.1 value notation (text) messages and
@@ -42,6 +42,9 @@
* 3/4/91 Kans Stricter typecasting for GNU C and C++
*
* $Log: asnprint.c,v $
+* Revision 6.21 2004/08/17 19:34:42 kans
+* AsnPrintOctets uses BSRead instead of BSGetByte for significant speed increase
+*
* Revision 6.20 2003/12/03 19:31:09 gouriano
* Corrected DTD generation (a different approach)
*
@@ -1024,8 +1027,9 @@ NLM_EXTERN void AsnPrintBoolean (Boolean value, AsnIoPtr aip)
NLM_EXTERN void AsnPrintOctets (ByteStorePtr ssp, AsnIoPtr aip)
{
- Int2 value, tval, ctr;
+ Int2 value, tval, ctr, actual, j;
Char buf[101];
+ Uint1 tmp [401];
if (aip->type & ASNIO_CARRIER) /* pure iterator */
return;
@@ -1038,6 +1042,34 @@ NLM_EXTERN void AsnPrintOctets (ByteStorePtr ssp, AsnIoPtr aip)
buf[100] = '\0';
/* break it up into lines if necessary */
+
+ MemSet ((Pointer) tmp, 0, sizeof (tmp));
+ actual = (Int2) BSRead (ssp, tmp, (Int4) sizeof (tmp) - 1);
+ while (actual > 0) {
+ for (j = 0; j < actual; j++) {
+ value = (Int2) (Uint1) tmp [j];
+ tval = value / 16;
+ if (tval < 10)
+ buf[ctr] = (Char)(tval + '0');
+ else
+ buf[ctr] = (Char)(tval - 10 + 'A');
+ ctr++;
+ tval = value - (tval * 16);
+ if (tval < 10)
+ buf[ctr] = (Char)(tval + '0');
+ else
+ buf[ctr] = (Char)(tval - 10 + 'A');
+ ctr++;
+ if (ctr == 100)
+ {
+ AsnPrintString(buf, aip);
+ ctr = 0;
+ }
+ }
+ actual = (Int2) BSRead (ssp, tmp, (Int4) sizeof (tmp) - 1);
+ }
+
+ /*
while ((value = BSGetByte(ssp)) != -1)
{
tval = value / 16;
@@ -1058,6 +1090,8 @@ NLM_EXTERN void AsnPrintOctets (ByteStorePtr ssp, AsnIoPtr aip)
ctr = 0;
}
}
+ */
+
if (ctr)
{
buf[ctr] = '\0';
diff --git a/asnlib/asntool.c b/asnlib/asntool.c
index 1ebbdc13..6c1e5b19 100644
--- a/asnlib/asntool.c
+++ b/asnlib/asntool.c
@@ -29,7 +29,7 @@
*
* Version Creation Date: 1/1/91
*
-* $Revision: 6.14 $
+* $Revision: 6.15 $
*
* File Description:
* Main routine for asntool. Uses the ASN.1 library routines to perform
@@ -43,6 +43,9 @@
*
*
* $Log: asntool.c,v $
+* Revision 6.15 2004/07/08 15:27:37 kans
+* commented out second unnecessary call to GetArgs
+*
* Revision 6.14 2004/04/01 13:43:05 lavr
* Spell "occurred", "occurrence", and "occurring"
*
@@ -210,9 +213,11 @@ Int2 Main (void)
AsnSetXMLmodulePrefix((CharPtr)(asnargs[P_argXMLmodulePrefix].strvalue));
+ /*
if (! GetArgs("AsnTool 4", NUMARGS, asnargs))
return 1;
ErrClear();
+ */
if (! AsnIoSetBufsize(NULL, (Int2)asnargs[b_argBufferSize].intvalue))
return 1;