X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fnmem.h;h=5d465481b12615f1182296d956e634e13b7870b5;hp=5e0a5210930f6e1b182436376f168311c82f205e;hb=88d26764ac94b4a2872c77e2deed58b15d2f6f02;hpb=e7a11f55c79f2ddf7a2cdaa898cfe57ce2fe404a diff --git a/include/nmem.h b/include/nmem.h index 5e0a521..5d46548 100644 --- a/include/nmem.h +++ b/include/nmem.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, Index Data. + * Copyright (c) 1995-1997, Index Data. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation, in whole or in part, for any purpose, is hereby granted, @@ -33,6 +33,21 @@ extern "C" { #endif +typedef struct nmem_block +{ + char *buf; /* memory allocated in this block */ + int size; /* size of buf */ + int top; /* top of buffer */ + struct nmem_block *next; +} nmem_block; + +typedef struct nmem_control +{ + int total; + nmem_block *blocks; + struct nmem_control *next; +} nmem_control; + typedef struct nmem_control *NMEM; void nmem_reset(NMEM n);