ucif/antlr3/src/antlr3collections.c
static void
antlr3EnumNextEntry(pANTLR3_HASH_ENUM en)
{
    pANTLR3_HASH_BUCKET bucket;

    /* See if the current entry pointer is valid first of all
     */
    if  (en->entry != NULL)
    {
        /* Current entry was a valid point, see if there is another
         * one in the chain.
         */
        if  (en->entry->nextEntry != NULL)
        {
            /* Next entry in the enumeration is just the next entry
             * in the chain.
             */
            en->entry = en->entry->nextEntry;
            return;
        }
    }

    /* There were no more entries in the current bucket, if there are
     * more buckets then chase them until we find an entry.
     */
    en->bucket++;

    while   (en->bucket < en->table->modulo)
    {
        /* There was one more bucket, see if it has any elements in it
         */
        bucket  = en->table->buckets + en->bucket;

        if  (bucket->entries != NULL)
        {
            /* There was an entry in this bucket, so we can use it
             * for the next entry in the enumeration.
             */
            en->entry   = bucket->entries;
            return;
        }

        /* There was nothing in the bucket we just examined, move to the
         * next one.
         */
        en->bucket++;
    }

    /* Here we have exhausted all buckets and the enumeration pointer will
     * have its bucket count = table->modulo which signifies that we are done.
     */
}
/** \brief Local function to advance the entry pointer of an enumeration
 * structure to the next valid entry (if there is one).
 *
 * \param[in] enum Pointer to ANTLR3 enumeration structure returned by antlr3EnumNew()
 *
 * \remark
 *   - The function always leaves the pointers pointing at a valid entry if there
 *     is one, so if the entry pointer is NULL when this function exits, there were
 *     no more entries in the table.
 */
\brief Local function to advance the entry pointer of an enumeration
structure to the next valid entry (if there is one).

\param[in] enum Pointer to ANTLR3 enumeration structure returned by antlr3EnumNew()

\remark
- The function always leaves the pointers pointing at a valid entry if there
is one, so if the entry pointer is NULL when this function exits, there were
no more entries in the table.
\ brief Local function to advance the entry pointer of an enumeration structure to the next valid entry ( if there is one ) . \ param [ in ] enum Pointer to ANTLR3 enumeration structure returned by antlr3EnumNew () \ remark - The function always leaves the pointers pointing at a valid entry if there is one so if the entry pointer is NULL when this function exits there were no more entries in the table .
static void
antlr3EnumNextEntry(pANTLR3_HASH_ENUM en)
{
    pANTLR3_HASH_BUCKET bucket;
    if  (en->entry != NULL)
    {
        if  (en->entry->nextEntry != NULL)
        {
            en->entry = en->entry->nextEntry;
            return;
        }
    }
    en->bucket++;
    while   (en->bucket < en->table->modulo)
    {
        bucket  = en->table->buckets + en->bucket;
        if  (bucket->entries != NULL)
        {
            en->entry   = bucket->entries;
            return;
        }
        en->bucket++;
    }
}
static void antlr3EnumNextEntry ( pANTLR3_HASH_ENUM en ) { pANTLR3_HASH_BUCKET bucket ; if ( en -> entry != NULL ) { if ( en -> entry -> nextEntry != NULL ) { en -> entry = en -> entry -> nextEntry ; return ; } } en -> bucket ++ ; while ( en -> bucket < en -> table -> modulo ) { bucket = en -> table -> buckets + en -> bucket ; if ( bucket -> entries != NULL ) { en -> entry = bucket -> entries ; return ; } en -> bucket ++ ; } }
\brief Local function to advance the entry pointer of an enumeration
 structure to the next valid entry (if there is one).
\ brief Local function to advance the entry pointer of an enumeration structure to the next valid entry ( if there is one ) .
/* See if the current entry pointer is valid first of all
     */ /* Current entry was a valid point, see if there is another
         * one in the chain.
         */ /* Next entry in the enumeration is just the next entry
             * in the chain.
             */ /* There were no more entries in the current bucket, if there are
     * more buckets then chase them until we find an entry.
     */ /* There was one more bucket, see if it has any elements in it
         */ /* There was an entry in this bucket, so we can use it
             * for the next entry in the enumeration.
             */ /* There was nothing in the bucket we just examined, move to the
         * next one.
         */ /* Here we have exhausted all buckets and the enumeration pointer will
     * have its bucket count = table->modulo which signifies that we are done.
     */