dynarray.c
void *dynarray_shift(Dynarray *hdr) {
    void *result;

    if(!hdr->used)
        return NULL;
    result = hdr->ary[0];
    hdr->used--;
    memmove(hdr->ary, hdr->ary + 1, hdr->used * sizeof(void *));

    return result;
}
//==============================================================================
// Shifts an item off the beginning of the array, returning a pointer to it or
// NULL if the array is empty.
//==============================================================================
Shifts an item off the beginning of the array, returning a pointer to it or
NULL if the array is empty.
Shifts an item off the beginning of the array returning a pointer to it or NULL if the array is empty .
void *dynarray_shift(Dynarray *hdr) {
    void *result;
    if(!hdr->used)
        return NULL;
    result = hdr->ary[0];
    hdr->used--;
    memmove(hdr->ary, hdr->ary + 1, hdr->used * sizeof(void *));
    return result;
}
void * dynarray_shift ( Dynarray * hdr ) { void * result ; if ( ! hdr -> used ) return NULL ; result = hdr -> ary [ 0 ] ; hdr -> used -- ; memmove ( hdr -> ary , hdr -> ary + 1 , hdr -> used * sizeof ( void * ) ) ; return result ; }
Shifts an item off the beginning of the array, returning a pointer to it or
NULL if the array is empty.
Shifts an item off the beginning of the array returning a pointer to it or NULL if the array is empty .