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
Rotating logfile if exceeding a gigabyte
[yaz-moved-to-github.git]
/
src
/
odr.c
diff --git
a/src/odr.c
b/src/odr.c
index
88d7c4e
..
1e31f29
100644
(file)
--- a/
src/odr.c
+++ b/
src/odr.c
@@
-2,9
+2,15
@@
* Copyright (c) 1995-2004, Index Data
* See the file LICENSE for details.
*
* Copyright (c) 1995-2004, Index Data
* See the file LICENSE for details.
*
- * $Id: odr.c,v 1.4 2004-08-13 08:58:59 adam Exp $
+ * $Id: odr.c,v 1.8 2004-10-15 00:19:00 adam Exp $
*
*/
*
*/
+
+/**
+ * \file odr.c
+ * \brief Implements fundamental ODR functionality
+ */
+
#if HAVE_CONFIG_H
#include <config.h>
#endif
#if HAVE_CONFIG_H
#include <config.h>
#endif
@@
-116,7
+122,7
@@
void odr_FILE_write(ODR o, void *handle, int type,
fputs(" ..... ", (FILE*) handle);
i = len - 1000;
}
fputs(" ..... ", (FILE*) handle);
i = len - 1000;
}
- if (strchr("\r\n\f\t", c) || c >= ' ' && c <= 126)
+ if (strchr("\r\n\f\t", c) || (c >= ' ' && c <= 126))
putc(c, (FILE*) handle);
else
{
putc(c, (FILE*) handle);
else
{
@@
-145,7
+151,7
@@
void odr_set_stream(ODR o, void *handle,
const char *buf, int len),
void (*stream_close)(void *handle))
{
const char *buf, int len),
void (*stream_close)(void *handle))
{
- o->print = handle;
+ o->print = (FILE*) handle;
o->op->stream_write = stream_write;
o->op->stream_close = stream_close;
}
o->op->stream_write = stream_write;
o->op->stream_close = stream_close;
}
@@
-221,6
+227,7
@@
void odr_destroy(ODR o)
void odr_setbuf(ODR o, char *buf, int len, int can_grow)
{
void odr_setbuf(ODR o, char *buf, int len, int can_grow)
{
+ odr_seterror(o, ONONE, 0);
o->bp = (unsigned char *) buf;
o->buf = (unsigned char *) buf;
o->bp = (unsigned char *) buf;
o->buf = (unsigned char *) buf;