15 lb = (fbuff)malloc(FBUFF_SIZE);
19 fprintf(stderr,"InitFBuff: couldn't get space for fbuff\n");
25 * count from bottom to top
27 * head is the next available space
28 * tail is the last valid data item
34 lb->vals = (double *)malloc(size*sizeof(double));
37 fprintf(stderr,"InitFBuff: couldn't get space for vals\n");
57 UpdateFBuff(fbuff fb, double val)
60 fb->head = MODMINUS(fb->head,1,fb->size);
63 * if we have moved the head over the tail, bump the tail around too
65 if(fb->head == fb->tail)
67 fb->tail = MODMINUS(fb->tail,1,fb->size);