aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memory.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-09-12 14:01:35 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-09-12 14:01:35 -0300
commit6a8932aa588b8631e66255fb24e2776acdd46c8e (patch)
tree2f8b63891e478fdc40fc37cf03b029ebbb7f51a5 /src/nvim/memory.c
parent042aca6eb4d0fe9e6ddf3bcfb96a39838b2633d1 (diff)
parent2a67b847aa2074f688fce9f96e060eeb5ba29435 (diff)
downloadrneovim-6a8932aa588b8631e66255fb24e2776acdd46c8e.tar.gz
rneovim-6a8932aa588b8631e66255fb24e2776acdd46c8e.tar.bz2
rneovim-6a8932aa588b8631e66255fb24e2776acdd46c8e.zip
Merge PR #1130 'Update to the experimental msgpack v5 branch'
Diffstat (limited to 'src/nvim/memory.c')
-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();
}
}