merge trunk
This commit is contained in:
commit
528aeaeabb
71 changed files with 3287 additions and 1767 deletions
|
@ -109,4 +109,13 @@ grub_utf16_to_utf8 (grub_uint8_t *dest, grub_uint16_t *src,
|
|||
return dest;
|
||||
}
|
||||
|
||||
/* Convert UCS-4 to UTF-8. */
|
||||
char *grub_ucs4_to_utf8_alloc (grub_uint32_t *src, grub_size_t size);
|
||||
|
||||
int
|
||||
grub_is_valid_utf8 (const grub_uint8_t *src, grub_size_t srcsize);
|
||||
|
||||
int grub_utf8_to_ucs4_alloc (const char *msg, grub_uint32_t **unicode_msg,
|
||||
grub_uint32_t **last_position);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -24,20 +24,25 @@
|
|||
#include <grub/symbol.h>
|
||||
#include <grub/types.h>
|
||||
#include <grub/menu.h>
|
||||
#include <grub/term.h>
|
||||
|
||||
struct grub_menu_viewer
|
||||
{
|
||||
/* The menu viewer name. */
|
||||
const char *name;
|
||||
|
||||
grub_err_t (*show_menu) (grub_menu_t menu, int nested);
|
||||
|
||||
struct grub_menu_viewer *next;
|
||||
void *data;
|
||||
void (*set_chosen_entry) (int entry, void *data);
|
||||
void (*print_timeout) (int timeout, void *data);
|
||||
void (*clear_timeout) (void *data);
|
||||
void (*fini) (void *fini);
|
||||
};
|
||||
typedef struct grub_menu_viewer *grub_menu_viewer_t;
|
||||
|
||||
void grub_menu_viewer_register (grub_menu_viewer_t viewer);
|
||||
void grub_menu_register_viewer (struct grub_menu_viewer *viewer);
|
||||
|
||||
grub_err_t grub_menu_viewer_show_menu (grub_menu_t menu, int nested);
|
||||
grub_err_t
|
||||
grub_menu_try_text (struct grub_term_output *term,
|
||||
int entry, grub_menu_t menu, int nested);
|
||||
|
||||
extern grub_err_t (*grub_gfxmenu_try_hook) (int entry, grub_menu_t menu,
|
||||
int nested);
|
||||
|
||||
#endif /* GRUB_MENU_VIEWER_HEADER */
|
||||
|
|
|
@ -199,11 +199,11 @@ int EXPORT_FUNC(grub_sprintf) (char *str, const char *fmt, ...) __attribute__ ((
|
|||
int EXPORT_FUNC(grub_vsprintf) (char *str, const char *fmt, va_list args);
|
||||
void EXPORT_FUNC(grub_exit) (void) __attribute__ ((noreturn));
|
||||
void EXPORT_FUNC(grub_abort) (void) __attribute__ ((noreturn));
|
||||
grub_ssize_t EXPORT_FUNC(grub_utf8_to_ucs4) (grub_uint32_t *dest,
|
||||
grub_size_t destsize,
|
||||
const grub_uint8_t *src,
|
||||
grub_size_t srcsize,
|
||||
const grub_uint8_t **srcend);
|
||||
grub_size_t EXPORT_FUNC(grub_utf8_to_ucs4) (grub_uint32_t *dest,
|
||||
grub_size_t destsize,
|
||||
const grub_uint8_t *src,
|
||||
grub_size_t srcsize,
|
||||
const grub_uint8_t **srcend);
|
||||
grub_uint64_t EXPORT_FUNC(grub_divmod64) (grub_uint64_t n,
|
||||
grub_uint32_t d, grub_uint32_t *r);
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#ifndef GRUB_NORMAL_HEADER
|
||||
#define GRUB_NORMAL_HEADER 1
|
||||
|
||||
#include <grub/term.h>
|
||||
#include <grub/symbol.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/env.h>
|
||||
|
@ -45,21 +46,21 @@ enum grub_completion_type
|
|||
typedef enum grub_completion_type grub_completion_type_t;
|
||||
|
||||
extern struct grub_menu_viewer grub_normal_text_menu_viewer;
|
||||
|
||||
extern int grub_normal_exit_level;
|
||||
|
||||
/* Defined in `main.c'. */
|
||||
void grub_enter_normal_mode (const char *config);
|
||||
void grub_normal_execute (const char *config, int nested, int batch);
|
||||
void grub_normal_init_page (void);
|
||||
void grub_menu_init_page (int nested, int edit);
|
||||
void grub_menu_init_page (int nested, int edit,
|
||||
struct grub_term_output *term);
|
||||
void grub_normal_init_page (struct grub_term_output *term);
|
||||
grub_err_t grub_normal_add_menu_entry (int argc, const char **args,
|
||||
const char *sourcecode);
|
||||
char *grub_file_getline (grub_file_t file);
|
||||
void grub_cmdline_run (int nested);
|
||||
|
||||
/* Defined in `cmdline.c'. */
|
||||
int grub_cmdline_get (const char *prompt, char cmdline[], unsigned max_len,
|
||||
int echo_char, int readline, int history);
|
||||
char *grub_cmdline_get (const char *prompt);
|
||||
grub_err_t grub_set_history (int newsize);
|
||||
|
||||
/* Defined in `completion.c'. */
|
||||
|
@ -76,14 +77,19 @@ void grub_parse_color_name_pair (grub_uint8_t *ret, const char *name);
|
|||
|
||||
/* Defined in `menu_text.c'. */
|
||||
void grub_wait_after_message (void);
|
||||
int grub_utf8_to_ucs4_alloc (const char *msg, grub_uint32_t **unicode_msg,
|
||||
grub_uint32_t **last_position);
|
||||
void grub_print_ucs4 (const grub_uint32_t * str,
|
||||
const grub_uint32_t * last_position);
|
||||
const grub_uint32_t * last_position,
|
||||
struct grub_term_output *term);
|
||||
grub_ssize_t grub_getstringwidth (grub_uint32_t * str,
|
||||
const grub_uint32_t * last_position);
|
||||
const grub_uint32_t * last_position,
|
||||
struct grub_term_output *term);
|
||||
void grub_print_message_indented (const char *msg, int margin_left,
|
||||
int margin_right);
|
||||
int margin_right,
|
||||
struct grub_term_output *term);
|
||||
void
|
||||
grub_menu_text_register_instances (int entry, grub_menu_t menu, int nested);
|
||||
grub_err_t
|
||||
grub_show_menu (grub_menu_t menu, int nested);
|
||||
|
||||
/* Defined in `handler.c'. */
|
||||
void read_handler_list (void);
|
||||
|
@ -97,6 +103,9 @@ void read_fs_list (void);
|
|||
|
||||
void read_crypto_list (void);
|
||||
|
||||
void read_terminal_list (void);
|
||||
|
||||
void grub_set_more (int onoff);
|
||||
|
||||
#ifdef GRUB_UTIL
|
||||
void grub_normal_init (void);
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include <grub/types.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/handler.h>
|
||||
#include <grub/reader.h>
|
||||
|
||||
/* All the states for the command line. */
|
||||
|
|
|
@ -20,60 +20,10 @@
|
|||
#ifndef GRUB_READER_HEADER
|
||||
#define GRUB_READER_HEADER 1
|
||||
|
||||
#include <grub/types.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/handler.h>
|
||||
|
||||
typedef grub_err_t (*grub_reader_getline_t) (char **, int);
|
||||
|
||||
struct grub_reader
|
||||
{
|
||||
/* The next reader. */
|
||||
struct grub_parser *next;
|
||||
|
||||
/* The reader name. */
|
||||
const char *name;
|
||||
|
||||
/* Initialize the reader. */
|
||||
grub_err_t (*init) (void);
|
||||
|
||||
/* Clean up the reader. */
|
||||
grub_err_t (*fini) (void);
|
||||
|
||||
grub_reader_getline_t read_line;
|
||||
};
|
||||
typedef struct grub_reader *grub_reader_t;
|
||||
|
||||
extern struct grub_handler_class EXPORT_VAR(grub_reader_class);
|
||||
|
||||
grub_err_t EXPORT_FUNC(grub_reader_loop) (grub_reader_getline_t getline);
|
||||
|
||||
static inline void
|
||||
grub_reader_register (const char *name __attribute__ ((unused)),
|
||||
grub_reader_t reader)
|
||||
{
|
||||
grub_handler_register (&grub_reader_class, GRUB_AS_HANDLER (reader));
|
||||
}
|
||||
|
||||
static inline void
|
||||
grub_reader_unregister (grub_reader_t reader)
|
||||
{
|
||||
grub_handler_unregister (&grub_reader_class, GRUB_AS_HANDLER (reader));
|
||||
}
|
||||
|
||||
static inline grub_reader_t
|
||||
grub_reader_get_current (void)
|
||||
{
|
||||
return (grub_reader_t) grub_reader_class.cur_handler;
|
||||
}
|
||||
|
||||
static inline grub_err_t
|
||||
grub_reader_set_current (grub_reader_t reader)
|
||||
{
|
||||
return grub_handler_set_current (&grub_reader_class,
|
||||
GRUB_AS_HANDLER (reader));
|
||||
}
|
||||
|
||||
void grub_register_rescue_reader (void);
|
||||
void grub_rescue_run (void);
|
||||
|
||||
#endif /* ! GRUB_READER_HEADER */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2002,2003,2005,2007,2008,2009 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2002,2003,2005,2007,2008,2009,2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -68,8 +68,6 @@ grub_term_color_state;
|
|||
#define GRUB_TERM_NO_EDIT (1 << 1)
|
||||
/* Set when the terminal cannot do fancy things. */
|
||||
#define GRUB_TERM_DUMB (1 << 2)
|
||||
/* Set when the terminal needs to be initialized. */
|
||||
#define GRUB_TERM_NEED_INIT (1 << 16)
|
||||
|
||||
|
||||
/* Bitmasks for modifier keys returned by grub_getkeystatus. */
|
||||
|
@ -93,10 +91,6 @@ grub_term_color_state;
|
|||
|
||||
/* Menu-related geometrical constants. */
|
||||
|
||||
/* FIXME: Ugly way to get them form terminal. */
|
||||
#define GRUB_TERM_WIDTH ((grub_getwh()&0xFF00)>>8)
|
||||
#define GRUB_TERM_HEIGHT (grub_getwh()&0xFF)
|
||||
|
||||
/* The number of lines of "GRUB version..." at the top. */
|
||||
#define GRUB_TERM_INFO_HEIGHT 1
|
||||
|
||||
|
@ -113,37 +107,12 @@ grub_term_color_state;
|
|||
/* The X position of the left border. */
|
||||
#define GRUB_TERM_LEFT_BORDER_X GRUB_TERM_MARGIN
|
||||
|
||||
/* The width of the border. */
|
||||
#define GRUB_TERM_BORDER_WIDTH (GRUB_TERM_WIDTH \
|
||||
- GRUB_TERM_MARGIN * 3 \
|
||||
- GRUB_TERM_SCROLL_WIDTH)
|
||||
|
||||
/* The number of lines of messages at the bottom. */
|
||||
#define GRUB_TERM_MESSAGE_HEIGHT 8
|
||||
|
||||
/* The height of the border. */
|
||||
#define GRUB_TERM_BORDER_HEIGHT (GRUB_TERM_HEIGHT \
|
||||
- GRUB_TERM_TOP_BORDER_Y \
|
||||
- GRUB_TERM_MESSAGE_HEIGHT)
|
||||
|
||||
/* The number of entries shown at a time. */
|
||||
#define GRUB_TERM_NUM_ENTRIES (GRUB_TERM_BORDER_HEIGHT - 2)
|
||||
|
||||
/* The Y position of the first entry. */
|
||||
#define GRUB_TERM_FIRST_ENTRY_Y (GRUB_TERM_TOP_BORDER_Y + 1)
|
||||
|
||||
/* The max column number of an entry. The last "-1" is for a
|
||||
continuation marker. */
|
||||
#define GRUB_TERM_ENTRY_WIDTH (GRUB_TERM_BORDER_WIDTH - 2 \
|
||||
- GRUB_TERM_MARGIN * 2 - 1)
|
||||
|
||||
/* The standard X position of the cursor. */
|
||||
#define GRUB_TERM_CURSOR_X (GRUB_TERM_LEFT_BORDER_X \
|
||||
+ GRUB_TERM_BORDER_WIDTH \
|
||||
- GRUB_TERM_MARGIN \
|
||||
- 1)
|
||||
|
||||
|
||||
struct grub_term_input
|
||||
{
|
||||
/* The next terminal. */
|
||||
|
@ -224,86 +193,222 @@ struct grub_term_output
|
|||
};
|
||||
typedef struct grub_term_output *grub_term_output_t;
|
||||
|
||||
extern struct grub_handler_class EXPORT_VAR(grub_term_input_class);
|
||||
extern struct grub_handler_class EXPORT_VAR(grub_term_output_class);
|
||||
extern struct grub_term_output *EXPORT_VAR(grub_term_outputs_disabled);
|
||||
extern struct grub_term_input *EXPORT_VAR(grub_term_inputs_disabled);
|
||||
extern struct grub_term_output *EXPORT_VAR(grub_term_outputs);
|
||||
extern struct grub_term_input *EXPORT_VAR(grub_term_inputs);
|
||||
|
||||
static inline void
|
||||
grub_term_register_input (const char *name __attribute__ ((unused)),
|
||||
grub_term_input_t term)
|
||||
{
|
||||
grub_handler_register (&grub_term_input_class, GRUB_AS_HANDLER (term));
|
||||
if (grub_term_inputs)
|
||||
grub_list_push (GRUB_AS_LIST_P (&grub_term_inputs_disabled),
|
||||
GRUB_AS_LIST (term));
|
||||
else
|
||||
{
|
||||
/* If this is the first terminal, enable automatically. */
|
||||
if (term->init)
|
||||
term->init ();
|
||||
grub_list_push (GRUB_AS_LIST_P (&grub_term_inputs), GRUB_AS_LIST (term));
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
grub_term_register_output (const char *name __attribute__ ((unused)),
|
||||
grub_term_output_t term)
|
||||
{
|
||||
grub_handler_register (&grub_term_output_class, GRUB_AS_HANDLER (term));
|
||||
if (grub_term_outputs)
|
||||
grub_list_push (GRUB_AS_LIST_P (&grub_term_outputs_disabled),
|
||||
GRUB_AS_LIST (term));
|
||||
else
|
||||
{
|
||||
/* If this is the first terminal, enable automatically. */
|
||||
if (term->init)
|
||||
term->init ();
|
||||
grub_list_push (GRUB_AS_LIST_P (&grub_term_outputs),
|
||||
GRUB_AS_LIST (term));
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
grub_term_unregister_input (grub_term_input_t term)
|
||||
{
|
||||
grub_handler_unregister (&grub_term_input_class, GRUB_AS_HANDLER (term));
|
||||
grub_list_remove (GRUB_AS_LIST_P (&grub_term_inputs), GRUB_AS_LIST (term));
|
||||
grub_list_remove (GRUB_AS_LIST_P (&grub_term_inputs_disabled),
|
||||
GRUB_AS_LIST (term));
|
||||
}
|
||||
|
||||
static inline void
|
||||
grub_term_unregister_output (grub_term_output_t term)
|
||||
{
|
||||
grub_handler_unregister (&grub_term_output_class, GRUB_AS_HANDLER (term));
|
||||
grub_list_remove (GRUB_AS_LIST_P (&grub_term_outputs), GRUB_AS_LIST (term));
|
||||
grub_list_remove (GRUB_AS_LIST_P (&(grub_term_outputs_disabled)),
|
||||
GRUB_AS_LIST (term));
|
||||
}
|
||||
|
||||
static inline grub_err_t
|
||||
grub_term_set_current_input (grub_term_input_t term)
|
||||
{
|
||||
return grub_handler_set_current (&grub_term_input_class,
|
||||
GRUB_AS_HANDLER (term));
|
||||
}
|
||||
|
||||
static inline grub_err_t
|
||||
grub_term_set_current_output (grub_term_output_t term)
|
||||
{
|
||||
return grub_handler_set_current (&grub_term_output_class,
|
||||
GRUB_AS_HANDLER (term));
|
||||
}
|
||||
|
||||
static inline grub_term_input_t
|
||||
grub_term_get_current_input (void)
|
||||
{
|
||||
return (grub_term_input_t) grub_term_input_class.cur_handler;
|
||||
}
|
||||
|
||||
static inline grub_term_output_t
|
||||
grub_term_get_current_output (void)
|
||||
{
|
||||
return (grub_term_output_t) grub_term_output_class.cur_handler;
|
||||
}
|
||||
#define FOR_ACTIVE_TERM_INPUTS(var) for (var = grub_term_inputs; var; var = var->next)
|
||||
#define FOR_DISABLED_TERM_INPUTS(var) for (var = grub_term_inputs_disabled; var; var = var->next)
|
||||
#define FOR_ACTIVE_TERM_OUTPUTS(var) for (var = grub_term_outputs; var; var = var->next)
|
||||
#define FOR_DISABLED_TERM_OUTPUTS(var) for (var = grub_term_outputs_disabled; var; var = var->next)
|
||||
|
||||
void EXPORT_FUNC(grub_putchar) (int c);
|
||||
void EXPORT_FUNC(grub_putcode) (grub_uint32_t code);
|
||||
grub_ssize_t EXPORT_FUNC(grub_getcharwidth) (grub_uint32_t code);
|
||||
void EXPORT_FUNC(grub_putcode) (grub_uint32_t code,
|
||||
struct grub_term_output *term);
|
||||
int EXPORT_FUNC(grub_getkey) (void);
|
||||
int EXPORT_FUNC(grub_checkkey) (void);
|
||||
int EXPORT_FUNC(grub_getkeystatus) (void);
|
||||
grub_uint16_t EXPORT_FUNC(grub_getwh) (void);
|
||||
grub_uint16_t EXPORT_FUNC(grub_getxy) (void);
|
||||
void EXPORT_FUNC(grub_gotoxy) (grub_uint8_t x, grub_uint8_t y);
|
||||
void EXPORT_FUNC(grub_cls) (void);
|
||||
void EXPORT_FUNC(grub_setcolorstate) (grub_term_color_state state);
|
||||
void EXPORT_FUNC(grub_setcolor) (grub_uint8_t normal_color,
|
||||
grub_uint8_t highlight_color);
|
||||
void EXPORT_FUNC(grub_getcolor) (grub_uint8_t *normal_color,
|
||||
grub_uint8_t *highlight_color);
|
||||
int EXPORT_FUNC(grub_setcursor) (int on);
|
||||
int EXPORT_FUNC(grub_getcursor) (void);
|
||||
void EXPORT_FUNC(grub_refresh) (void);
|
||||
void EXPORT_FUNC(grub_set_more) (int onoff);
|
||||
void grub_puts_terminal (const char *str, struct grub_term_output *term);
|
||||
grub_uint16_t *grub_term_save_pos (void);
|
||||
void grub_term_restore_pos (grub_uint16_t *pos);
|
||||
|
||||
static inline unsigned grub_term_width (struct grub_term_output *term)
|
||||
{
|
||||
return ((term->getwh()&0xFF00)>>8);
|
||||
}
|
||||
|
||||
static inline unsigned grub_term_height (struct grub_term_output *term)
|
||||
{
|
||||
return (term->getwh()&0xFF);
|
||||
}
|
||||
|
||||
/* The width of the border. */
|
||||
static inline unsigned
|
||||
grub_term_border_width (struct grub_term_output *term)
|
||||
{
|
||||
return grub_term_width (term) - GRUB_TERM_MARGIN * 3 - GRUB_TERM_SCROLL_WIDTH;
|
||||
}
|
||||
|
||||
/* The max column number of an entry. The last "-1" is for a
|
||||
continuation marker. */
|
||||
static inline int
|
||||
grub_term_entry_width (struct grub_term_output *term)
|
||||
{
|
||||
return grub_term_border_width (term) - 2 - GRUB_TERM_MARGIN * 2 - 1;
|
||||
}
|
||||
|
||||
/* The height of the border. */
|
||||
|
||||
static inline unsigned
|
||||
grub_term_border_height (struct grub_term_output *term)
|
||||
{
|
||||
return grub_term_height (term) - GRUB_TERM_TOP_BORDER_Y
|
||||
- GRUB_TERM_MESSAGE_HEIGHT;
|
||||
}
|
||||
|
||||
/* The number of entries shown at a time. */
|
||||
static inline int
|
||||
grub_term_num_entries (struct grub_term_output *term)
|
||||
{
|
||||
return grub_term_border_height (term) - 2;
|
||||
}
|
||||
|
||||
static inline int
|
||||
grub_term_cursor_x (struct grub_term_output *term)
|
||||
{
|
||||
return (GRUB_TERM_LEFT_BORDER_X + grub_term_border_width (term)
|
||||
- GRUB_TERM_MARGIN - 1);
|
||||
}
|
||||
|
||||
static inline grub_uint16_t
|
||||
grub_term_getxy (struct grub_term_output *term)
|
||||
{
|
||||
return term->getxy ();
|
||||
}
|
||||
|
||||
static inline void
|
||||
grub_print_spaces (int number_spaces)
|
||||
grub_term_refresh (struct grub_term_output *term)
|
||||
{
|
||||
if (term->refresh)
|
||||
term->refresh ();
|
||||
}
|
||||
|
||||
static inline void
|
||||
grub_term_gotoxy (struct grub_term_output *term, grub_uint8_t x, grub_uint8_t y)
|
||||
{
|
||||
term->gotoxy (x, y);
|
||||
}
|
||||
|
||||
static inline void
|
||||
grub_term_setcolorstate (struct grub_term_output *term,
|
||||
grub_term_color_state state)
|
||||
{
|
||||
if (term->setcolorstate)
|
||||
term->setcolorstate (state);
|
||||
}
|
||||
|
||||
/* Set the normal color and the highlight color. The format of each
|
||||
color is VGA's. */
|
||||
static inline void
|
||||
grub_term_setcolor (struct grub_term_output *term,
|
||||
grub_uint8_t normal_color, grub_uint8_t highlight_color)
|
||||
{
|
||||
if (term->setcolor)
|
||||
term->setcolor (normal_color, highlight_color);
|
||||
}
|
||||
|
||||
/* Turn on/off the cursor. */
|
||||
static inline void
|
||||
grub_term_setcursor (struct grub_term_output *term, int on)
|
||||
{
|
||||
if (term->setcursor)
|
||||
term->setcursor (on);
|
||||
}
|
||||
|
||||
static inline void
|
||||
grub_term_cls (struct grub_term_output *term)
|
||||
{
|
||||
if (term->cls)
|
||||
(term->cls) ();
|
||||
else
|
||||
{
|
||||
grub_putcode ('\n', term);
|
||||
grub_term_refresh (term);
|
||||
}
|
||||
}
|
||||
|
||||
static inline grub_ssize_t
|
||||
grub_term_getcharwidth (struct grub_term_output *term, grub_uint32_t c)
|
||||
{
|
||||
if (term->getcharwidth)
|
||||
return term->getcharwidth (c);
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline void
|
||||
grub_term_getcolor (struct grub_term_output *term,
|
||||
grub_uint8_t *normal_color, grub_uint8_t *highlight_color)
|
||||
{
|
||||
if (term->getcolor)
|
||||
term->getcolor (normal_color, highlight_color);
|
||||
else
|
||||
{
|
||||
*normal_color = 0x07;
|
||||
*highlight_color = 0x07;
|
||||
}
|
||||
}
|
||||
|
||||
extern void (*EXPORT_VAR (grub_newline_hook)) (void);
|
||||
|
||||
struct grub_term_autoload
|
||||
{
|
||||
struct grub_term_autoload *next;
|
||||
char *name;
|
||||
char *modname;
|
||||
};
|
||||
|
||||
extern struct grub_term_autoload *grub_term_input_autoload;
|
||||
extern struct grub_term_autoload *grub_term_output_autoload;
|
||||
|
||||
static inline void
|
||||
grub_print_spaces (struct grub_term_output *term, int number_spaces)
|
||||
{
|
||||
while (--number_spaces >= 0)
|
||||
grub_putchar (' ');
|
||||
grub_putcode (' ', term);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -21,15 +21,17 @@
|
|||
|
||||
#include <grub/err.h>
|
||||
#include <grub/types.h>
|
||||
#include <grub/term.h>
|
||||
|
||||
char *grub_terminfo_get_current (void);
|
||||
grub_err_t grub_terminfo_set_current (const char *);
|
||||
|
||||
void grub_terminfo_gotoxy (grub_uint8_t x, grub_uint8_t y);
|
||||
void grub_terminfo_cls (void);
|
||||
void grub_terminfo_reverse_video_on (void);
|
||||
void grub_terminfo_reverse_video_off (void);
|
||||
void grub_terminfo_cursor_on (void);
|
||||
void grub_terminfo_cursor_off (void);
|
||||
void grub_terminfo_gotoxy (grub_uint8_t x, grub_uint8_t y,
|
||||
grub_term_output_t oterm);
|
||||
void grub_terminfo_cls (grub_term_output_t oterm);
|
||||
void grub_terminfo_reverse_video_on (grub_term_output_t oterm);
|
||||
void grub_terminfo_reverse_video_off (grub_term_output_t oterm);
|
||||
void grub_terminfo_cursor_on (grub_term_output_t oterm);
|
||||
void grub_terminfo_cursor_off (grub_term_output_t oterm);
|
||||
|
||||
#endif /* ! GRUB_TERMINFO_HEADER */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue