[syslinux:master] lua: removing duplicated code from vesa.c

syslinux-bot for Erwan Velu erwanaliasr1 at gmail.com
Sun Feb 20 16:42:23 PST 2011


Commit-ID:  9716800d675364ff18112a25f8d6adea2c341e2f
Gitweb:     http://syslinux.zytor.com/commit/9716800d675364ff18112a25f8d6adea2c341e2f
Author:     Erwan Velu <erwanaliasr1 at gmail.com>
AuthorDate: Sun, 6 Feb 2011 23:54:26 +0100
Committer:  Erwan Velu <erwanaliasr1 at gmail.com>
CommitDate: Sun, 6 Feb 2011 23:54:26 +0100

lua: removing duplicated code from vesa.c

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 |   22 ----------------------
 1 files changed, 0 insertions(+), 22 deletions(-)

diff --git a/com32/lua/src/vesa.c b/com32/lua/src/vesa.c
index f09faf3..7591119 100644
--- a/com32/lua/src/vesa.c
+++ b/com32/lua/src/vesa.c
@@ -10,28 +10,6 @@
 
 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;



More information about the Syslinux-commits mailing list