Merge multiterm into gfxmenu+multiterm
This commit is contained in:
commit
e6e86df1de
238 changed files with 3524 additions and 1873 deletions
|
@ -58,12 +58,12 @@ grub_video_bitmap_create (struct grub_video_bitmap **bitmap,
|
|||
unsigned int size;
|
||||
|
||||
if (!bitmap)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Invalid argument.");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid argument");
|
||||
|
||||
*bitmap = 0;
|
||||
|
||||
if (width == 0 || height == 0)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Invalid argument.");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid argument");
|
||||
|
||||
*bitmap = (struct grub_video_bitmap *)grub_malloc (sizeof (struct grub_video_bitmap));
|
||||
if (! *bitmap)
|
||||
|
@ -129,7 +129,7 @@ grub_video_bitmap_create (struct grub_video_bitmap **bitmap,
|
|||
*bitmap = 0;
|
||||
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"Unsupported bitmap format");
|
||||
"unsupported bitmap format");
|
||||
}
|
||||
|
||||
mode_info->pitch = width * mode_info->bytes_per_pixel;
|
||||
|
@ -188,7 +188,7 @@ grub_video_bitmap_load (struct grub_video_bitmap **bitmap,
|
|||
grub_video_bitmap_reader_t reader = bitmap_readers_list;
|
||||
|
||||
if (!bitmap)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Invalid argument.");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid argument");
|
||||
|
||||
*bitmap = 0;
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ grub_video_gop_fill_mode_info (struct grub_efi_gop_mode_info *in,
|
|||
out->bpp = grub_video_gop_get_bpp (in);
|
||||
out->bytes_per_pixel = out->bpp >> 3;
|
||||
if (!out->bpp)
|
||||
return grub_error (GRUB_ERR_IO, "Unsupported video mode");
|
||||
return grub_error (GRUB_ERR_IO, "unsupported video mode");
|
||||
out->pitch = in->pixels_per_scanline * out->bytes_per_pixel;
|
||||
|
||||
switch (in->pixel_format)
|
||||
|
@ -176,7 +176,7 @@ grub_video_gop_fill_mode_info (struct grub_efi_gop_mode_info *in,
|
|||
break;
|
||||
|
||||
default:
|
||||
return grub_error (GRUB_ERR_IO, "Unsupported video mode");
|
||||
return grub_error (GRUB_ERR_IO, "unsupported video mode");
|
||||
}
|
||||
|
||||
out->blit_format = grub_video_get_blit_format (out);
|
||||
|
@ -266,7 +266,7 @@ grub_video_gop_setup (unsigned int width, unsigned int height,
|
|||
if (!found)
|
||||
{
|
||||
grub_dprintf ("video", "GOP: no mode found\n");
|
||||
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no matching mode found.");
|
||||
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no matching mode found");
|
||||
}
|
||||
|
||||
if (best_mode != gop->mode->mode)
|
||||
|
|
|
@ -266,7 +266,7 @@ grub_video_uga_setup (unsigned int width, unsigned int height,
|
|||
return err;
|
||||
}
|
||||
|
||||
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no matching mode found.");
|
||||
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no matching mode found");
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
|
|
|
@ -1050,7 +1050,7 @@ grub_video_fb_create_render_target (struct grub_video_fbrender_target **result,
|
|||
|| (width == 0)
|
||||
|| (height == 0))
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"invalid argument given.");
|
||||
"invalid argument given");
|
||||
|
||||
/* Allocate memory for render target. */
|
||||
target = grub_malloc (sizeof (struct grub_video_fbrender_target));
|
||||
|
@ -1170,7 +1170,7 @@ grub_video_fb_set_active_render_target (struct grub_video_fbrender_target *targe
|
|||
{
|
||||
if (! target->data)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"invalid render target given.");
|
||||
"invalid render target given");
|
||||
|
||||
render_target = target;
|
||||
|
||||
|
|
|
@ -700,7 +700,7 @@ grub_video_vbe_setup (unsigned int width, unsigned int height,
|
|||
}
|
||||
|
||||
/* Couldn't found matching mode. */
|
||||
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no matching mode found.");
|
||||
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no matching mode found");
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
|
|
|
@ -54,6 +54,10 @@ static const grub_uint8_t jpeg_zigzag_order[64] = {
|
|||
53, 60, 61, 54, 47, 55, 62, 63
|
||||
};
|
||||
|
||||
#ifdef JPEG_DEBUG
|
||||
static grub_command_t cmd;
|
||||
#endif
|
||||
|
||||
typedef int jpeg_data_unit_t[64];
|
||||
|
||||
struct grub_jpeg_data
|
||||
|
@ -695,8 +699,8 @@ grub_video_reader_jpeg (struct grub_video_bitmap **bitmap,
|
|||
|
||||
#if defined(JPEG_DEBUG)
|
||||
static grub_err_t
|
||||
grub_cmd_jpegtest (struct grub_arg_list *state __attribute__ ((unused)),
|
||||
int argc, char **args)
|
||||
grub_cmd_jpegtest (grub_command_t cmd __attribute__ ((unused)),
|
||||
int argc, char **args)
|
||||
{
|
||||
struct grub_video_bitmap *bitmap = 0;
|
||||
|
||||
|
@ -730,16 +734,16 @@ GRUB_MOD_INIT (video_reader_jpeg)
|
|||
grub_video_bitmap_reader_register (&jpg_reader);
|
||||
grub_video_bitmap_reader_register (&jpeg_reader);
|
||||
#if defined(JPEG_DEBUG)
|
||||
grub_register_command ("jpegtest", grub_cmd_jpegtest,
|
||||
GRUB_COMMAND_FLAG_BOTH, "jpegtest FILE",
|
||||
"Tests loading of JPEG bitmap.", 0);
|
||||
cmd = grub_register_command ("jpegtest", grub_cmd_jpegtest,
|
||||
"FILE",
|
||||
"Tests loading of JPEG bitmap.");
|
||||
#endif
|
||||
}
|
||||
|
||||
GRUB_MOD_FINI (video_reader_jpeg)
|
||||
{
|
||||
#if defined(JPEG_DEBUG)
|
||||
grub_unregister_command ("jpegtest");
|
||||
grub_unregister_command (cmd);
|
||||
#endif
|
||||
grub_video_bitmap_reader_unregister (&jpeg_reader);
|
||||
grub_video_bitmap_reader_unregister (&jpg_reader);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2008,2009 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
|
||||
|
@ -73,6 +73,10 @@
|
|||
|
||||
#define DEFLATE_HUFF_LEN 16
|
||||
|
||||
#ifdef PNG_DEBUG
|
||||
static grub_command_t cmd;
|
||||
#endif
|
||||
|
||||
struct huff_table
|
||||
{
|
||||
int *values, *maxval, *offset;
|
||||
|
@ -866,7 +870,7 @@ grub_video_reader_png (struct grub_video_bitmap **bitmap,
|
|||
|
||||
#if defined(PNG_DEBUG)
|
||||
static grub_err_t
|
||||
grub_cmd_pngtest (struct grub_arg_list *state __attribute__ ((unused)),
|
||||
grub_cmd_pngtest (grub_command_t cmd __attribute__ ((unused)),
|
||||
int argc, char **args)
|
||||
{
|
||||
struct grub_video_bitmap *bitmap = 0;
|
||||
|
@ -894,16 +898,16 @@ GRUB_MOD_INIT (video_reader_png)
|
|||
{
|
||||
grub_video_bitmap_reader_register (&png_reader);
|
||||
#if defined(PNG_DEBUG)
|
||||
grub_register_command ("pngtest", grub_cmd_pngtest,
|
||||
GRUB_COMMAND_FLAG_BOTH, "pngtest FILE",
|
||||
"Tests loading of PNG bitmap.", 0);
|
||||
cmd = grub_register_command ("pngtest", grub_cmd_pngtest,
|
||||
"FILE",
|
||||
"Tests loading of PNG bitmap.");
|
||||
#endif
|
||||
}
|
||||
|
||||
GRUB_MOD_FINI (video_reader_png)
|
||||
{
|
||||
#if defined(PNG_DEBUG)
|
||||
grub_unregister_command ("pngtest");
|
||||
grub_unregister_command (cmd);
|
||||
#endif
|
||||
grub_video_bitmap_reader_unregister (&png_reader);
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#if defined(TGA_DEBUG)
|
||||
#define dump_int_field(x) grub_printf( #x " = %d (0x%04x)\n", x, x);
|
||||
static grub_command_t cmd;
|
||||
#endif
|
||||
|
||||
enum
|
||||
|
@ -370,7 +371,7 @@ grub_video_reader_tga (struct grub_video_bitmap **bitmap,
|
|||
default:
|
||||
grub_file_close (file);
|
||||
return grub_error (GRUB_ERR_BAD_FILE_TYPE,
|
||||
"Unsupported bitmap format (unknown encoding).");
|
||||
"unsupported bitmap format (unknown encoding)");
|
||||
}
|
||||
|
||||
/* Check that bitmap depth is supported. */
|
||||
|
@ -387,7 +388,7 @@ grub_video_reader_tga (struct grub_video_bitmap **bitmap,
|
|||
default:
|
||||
grub_file_close (file);
|
||||
return grub_error (GRUB_ERR_BAD_FILE_TYPE,
|
||||
"Unsupported bitmap format (bpp=%d).",
|
||||
"unsupported bitmap format (bpp=%d)",
|
||||
header.image_bpp);
|
||||
}
|
||||
|
||||
|
@ -452,7 +453,7 @@ grub_video_reader_tga (struct grub_video_bitmap **bitmap,
|
|||
|
||||
#if defined(TGA_DEBUG)
|
||||
static grub_err_t
|
||||
grub_cmd_tgatest (struct grub_arg_list *state __attribute__ ((unused)),
|
||||
grub_cmd_tgatest (grub_command_t cmd __attribute__ ((unused)),
|
||||
int argc, char **args)
|
||||
{
|
||||
struct grub_video_bitmap *bitmap = 0;
|
||||
|
@ -480,15 +481,15 @@ GRUB_MOD_INIT(video_reader_tga)
|
|||
{
|
||||
grub_video_bitmap_reader_register (&tga_reader);
|
||||
#if defined(TGA_DEBUG)
|
||||
grub_register_command ("tgatest", grub_cmd_tgatest, GRUB_COMMAND_FLAG_BOTH,
|
||||
"tgatest FILE", "Tests loading of TGA bitmap.", 0);
|
||||
cmd = grub_register_command ("tgatest", grub_cmd_tgatest,
|
||||
"FILE", "Tests loading of TGA bitmap.");
|
||||
#endif
|
||||
}
|
||||
|
||||
GRUB_MOD_FINI(video_reader_tga)
|
||||
{
|
||||
#if defined(TGA_DEBUG)
|
||||
grub_unregister_command ("tgatest");
|
||||
grub_unregister_command (cmd);
|
||||
#endif
|
||||
grub_video_bitmap_reader_unregister (&tga_reader);
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ grub_err_t
|
|||
grub_video_get_info (struct grub_video_mode_info *mode_info)
|
||||
{
|
||||
if (! grub_video_adapter_active)
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
|
||||
|
||||
/* If mode_info is NULL just report that video adapter is active. */
|
||||
if (! mode_info)
|
||||
|
@ -101,7 +101,7 @@ grub_video_get_info_and_fini (struct grub_video_mode_info *mode_info,
|
|||
grub_err_t err;
|
||||
|
||||
if (! grub_video_adapter_active)
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
|
||||
|
||||
err = grub_video_adapter_active->get_info_and_fini (mode_info, framebuffer);
|
||||
if (err)
|
||||
|
@ -209,7 +209,7 @@ grub_video_set_palette (unsigned int start, unsigned int count,
|
|||
struct grub_video_palette_data *palette_data)
|
||||
{
|
||||
if (! grub_video_adapter_active)
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
|
||||
|
||||
return grub_video_adapter_active->set_palette (start, count, palette_data);
|
||||
}
|
||||
|
@ -220,7 +220,7 @@ grub_video_get_palette (unsigned int start, unsigned int count,
|
|||
struct grub_video_palette_data *palette_data)
|
||||
{
|
||||
if (! grub_video_adapter_active)
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
|
||||
|
||||
return grub_video_adapter_active->get_palette (start, count, palette_data);
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ grub_video_set_viewport (unsigned int x, unsigned int y,
|
|||
unsigned int width, unsigned int height)
|
||||
{
|
||||
if (! grub_video_adapter_active)
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
|
||||
|
||||
return grub_video_adapter_active->set_viewport (x, y, width, height);
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ grub_video_get_viewport (unsigned int *x, unsigned int *y,
|
|||
unsigned int *width, unsigned int *height)
|
||||
{
|
||||
if (! grub_video_adapter_active)
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
|
||||
|
||||
return grub_video_adapter_active->get_viewport (x, y, width, height);
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ grub_video_unmap_color (grub_video_color_t color, grub_uint8_t *red,
|
|||
grub_uint8_t *alpha)
|
||||
{
|
||||
if (! grub_video_adapter_active)
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
|
||||
|
||||
return grub_video_adapter_active->unmap_color (color,
|
||||
red,
|
||||
|
@ -300,7 +300,7 @@ grub_video_fill_rect (grub_video_color_t color, int x, int y,
|
|||
unsigned int width, unsigned int height)
|
||||
{
|
||||
if (! grub_video_adapter_active)
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
|
||||
|
||||
return grub_video_adapter_active->fill_rect (color, x, y, width, height);
|
||||
}
|
||||
|
@ -313,7 +313,7 @@ grub_video_blit_bitmap (struct grub_video_bitmap *bitmap,
|
|||
unsigned int width, unsigned int height)
|
||||
{
|
||||
if (! grub_video_adapter_active)
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
|
||||
|
||||
return grub_video_adapter_active->blit_bitmap (bitmap, oper, x, y,
|
||||
offset_x, offset_y,
|
||||
|
@ -328,7 +328,7 @@ grub_video_blit_render_target (struct grub_video_render_target *target,
|
|||
unsigned int width, unsigned int height)
|
||||
{
|
||||
if (! grub_video_adapter_active)
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
|
||||
|
||||
return grub_video_adapter_active->blit_render_target (target, oper, x, y,
|
||||
offset_x, offset_y,
|
||||
|
@ -340,7 +340,7 @@ grub_err_t
|
|||
grub_video_scroll (grub_video_color_t color, int dx, int dy)
|
||||
{
|
||||
if (! grub_video_adapter_active)
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
|
||||
|
||||
return grub_video_adapter_active->scroll (color, dx, dy);
|
||||
}
|
||||
|
@ -350,7 +350,7 @@ grub_err_t
|
|||
grub_video_swap_buffers (void)
|
||||
{
|
||||
if (! grub_video_adapter_active)
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
|
||||
|
||||
return grub_video_adapter_active->swap_buffers ();
|
||||
}
|
||||
|
@ -362,7 +362,7 @@ grub_video_create_render_target (struct grub_video_render_target **result,
|
|||
unsigned int mode_type)
|
||||
{
|
||||
if (! grub_video_adapter_active)
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
|
||||
|
||||
return grub_video_adapter_active->create_render_target (result,
|
||||
width, height,
|
||||
|
@ -374,7 +374,7 @@ grub_err_t
|
|||
grub_video_delete_render_target (struct grub_video_render_target *target)
|
||||
{
|
||||
if (! grub_video_adapter_active)
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
|
||||
|
||||
return grub_video_adapter_active->delete_render_target (target);
|
||||
}
|
||||
|
@ -384,7 +384,7 @@ grub_err_t
|
|||
grub_video_set_active_render_target (struct grub_video_render_target *target)
|
||||
{
|
||||
if (! grub_video_adapter_active)
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
|
||||
|
||||
return grub_video_adapter_active->set_active_render_target (target);
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ grub_err_t
|
|||
grub_video_get_active_render_target (struct grub_video_render_target **target)
|
||||
{
|
||||
if (! grub_video_adapter_active)
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
|
||||
return grub_error (GRUB_ERR_BAD_DEVICE, "no video mode activated");
|
||||
|
||||
return grub_video_adapter_active->get_active_render_target (target);
|
||||
}
|
||||
|
@ -520,7 +520,7 @@ grub_video_set_mode (const char *modestring,
|
|||
grub_free (modevar);
|
||||
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"No suitable mode found.");
|
||||
"no suitable mode found");
|
||||
}
|
||||
|
||||
/* Skip separator. */
|
||||
|
@ -684,7 +684,7 @@ grub_video_set_mode (const char *modestring,
|
|||
grub_free (modevar);
|
||||
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"No suitable mode found.");
|
||||
"no suitable mode found");
|
||||
}
|
||||
|
||||
/* Initialize Video API module. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue