Improve gettext support. Stylistic fixes and error handling fixes while

on it.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-02-08 19:26:01 +01:00
parent 215c90cb82
commit 9c4b5c13e6
184 changed files with 1175 additions and 959 deletions

View file

@ -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;
}