lua: removing duplicated code from vesa.c
authorErwan Velu <erwanaliasr1@gmail.com>
Sun, 6 Feb 2011 22:54:26 +0000 (23:54 +0100)
committerErwan Velu <erwanaliasr1@gmail.com>
Sun, 6 Feb 2011 22:54:26 +0000 (23:54 +0100)
This code was static and unused. At least, if we need it let's reuse the
code from the vesa lib.

com32/lua/src/vesa.c

index f09faf3..7591119 100644 (file)
 
 int vesacon_load_background(const char *filename);
 
-static int __constfunc is_power_of_2(unsigned int x)
-{
-  return x && !(x & (x-1));
-}
-
-static int vesacon_paged_mode_ok(const struct vesa_mode_info *mi)
-{
-  int i;
-
-  if (!is_power_of_2(mi->win_size) ||
-      !is_power_of_2(mi->win_grain) ||
-      mi->win_grain > mi->win_size)
-    return 0;                   /* Impossible... */
-
-  for (i = 0; i < 2; i++) {
-    if ((mi->win_attr[i] & 0x05) == 0x05 && mi->win_seg[i])
-      return 1;                 /* Usable window */
-  }
-
-  return 0;                     /* Nope... */
-}
-
 static int vesa_getmodes(lua_State *L)
 {
   com32sys_t rm;