src/modesel.c
/* bpp_value_for_mode:
 *  Returns the bpp value of the color depth pointed to by INDEX
 *  for the specified MODE of the specified DRIVER or -1 if INDEX
 *  is out of bound.
 */
Returns the bpp value of the color depth pointed to by INDEX
for the specified MODE of the specified DRIVER or -1 if INDEX
is out of bound.
Returns the bpp value of the color depth pointed to by INDEX for the specified MODE of the specified DRIVER or - 1 if INDEX is out of bound .
static int bpp_value_for_mode(int index, int driver, int mode)
{
   int i, j = -1;
   ASSERT(index < N_COLOR_DEPTH);
   for (i=0; i < N_COLOR_DEPTH; i++) {
      if (driver_list[driver].mode_list[mode].has_bpp[i]) {
         if (++j == index)
            return bpp_value(i);
      }
   }
   return -1;
}
static int bpp_value_for_mode ( int index , int driver , int mode ) { int i , j = -1 ; ASSERT ( index < N_COLOR_DEPTH ) ; for ( i = 0 ; i < N_COLOR_DEPTH ; i ++ ) { if ( driver_list [ driver ] . mode_list [ mode ] . has_bpp [ i ] ) { if ( ++ j == index ) return bpp_value ( i ) ; } } return -1 ; }
bpp_value_for_mode:
  Returns the bpp value of the color depth pointed to by INDEX
  for the specified MODE of the specified DRIVER or -1 if INDEX
  is out of bound.
bpp_value_for_mode : Returns the bpp value of the color depth pointed to by INDEX for the specified MODE of the specified DRIVER or - 1 if INDEX is out of bound .