X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=odr%2Fodr_mem.c;h=4437058573f8d88b84b7dd97118d2de524cf396e;hp=044b3060976cb4095b46665c241bdee579d94f2a;hb=657fb99115b87a5244e9a33bbe4ca3d9d18849c4;hpb=f305305306da9af74ed6c559f2b06353fd5a7c82 diff --git a/odr/odr_mem.c b/odr/odr_mem.c index 044b306..4437058 100644 --- a/odr/odr_mem.c +++ b/odr/odr_mem.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: odr_mem.c,v $ - * Revision 1.6 1995-08-21 09:10:41 quinn + * Revision 1.7 1995-09-27 15:02:59 quinn + * Modified function heads & prototypes. + * + * Revision 1.6 1995/08/21 09:10:41 quinn * Smallish fixes to suppport new formats. * * Revision 1.5 1995/05/16 08:50:55 quinn @@ -85,7 +88,7 @@ static odr_memblock *get_block(int size) /* * Return p to the global freelist. */ -void odr_release_mem(ODR_MEM p) +void MDF odr_release_mem(ODR_MEM p) { odr_memblock *t; @@ -100,7 +103,7 @@ void odr_release_mem(ODR_MEM p) /* * Extract the memory control block from o. */ -ODR_MEM odr_extract_mem(ODR o) +ODR_MEM MDF odr_extract_mem(ODR o) { ODR_MEM r = o->mem; @@ -108,7 +111,7 @@ ODR_MEM odr_extract_mem(ODR o) return r; } -void *odr_malloc(ODR o, int size) +void MDF *odr_malloc(ODR o, int size) { struct odr_memblock *p = o->mem; char *r; @@ -130,7 +133,7 @@ void *odr_malloc(ODR o, int size) return r; } -int odr_total(ODR o) +int MDF odr_total(ODR o) { return o->mem ? o->mem->total : 0; } @@ -138,7 +141,7 @@ int odr_total(ODR o) /* ---------- memory management for data encoding ----------*/ -int odr_grow_block(odr_ecblock *b, int min_bytes) +int MDF odr_grow_block(odr_ecblock *b, int min_bytes) { int togrow; @@ -160,7 +163,7 @@ int odr_grow_block(odr_ecblock *b, int min_bytes) return 0; } -int odr_write(ODR o, unsigned char *buf, int bytes) +int MDF odr_write(ODR o, unsigned char *buf, int bytes) { if (o->ecb.pos + bytes >= o->ecb.size && odr_grow_block(&o->ecb, bytes)) { @@ -174,7 +177,7 @@ int odr_write(ODR o, unsigned char *buf, int bytes) return 0; } -int odr_seek(ODR o, int whence, int offset) +int MDF odr_seek(ODR o, int whence, int offset) { if (whence == ODR_S_CUR) offset += o->ecb.pos;