FreeBSD/sys/dev/fb/vesa.c
/* map a generic video mode to a known mode */
map a generic video mode to a known mode
map a generic video mode to a known mode
static int
vesa_map_gen_mode_num(int type, int color, int mode)
{
    static struct {
	int from;
	int to;
    } mode_map[] = {
	{ M_TEXT_132x25, M_VESA_C132x25 },
	{ M_TEXT_132x43, M_VESA_C132x43 },
	{ M_TEXT_132x50, M_VESA_C132x50 },
	{ M_TEXT_132x60, M_VESA_C132x60 },
    };
    int i;
    for (i = 0; i < nitems(mode_map); ++i) {
        if (mode_map[i].from == mode)
            return (mode_map[i].to);
    }
    return (mode);
}
static int vesa_map_gen_mode_num ( int type , int color , int mode ) { static struct { int from ; int to ; } mode_map [ ] = { { M_TEXT_132x25 , M_VESA_C132x25 } , { M_TEXT_132x43 , M_VESA_C132x43 } , { M_TEXT_132x50 , M_VESA_C132x50 } , { M_TEXT_132x60 , M_VESA_C132x60 } , } ; int i ; for ( i = 0 ; i < nitems ( mode_map ) ; ++ i ) { if ( mode_map [ i ] . from == mode ) return ( mode_map [ i ] . to ) ; } return ( mode ) ; }
map a generic video mode to a known mode
map a generic video mode to a known mode