ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

void fi_add ( struct frame_index fi,
off_t  pos 
)

Definition at line 83 of file index.c.

Referenced by read_frame().

{
    debug3("wanting to add to fill %lu, step %lu, size %lu", (unsigned long)fi->fill, (unsigned long)fi->step, (unsigned long)fi->size);
    if(fi->fill == fi->size)
    { /* Index is full, we need to shrink... or grow. */
        /* Store the current frame number to check later if we still want it. */
        off_t framenum = fi->fill*fi->step;
        /* If we want not / cannot grow, we shrink. */  
        if( !(fi->grow_size && fi_resize(fi, fi->size+fi->grow_size)==0) )
        fi_shrink(fi);

        /* Now check if we still want to add this frame (could be that not, because of changed step). */
        if(fi->next != framenum) return;
    }
    /* When we are here, we want that frame. */
    if(fi->fill < fi->size) /* safeguard for size=1, or just generally */
    {
        debug1("adding to index at %p", (void*)(fi->data+fi->fill));
        fi->data[fi->fill] = pos;
        ++fi->fill;
        fi->next = fi_next(fi);
        debug3("added pos %li to index with fill %lu and step %lu", (long) pos, (unsigned long)fi->fill, (unsigned long)fi->step);
    }
}

Generated on Sat May 26 2012 05:08:39 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.