334 |
#define ACS_DARROW 'v' |
#define ACS_DARROW 'v' |
335 |
|
|
336 |
/* Special graphics characters for IBM displays. */ |
/* Special graphics characters for IBM displays. */ |
337 |
#ifdef GRUB_UTIL |
#define DISP_UL 218 |
338 |
# define DISP_UL ACS_ULCORNER |
#define DISP_UR 191 |
339 |
# define DISP_UR ACS_URCORNER |
#define DISP_LL 192 |
340 |
# define DISP_LL ACS_LLCORNER |
#define DISP_LR 217 |
341 |
# define DISP_LR ACS_LRCORNER |
#define DISP_HORIZ 196 |
342 |
# define DISP_HORIZ ACS_HLINE |
#define DISP_VERT 179 |
343 |
# define DISP_VERT ACS_VLINE |
#define DISP_LEFT 0x1b |
344 |
# define DISP_LEFT ACS_LARROW |
#define DISP_RIGHT 0x1a |
345 |
# define DISP_RIGHT ACS_RARROW |
#define DISP_UP 0x18 |
346 |
# define DISP_UP ACS_UARROW |
#define DISP_DOWN 0x19 |
|
# define DISP_DOWN ACS_DARROW |
|
|
#else /* ! GRUB_UTIL */ |
|
|
# define DISP_UL 218 |
|
|
# define DISP_UR 191 |
|
|
# define DISP_LL 192 |
|
|
# define DISP_LR 217 |
|
|
# define DISP_HORIZ 196 |
|
|
# define DISP_VERT 179 |
|
|
# define DISP_LEFT 0x1b |
|
|
# define DISP_RIGHT 0x1a |
|
|
# define DISP_UP 0x18 |
|
|
# define DISP_DOWN 0x19 |
|
|
#endif /* ! GRUB_UTIL */ |
|
347 |
|
|
348 |
/* Remap some libc-API-compatible function names so that we prevent |
/* Remap some libc-API-compatible function names so that we prevent |
349 |
circularararity. */ |
circularararity. */ |
533 |
ERR_BAD_ARGUMENT, |
ERR_BAD_ARGUMENT, |
534 |
ERR_UNALIGNED, |
ERR_UNALIGNED, |
535 |
ERR_PRIVILEGED, |
ERR_PRIVILEGED, |
536 |
ERR_NEED_SERIAL, |
ERR_DEV_NEED_INIT, |
537 |
ERR_NO_DISK_SPACE, |
ERR_NO_DISK_SPACE, |
538 |
ERR_NUMBER_OVERFLOW, |
ERR_NUMBER_OVERFLOW, |
539 |
|
|
615 |
#ifndef STAGE1_5 |
#ifndef STAGE1_5 |
616 |
/* The flag for debug mode. */ |
/* The flag for debug mode. */ |
617 |
extern int debug; |
extern int debug; |
|
/* Color settings */ |
|
|
extern int normal_color, highlight_color; |
|
618 |
#endif /* STAGE1_5 */ |
#endif /* STAGE1_5 */ |
619 |
|
|
620 |
extern unsigned long current_drive; |
extern unsigned long current_drive; |
766 |
/* Clear the screen. */ |
/* Clear the screen. */ |
767 |
void cls (void); |
void cls (void); |
768 |
|
|
|
/* The console part of cls. */ |
|
|
void console_cls (void); |
|
|
|
|
|
#ifndef GRUB_UTIL |
|
769 |
/* Turn off cursor. */ |
/* Turn off cursor. */ |
770 |
void nocursor (void); |
void nocursor (void); |
|
#endif |
|
771 |
|
|
772 |
/* Get the current cursor position (where 0,0 is the top left hand |
/* Get the current cursor position (where 0,0 is the top left hand |
773 |
corner of the screen). Returns packed values, (RET >> 8) is x, |
corner of the screen). Returns packed values, (RET >> 8) is x, |
774 |
(RET & 0xff) is y. */ |
(RET & 0xff) is y. */ |
775 |
int getxy (void); |
int getxy (void); |
776 |
|
|
|
/* The console part of getxy. */ |
|
|
int console_getxy (void); |
|
|
|
|
777 |
/* Set the cursor position. */ |
/* Set the cursor position. */ |
778 |
void gotoxy (int x, int y); |
void gotoxy (int x, int y); |
779 |
|
|
|
/* The console part of gotoxy. */ |
|
|
void console_gotoxy (int x, int y); |
|
|
|
|
780 |
/* Displays an ASCII character. IBM displays will translate some |
/* Displays an ASCII character. IBM displays will translate some |
781 |
characters to special graphical ones (see the DISP_* constants). */ |
characters to special graphical ones (see the DISP_* constants). */ |
782 |
void grub_putchar (int c); |
void grub_putchar (int c); |
783 |
|
|
|
/* The console part of grub_putchar. */ |
|
|
void console_putchar (int c); |
|
|
|
|
784 |
/* Wait for a keypress, and return its packed BIOS/ASCII key code. |
/* Wait for a keypress, and return its packed BIOS/ASCII key code. |
785 |
Use ASCII_CHAR(ret) to extract the ASCII code. */ |
Use ASCII_CHAR(ret) to extract the ASCII code. */ |
786 |
int getkey (void); |
int getkey (void); |
787 |
|
|
|
/* The console part of getkey. */ |
|
|
int console_getkey (void); |
|
|
|
|
788 |
/* Like GETKEY, but doesn't block, and returns -1 if no keystroke is |
/* Like GETKEY, but doesn't block, and returns -1 if no keystroke is |
789 |
available. */ |
available. */ |
790 |
int checkkey (void); |
int checkkey (void); |
791 |
|
|
|
/* The console part of checkkey. */ |
|
|
int console_checkkey (void); |
|
|
|
|
|
/* Sets text mode character attribute at the cursor position. See A_* |
|
|
constants defined above. */ |
|
|
void set_attrib (int attr); |
|
|
|
|
|
/* The console part of set_attrib. */ |
|
|
void console_set_attrib (int attr); |
|
|
|
|
792 |
/* Low-level disk I/O */ |
/* Low-level disk I/O */ |
793 |
int get_diskinfo (int drive, struct geometry *geometry); |
int get_diskinfo (int drive, struct geometry *geometry); |
794 |
int biosdisk (int subfunc, int drive, struct geometry *geometry, |
int biosdisk (int subfunc, int drive, struct geometry *geometry, |
841 |
extern int show_menu; |
extern int show_menu; |
842 |
extern int grub_timeout; |
extern int grub_timeout; |
843 |
|
|
|
/* Control the auto fill mode. */ |
|
|
extern int auto_fill; |
|
|
|
|
|
/* This variable specifies which console should be used. */ |
|
|
extern int terminal; |
|
|
|
|
|
#define TERMINAL_CONSOLE (1 << 0) /* keyboard and screen */ |
|
|
#define TERMINAL_SERIAL (1 << 1) /* serial console */ |
|
|
#define TERMINAL_HERCULES (1 << 2) /* hercules */ |
|
|
|
|
|
#define TERMINAL_DUMB (1 << 16) /* dumb terminal */ |
|
|
|
|
844 |
void init_builtins (void); |
void init_builtins (void); |
845 |
void init_config (void); |
void init_config (void); |
846 |
char *skip_to (int after_equal, char *cmdline); |
char *skip_to (int after_equal, char *cmdline); |
897 |
int get_based_digit (int c, int base); |
int get_based_digit (int c, int base); |
898 |
int safe_parse_maxint (char **str_ptr, int *myint_ptr); |
int safe_parse_maxint (char **str_ptr, int *myint_ptr); |
899 |
int memcheck (int start, int len); |
int memcheck (int start, int len); |
|
int translate_keycode (int c); |
|
900 |
|
|
901 |
#ifndef NO_DECOMPRESSION |
#ifndef NO_DECOMPRESSION |
902 |
/* Compression support. */ |
/* Compression support. */ |