ucif/antlr3/src/antlr3collections.c
static  void *          antrl3VectorRemove  (pANTLR3_VECTOR vector, ANTLR3_UINT32 entry)
{
        void * element;

        // Check this is a valid request first
        //
        if      (entry >= vector->count)
        {
                return NULL;
        }

        // Valid request, return the sorted pointer
        //

        element                             = vector->elements[entry].element;

        if      (entry == vector->count - 1)
        {
                // Ensure the pointer is never reused by accident, but otherwise just
                // decrement the pointer.
                ///
                vector->elements[entry].element    = NULL;
                vector->elements[entry].freeptr    = NULL;
        }
        else
        {
                // Need to shuffle trailing pointers back over the deleted entry
                //
                ANTLR3_MEMMOVE(vector->elements + entry, vector->elements + entry + 1, sizeof(ANTLR3_VECTOR_ELEMENT) * (vector->count - entry - 1));
        }

        // One less entry in the vector now
        //
        vector->count--;

        return  element;
}
/// Remove the entry from the vector, but do not free any entry, even if it has
/// a free pointer.
///
Remove the entry from the vector, but do not free any entry, even if it has
a free pointer.
Remove the entry from the vector but do not free any entry even if it has a free pointer .
static  void *          antrl3VectorRemove  (pANTLR3_VECTOR vector, ANTLR3_UINT32 entry)
{
        void * element;
        if      (entry >= vector->count)
        {
                return NULL;
        }
         Valid request, return the sorted pointer
        element                             = vector->elements[entry].element;
        if      (entry == vector->count - 1)
        {
                 Ensure the pointer is never reused by accident, but otherwise just
                 decrement the pointer.
                /
                vector->elements[entry].element    = NULL;
                vector->elements[entry].freeptr    = NULL;
        }
        else
        {
                 Need to shuffle trailing pointers back over the deleted entry
                ANTLR3_MEMMOVE(vector->elements + entry, vector->elements + entry + 1, sizeof(ANTLR3_VECTOR_ELEMENT) * (vector->count - entry - 1));
        }
         One less entry in the vector now
        vector->count--;
        return  element;
}
static void * antrl3VectorRemove ( pANTLR3_VECTOR vector , ANTLR3_UINT32 entry ) { void * element ; if ( entry >= vector -> count ) { return NULL ; } element = vector -> elements [ entry ] . element ; if ( entry == vector -> count - 1 ) { vector -> elements [ entry ] . element = NULL ; vector -> elements [ entry ] . freeptr = NULL ; } else { ANTLR3_MEMMOVE ( vector -> elements + entry , vector -> elements + entry + 1 , sizeof ( ANTLR3_VECTOR_ELEMENT ) * ( vector -> count - entry - 1 ) ) ; } vector -> count -- ; return element ; }
Remove the entry from the vector, but do not free any entry, even if it has
a free pointer.
Remove the entry from the vector but do not free any entry even if it has a free pointer .
// Check this is a valid request first // // Valid request, return the sorted pointer // // Ensure the pointer is never reused by accident, but otherwise just // decrement the pointer. /// // Need to shuffle trailing pointers back over the deleted entry // // One less entry in the vector now //