X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=util%2Fwrbuf.c;h=c948dc1180941b9eb24513de58accab45d043351;hp=a81d950f978085d07f51d3826915061c4d3df1a6;hb=044d170f0a963555486df54653cd2fdc5815928b;hpb=6565e283922168b7a1284d0c4164f94c833f6301 diff --git a/util/wrbuf.c b/util/wrbuf.c index a81d950..c948dc1 100644 --- a/util/wrbuf.c +++ b/util/wrbuf.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: wrbuf.c,v $ - * Revision 1.3 1997-05-01 15:08:15 adam + * Revision 1.4 1998-02-11 11:53:36 adam + * Changed code so that it compiles as C++. + * + * Revision 1.3 1997/05/01 15:08:15 adam * Added log_mask_str_x routine. * * Revision 1.2 1995/11/01 13:55:06 quinn @@ -29,7 +32,7 @@ WRBUF wrbuf_alloc(void) { WRBUF n; - if (!(n = xmalloc(sizeof(*n)))) + if (!(n = (WRBUF)xmalloc(sizeof(*n)))) abort(); n->buf = 0; n->size = 0; @@ -59,9 +62,9 @@ int wrbuf_grow(WRBUF b, int minsize) togrow = b->size; if (togrow < minsize) togrow = minsize; - if (b->size && !(b->buf =xrealloc(b->buf, b->size += togrow))) + if (b->size && !(b->buf =(char *)xrealloc(b->buf, b->size += togrow))) abort(); - else if (!b->size && !(b->buf = xmalloc(b->size = togrow))) + else if (!b->size && !(b->buf = (char *)xmalloc(b->size = togrow))) abort(); return 0; }