X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=isam%2Fphysical.c;h=65bfe19023ba42120117b4a652de24fca858aa8d;hb=886253fb90810e512cacf4f02694645ead7a22e0;hp=ebc4687248281fee2bf7ea9bd06859c9392adf34;hpb=1d992eee889b7c7f5dd3e83c3efdadc8543a0afc;p=idzebra-moved-to-github.git diff --git a/isam/physical.c b/isam/physical.c index ebc4687..65bfe19 100644 --- a/isam/physical.c +++ b/isam/physical.c @@ -1,10 +1,25 @@ /* - * Copyright (C) 1994, Index Data I/S + * Copyright (C) 1994-1999, Index Data * All rights reserved. * Sebastian Hammer, Adam Dickmeiss * * $Log: physical.c,v $ - * Revision 1.12 1996-03-20 16:17:11 quinn + * Revision 1.17 1999-11-30 13:48:04 adam + * Improved installation. Updated for inclusion of YAZ header files. + * + * Revision 1.16 1999/05/26 07:49:14 adam + * C++ compilation. + * + * Revision 1.15 1999/02/02 14:51:22 adam + * Updated WIN32 code specific sections. Changed header. + * + * Revision 1.14 1997/09/09 13:38:12 adam + * Partial port to WIN95/NT. + * + * Revision 1.13 1996/10/29 13:56:57 adam + * Include of zebrautl.h instead of alexutil.h. + * + * Revision 1.12 1996/03/20 16:17:11 quinn * Bug hunting * * Revision 1.11 1996/03/20 13:29:17 quinn @@ -49,7 +64,9 @@ #include #include +#include +#include #include static int is_freestore_alloc(ISAM is, int type) @@ -257,7 +274,7 @@ void is_p_unmap(is_mtable *tab) static is_mbuf *mbuf_takehead(is_mbuf **mb, int *num, int keysize) { - is_mbuf *p = 0, **pp = &p, *new; + is_mbuf *p = 0, **pp = &p, *inew; int toget = *num; if (!toget) @@ -272,13 +289,13 @@ static is_mbuf *mbuf_takehead(is_mbuf **mb, int *num, int keysize) } if (toget > 0 && *mb) { - new = xmalloc_mbuf(IS_MBUF_TYPE_SMALL); - new->next = (*mb)->next; - (*mb)->next = new; - new->data = (*mb)->data; + inew = xmalloc_mbuf(IS_MBUF_TYPE_SMALL); + inew->next = (*mb)->next; + (*mb)->next = inew; + inew->data = (*mb)->data; (*mb)->refcount++; - new->offset = (*mb)->offset + toget * keysize; - new->num = (*mb)->num - toget; + inew->offset = (*mb)->offset + toget * keysize; + inew->num = (*mb)->num - toget; (*mb)->num = toget; *pp = *mb; *mb = (*mb)->next; @@ -296,7 +313,7 @@ static is_mbuf *mbuf_takehead(is_mbuf **mb, int *num, int keysize) */ void is_p_align(is_mtable *tab) { - is_mblock *mblock, *new, *last = 0, *next; + is_mblock *mblock, *inew, *last = 0, *next; is_mbuf *mbufs, *mbp; int blocks, recsblock; @@ -359,11 +376,11 @@ void is_p_align(is_mtable *tab) { if (mbufs) { - new = xmalloc_mblock(); - new->diskpos = -1; - new->state = IS_MBSTATE_DIRTY; - new->next = mblock->next; - mblock->next = new; + inew = xmalloc_mblock(); + inew->diskpos = -1; + inew->state = IS_MBSTATE_DIRTY; + inew->next = mblock->next; + mblock->next = inew; } mblock->data = mbp; mblock->num_records = recsblock;