Add const keyword to grub_env_get and gettextize week days.

* grub-core/hook/datehook.c (grub_datetime_names): Make const.
	(grub_read_hook_datetime): Return const char *.
	* grub-core/kern/env.c (grub_env_get): Return const char *. All users
	updated.
	* grub-core/normal/datetime.c (grub_weekday_names): Make const.
	Mark for gettext.
	(grub_get_weekday_name): Return const char *. Call gettext.
	* grub-core/script/argv.c (grub_script_argv_append): Receive const
	char * and len as the argument. All users updated.
	(grub_script_argv_split_append): Receive const char *.
	* include/grub/datetime.h (grub_get_weekday_name): Update proto.
	* include/grub/env.h (grub_env_get): Likewise.
	(grub_env_read_hook_t): Return const char *.
	* include/grub/script_sh.h (grub_script_argv_append): Update proto.
	(grub_script_argv_split_append): Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-11-11 20:34:37 +01:00
parent 9aed8a7178
commit d35d0d3753
20 changed files with 91 additions and 64 deletions

View file

@ -363,7 +363,7 @@ uninstall_int13_handler (void)
static int
grub_get_root_biosnumber_drivemap (void)
{
char *biosnum;
const char *biosnum;
int ret = -1;
grub_device_t dev;

View file

@ -344,7 +344,7 @@ grub_cmd_legacy_kernel (struct grub_command *mycmd __attribute__ ((unused)),
int bsd_part = -1;
{
grub_device_t dev;
char *hdbiasstr;
const char *hdbiasstr;
int hdbias = 0;
hdbiasstr = grub_env_get ("legacy_hdbias");
if (hdbiasstr)

View file

@ -43,7 +43,7 @@ open_envblk_file (char *filename)
if (! filename)
{
char *prefix;
const char *prefix;
prefix = grub_env_get ("prefix");
if (prefix)
@ -346,7 +346,7 @@ grub_cmd_save_env (grub_extcmd_context_t ctxt, int argc, char **args)
while (argc)
{
char *value;
const char *value;
value = grub_env_get (args[0]);
if (value)

View file

@ -436,7 +436,7 @@ wildcard_expand (const char *s, char ***strs)
else if (*start == '/') /* no device part */
{
char *root;
const char *root;
char *prefix;
root = grub_env_get ("root");