Plugins/PointSprite/ParaViewPlugin/Qvis/VisItException.cpp
static int
recursive_exception_lookup(const char *name, int start, int end)
{
    int retval = start;

    int delta = (end - start) >> 1;
    int pivot = start + delta;
    int comp = strcmp(name, exception_tree[pivot].name);

    if(delta == 0)
        retval = (comp == 0) ? pivot : -1;
    else if(comp < 0)
        retval = recursive_exception_lookup(name, start, pivot);
    else if(comp == 0)
        retval = (comp == 0) ? pivot : -1;
    else
        retval = recursive_exception_lookup(name, pivot, end);

    return retval;
}
// ****************************************************************************
// Function: recursive_exception_lookup
//
// Purpose:
//   This function does a binary search through the exception info to get the
//   index that contains the specified exception name.
//
// Notes:      
//
// Programmer: Brad Whitlock
// Creation:   Mon Oct 22 20:55:05 PST 2001
//
// Modifications:
//   
// ****************************************************************************
recursive_exception_lookup
Purpose:
This function does a binary search through the exception info to get the
index that contains the specified exception name.



Brad Whitlock
Creation:   Mon Oct 22 20:55:05 PST 2001


recursive_exception_lookup Purpose : This function does a binary search through the exception info to get the index that contains the specified exception name . Brad Whitlock Creation : Mon Oct 22 20 : 55 : 05 PST 2001
static int
recursive_exception_lookup(const char *name, int start, int end)
{
    int retval = start;
    int delta = (end - start) >> 1;
    int pivot = start + delta;
    int comp = strcmp(name, exception_tree[pivot].name);
    if(delta == 0)
        retval = (comp == 0) ? pivot : -1;
    else if(comp < 0)
        retval = recursive_exception_lookup(name, start, pivot);
    else if(comp == 0)
        retval = (comp == 0) ? pivot : -1;
    else
        retval = recursive_exception_lookup(name, pivot, end);
    return retval;
}
static int recursive_exception_lookup ( const char * name , int start , int end ) { int retval = start ; int delta = ( end - start ) >> 1 ; int pivot = start + delta ; int comp = strcmp ( name , exception_tree [ pivot ] . name ) ; if ( delta == 0 ) retval = ( comp == 0 ) ? pivot : -1 ; else if ( comp < 0 ) retval = recursive_exception_lookup ( name , start , pivot ) ; else if ( comp == 0 ) retval = ( comp == 0 ) ? pivot : -1 ; else retval = recursive_exception_lookup ( name , pivot , end ) ; return retval ; }
Function: recursive_exception_lookup
Purpose:
This function does a binary search through the exception info to get the
index that contains the specified exception name.
Function : recursive_exception_lookup Purpose : This function does a binary search through the exception info to get the index that contains the specified exception name .