Clean up embedded Makefile targets; fix build failure
[syslinux.git] / com32 / menu / vesamenu.c
blob094b8f6501dc211463865773bef579e4d1190ef5
1 /* ----------------------------------------------------------------------- *
3 * Copyright 2004-2008 H. Peter Anvin - All Rights Reserved
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
8 * Boston MA 02110-1301, USA; either version 2 of the License, or
9 * (at your option) any later version; incorporated herein by reference.
11 * ----------------------------------------------------------------------- */
14 * vesamenu.c
16 * Simple menu system which displays a list and allows the user to select
17 * a command line and/or edit it.
19 * VESA graphics version.
22 #include <stdio.h>
23 #include <console.h>
24 #include <syslinux/vesacon.h>
26 #include "menu.h"
28 void console_prepare(void)
30 fputs("\033[0m\033[25l", stdout);
33 void console_cleanup(void)
35 /* For the serial console, be nice and clean up */
36 fputs("\033[0m", stdout);
39 int draw_background(const char *what)
41 if (!what)
42 return vesacon_default_background();
43 else if (what[0] == '#')
44 return vesacon_set_background(parse_argb((char **)&what));
45 else
46 return vesacon_load_background(what);
49 int main(int argc, char *argv[])
51 openconsole(&dev_rawcon_r, &dev_vesaserial_w);
52 return menu_main(argc, argv);