projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added better error checking.
[yaz-moved-to-github.git]
/
odr
/
odr.c
diff --git
a/odr/odr.c
b/odr/odr.c
index
c5d725c
..
bea667c
100644
(file)
--- a/
odr/odr.c
+++ b/
odr/odr.c
@@
-4,7
+4,13
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: odr.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: odr.c,v $
- * Revision 1.4 1995-03-07 13:16:13 quinn
+ * Revision 1.6 1995-03-08 12:12:15 quinn
+ * Added better error checking.
+ *
+ * Revision 1.5 1995/03/07 13:28:57 quinn
+ * *** empty log message ***
+ *
+ * Revision 1.4 1995/03/07 13:16:13 quinn
* Fixed bug in odr_reset
*
* Revision 1.3 1995/03/07 10:21:31 quinn
* Fixed bug in odr_reset
*
* Revision 1.3 1995/03/07 10:21:31 quinn
@@
-27,12
+33,14
@@
char *odr_errlist[] =
{
"No (unknown) error",
char *odr_errlist[] =
{
"No (unknown) error",
- "Memoy allocation failed",
+ "Memory allocation failed",
"System error",
"No space in buffer",
"Required data element missing",
"Unexpected tag",
"System error",
"No space in buffer",
"Required data element missing",
"Unexpected tag",
- "Other error"
+ "Other error",
+ "Protocol error",
+ "Malformed data"
};
void odr_perror(ODR o, char *message)
};
void odr_perror(ODR o, char *message)
@@
-72,7
+80,7
@@
void odr_reset(ODR o)
o->t_class = -1;
o->t_tag = -1;
o->indent = 0;
o->t_class = -1;
o->t_tag = -1;
o->indent = 0;
- o->stackp = 0;
+ o->stackp = -1;
}
void odr_destroy(ODR o)
}
void odr_destroy(ODR o)
@@
-90,4
+98,4
@@
char *odr_getbuf(ODR o, int *len)
{
*len = o->bp - o->buf;
return (char *) o->buf;
{
*len = o->bp - o->buf;
return (char *) o->buf;
-}
+}