Changeset 540 for trunk/thune/array.c

Show
Ignore:
Timestamp:
07/04/08 03:46:13 (5 months ago)
Author:
krobillard
Message:

Thune

  • Implemented date!. Added ur_arrayExpand(), save.

ThuneGL

  • Added line-edit widget, blit, move-glyphs.
  • Can now make font from texture & binary.
  • Optimized renderGlyphXY() a bit.
  • twidget close event handler works again.
  • Updated thune-gl.spec for renamed glv RPM.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/array.c

    r255 r540  
    182182 
    183183 
     184/** 
     185  Create space in the array for count elements starting at index. 
     186  The memory in the new space is uninitialized. 
     187*/ 
     188void ur_arrayExpand( UArray* arr, int elemSize, int index, int count ) 
     189{ 
     190    ur_arrayReserve( arr, elemSize, arr->used + count ); 
     191 
     192    if( index < arr->used ) 
     193    { 
     194        char* buf = arr->ptr.c + (elemSize * index); 
     195        memMove( buf + (elemSize * count), buf, 
     196                 elemSize * (arr->used - index) ); 
     197    } 
     198 
     199    arr->used += count; 
     200} 
     201 
     202 
    184203/*EOF*/