# Subset of bib-1 attributes map to CCL qualifiers
-# $Id: default.bib,v 1.3 1996-07-06 19:58:30 quinn Exp $
+# $Id: default.bib,v 1.4 1996-07-26 13:37:06 quinn Exp $
#
term t=l,r s=pw
clean t=l
ab u=62 s=pw
note u=63 s=pw
af u=1006 s=pw
-
north u=2040 r=o
south u=2041 r=o
east u=2038 r=o
* OF THIS SOFTWARE.
*
* $Log: odr.h,v $
- * Revision 1.17 1995-11-08 17:41:27 quinn
+ * Revision 1.18 1996-07-26 13:38:14 quinn
+ * Various smaller things. Gathered header-files.
+ *
+ * Revision 1.17 1995/11/08 17:41:27 quinn
* Smallish.
*
* Revision 1.16 1995/11/01 13:54:36 quinn
int t_tag;
int choice_bias; /* force choice */
+ int lenlen; /* force length-of-lenght (odr_setlen()) */
FILE *print; /* output file for direction print */
int indent; /* current indent level for printing */
#define ODATA 8
#define OSTACK 9
#define OCONLEN 10
+#define OLENOV 11
extern char *odr_errlist[];
Odr_oid *odr_getoidbystr(ODR o, char *str);
int odr_initmember(ODR o, void *p, int size);
int odr_peektag(ODR o, int *class, int *tag, int *cons);
+void odr_setlenlen(ODR o, int len);
#endif
# Copyright (C) 1994, Index Data I/S
# All rights reserved.
# Sebastian Hammer, Adam Dickmeiss
-# $Id: Makefile,v 1.23 1996-05-22 08:35:50 adam Exp $
+# $Id: Makefile,v 1.24 1996-07-26 13:38:18 quinn Exp $
SHELL=/bin/sh
INCLUDE=-I../include -I.
LIBDIR=../lib
LIBINCLUDE=-L$(LIBDIR)
-DEFS=$(INCLUDE)
+DEFS=$(INCLUDE) -DODR_DEBUG
LIB=$(LIBDIR)/libodr.a
LIBS=-lodr
PO = odr_bool.o ber_bool.o ber_len.o ber_tag.o odr_util.o odr_null.o \
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: odr.c,v $
- * Revision 1.20 1995-11-08 17:41:32 quinn
+ * Revision 1.21 1996-07-26 13:38:19 quinn
+ * Various smaller things. Gathered header-files.
+ *
+ * Revision 1.20 1995/11/08 17:41:32 quinn
* Smallish.
*
* Revision 1.19 1995/11/01 13:54:41 quinn
"Protocol error",
"Malformed data",
"Stack overflow",
- "Length of constructed type different from sum of members"
+ "Length of constructed type different from sum of members",
+ "Overflow writing definite length of constructed type"
};
char *odr_errmsg(int n)
o->stackp = -1;
nmem_reset(o->mem);
o->choice_bias = -1;
+ o->lenlen = 1;
}
void odr_destroy(ODR o)
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: odr_cons.c,v $
- * Revision 1.15 1995-09-29 17:12:23 quinn
+ * Revision 1.16 1996-07-26 13:38:20 quinn
+ * Various smaller things. Gathered header-files.
+ *
+ * Revision 1.15 1995/09/29 17:12:23 quinn
* Smallish
*
* Revision 1.14 1995/09/27 15:02:58 quinn
#include <odr.h>
#include <assert.h>
+void odr_setlenlen(ODR o, int len)
+{
+ o->lenlen = len;
+}
+
int odr_constructed_begin(ODR o, void *p, int class, int tag)
{
int res;
int cons = 1;
+ int lenlen = o->lenlen;
if (o->error)
return 0;
+ o->lenlen = 1; /* reset lenlen */
if (o->t_class < 0)
{
o->t_class = class;
#endif
if (o->direction == ODR_ENCODE)
{
- o->stack[o->stackp].lenlen = 1;
- if (odr_putc(o, 0) < 0) /* dummy */
+ unsigned char dummy[sizeof(int)+1];
+
+ o->stack[o->stackp].lenlen = lenlen;
+
+ if (odr_write(o, dummy, lenlen) < 0) /* dummy */
return 0;
}
else if (o->direction == ODR_DECODE)
odr_seek(o, ODR_S_SET, o->stack[o->stackp].len_offset);
if ((res = ber_enclen(o, pos - o->stack[o->stackp].base_offset,
o->stack[o->stackp].lenlen, 1)) < 0)
+ {
+ o->error = OLENOV;
return 0;
+ }
odr_seek(o, ODR_S_END, 0);
if (res == 0) /* indefinite encoding */
{
-# $Id: gils-b.est,v 1.6 1996-07-06 19:58:36 quinn Exp $
+# $Id: gils-b.est,v 1.7 1996-07-26 13:38:23 quinn Exp $
simpleelement (1,1)
simpleelement (1,10)
simpleelement (1,12)
simpleelement (1,16)
simpleelement (4,1)
simpleelement (4,52)
+simpleelement (4,70)/(4,17)
simpleelement (4,1)
simpleelement (4,52)
simpleelement (4,98)
+
+#
+# These are not formally required by GILS
+#
+simpleelement (4,59)
+simpleelement (4,70)
+simpleelement (4,97)
elm (4,98)/(4,18) crossReferenceType !
elm (4,23) originalControlIdentifier !
elm (4,59) supplementalInformation !
+
+elm (2,9) bodyOfDisplay Any
+
+#
+# Local tags - testing only
+#
+
+elm sampleText bodyOfText !