projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
398d585
)
Addded some method functions to the ODR type.
author
Sebastian Hammer
<quinn@indexdata.com>
Tue, 7 Mar 1995 10:19:05 +0000
(10:19 +0000)
committer
Sebastian Hammer
<quinn@indexdata.com>
Tue, 7 Mar 1995 10:19:05 +0000
(10:19 +0000)
odr/odr.c
patch
|
blob
|
history
diff --git
a/odr/odr.c
b/odr/odr.c
index
2347ef3
..
e486507
100644
(file)
--- a/
odr/odr.c
+++ b/
odr/odr.c
@@
-4,7
+4,10
@@
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: odr.c,v $
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: odr.c,v $
- * Revision 1.1 1995-03-07 09:23:15 quinn
+ * Revision 1.2 1995-03-07 10:19:05 quinn
+ * Addded some method functions to the ODR type.
+ *
+ * Revision 1.1 1995/03/07 09:23:15 quinn
* Installing top-level API and documentation.
*
*
* Installing top-level API and documentation.
*
*
@@
-31,6
+34,11
@@
void odr_perror(ODR o, char *message)
fprintf(stderr, "%s: %s\n", message, odr_errlist[o->error]);
}
fprintf(stderr, "%s: %s\n", message, odr_errlist[o->error]);
}
+int odr_errno(ODR o)
+{
+ return o->error;
+}
+
void odr_setprint(ODR o, FILE *file)
{
o->print = file;
void odr_setprint(ODR o, FILE *file)
{
o->print = file;
@@
-65,3
+73,15
@@
void odr_destroy(ODR o)
{
free(o);
}
{
free(o);
}
+
+void odr_setbuf(ODR o, char *buf, int len)
+{
+ o->buf = o->bp = (unsigned char *) buf;
+ o->buflen = o->left = len;
+}
+
+char *odr_getbuf(ODR o, int *len)
+{
+ *len = o->bp - o->buf;
+ return (char *) o->buf;
+}