aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-09-03 18:35:38 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-09-12 13:25:28 -0300
commit41a48a3fc7d6f170d0c5ed852f1bf98ea3a89f27 (patch)
treebf7dc465b6d2bfed356f2dfe0c43fa32b7826822 /src
parentd5e3cede28858dfe079b782cfea4bce6ebc268c0 (diff)
downloadrneovim-41a48a3fc7d6f170d0c5ed852f1bf98ea3a89f27.tar.gz
rneovim-41a48a3fc7d6f170d0c5ed852f1bf98ea3a89f27.tar.bz2
rneovim-41a48a3fc7d6f170d0c5ed852f1bf98ea3a89f27.zip
memory: Use i18n messages for memory-related errors
Diffstat (limited to 'src')
-rw-r--r--src/nvim/memory.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/nvim/memory.c b/src/nvim/memory.c
index 50dcca3c84..1c3d6e372c 100644
--- a/src/nvim/memory.c
+++ b/src/nvim/memory.c
@@ -121,7 +121,8 @@ void *xmalloc(size_t size)
void *ret = try_malloc(size);
if (!ret) {
- OUT_STR("Vim: Error: Out of memory.\n");
+ OUT_STR(e_outofmem);
+ out_char('\n');
preserve_exit();
}
return ret;
@@ -147,7 +148,8 @@ void *xcalloc(size_t count, size_t size)
if (!ret && (!count || !size))
ret = calloc(1, 1);
if (!ret) {
- OUT_STR("Vim: Error: Out of memory.\n");
+ OUT_STR(e_outofmem);
+ out_char('\n');
preserve_exit();
}
}
@@ -174,7 +176,8 @@ void *xrealloc(void *ptr, size_t size)
if (!ret && !size)
ret = realloc(ptr, 1);
if (!ret) {
- OUT_STR("Vim: Error: Out of memory.\n");
+ OUT_STR(e_outofmem);
+ out_char('\n');
preserve_exit();
}
}
@@ -194,7 +197,7 @@ void *xmallocz(size_t size)
void *ret;
if (total_size < size) {
- OUT_STR("Vim: Data too large to fit into virtual memory space\n");
+ OUT_STR(_("Vim: Data too large to fit into virtual memory space\n"));
preserve_exit();
}
@@ -316,7 +319,8 @@ char *xstrdup(const char *str)
try_to_free_memory();
ret = strdup(str);
if (!ret) {
- OUT_STR("Vim: Error: Out of memory.\n");
+ OUT_STR(e_outofmem);
+ out_char('\n');
preserve_exit();
}
}