Adding upstream version 3.62+dfsg.
[syslinux-debian/hramrach.git] / com32 / menu / vesamenu.c
blobcebbb34472e9ed63b2b959c7d40055c04e36e418
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[20h\033[25l", stdout);
33 void console_cleanup(void)
35 /* For the serial console, be nice and clean up */
36 fputs("\033[0m\033[20l", 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);