Improve gettext support. Stylistic fixes and error handling fixes while
on it.
This commit is contained in:
parent
215c90cb82
commit
9c4b5c13e6
184 changed files with 1175 additions and 959 deletions
|
@ -23,6 +23,7 @@
|
|||
#include <grub/mm.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
void *
|
||||
grub_malloc (grub_size_t size)
|
||||
|
@ -30,7 +31,7 @@ grub_malloc (grub_size_t size)
|
|||
void *ret;
|
||||
ret = malloc (size);
|
||||
if (!ret)
|
||||
grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory");
|
||||
grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -58,7 +59,7 @@ grub_realloc (void *ptr, grub_size_t size)
|
|||
void *ret;
|
||||
ret = realloc (ptr, size);
|
||||
if (!ret)
|
||||
grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory");
|
||||
grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -77,11 +78,11 @@ grub_memalign (grub_size_t align, grub_size_t size)
|
|||
#else
|
||||
(void) align;
|
||||
(void) size;
|
||||
grub_util_error (_("grub_memalign is not supported"));
|
||||
grub_util_error (_("grub_memalign is not supported on your system"));
|
||||
#endif
|
||||
|
||||
if (!p)
|
||||
grub_error (GRUB_ERR_OUT_OF_MEMORY, "out of memory");
|
||||
grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));
|
||||
|
||||
return p;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue