comparison src/alloc.c @ 26863:6ee19c6ae8a2 v8.2.3960

patch 8.2.3960: error messages are spread out Commit: https://github.com/vim/vim/commit/f1474d801bbdb73406dd3d1f931f515f99e86dfa Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 31 19:59:55 2021 +0000 patch 8.2.3960: error messages are spread out Problem: Error messages are spread out. Solution: Move more errors to errors.h.
author Bram Moolenaar <Bram@vim.org>
date Fri, 31 Dec 2021 21:15:02 +0100
parents fc859aea8cec
children 268f6a3511df
comparison
equal deleted inserted replaced
26862:e91b94a101d1 26863:6ee19c6ae8a2
222 // Safety check for allocating zero bytes 222 // Safety check for allocating zero bytes
223 if (size == 0) 223 if (size == 0)
224 { 224 {
225 // Don't hide this message 225 // Don't hide this message
226 emsg_silent = 0; 226 emsg_silent = 0;
227 iemsg(_("E341: Internal error: lalloc(0, )")); 227 iemsg(_(e_internal_error_lalloc_zero));
228 return NULL; 228 return NULL;
229 } 229 }
230 230
231 #ifdef MEM_PROFILE 231 #ifdef MEM_PROFILE
232 mem_pre_alloc_l(&size); 232 mem_pre_alloc_l(&size);
337 337
338 // Must come first to avoid coming back here when printing the error 338 // Must come first to avoid coming back here when printing the error
339 // message fails, e.g. when setting v:errmsg. 339 // message fails, e.g. when setting v:errmsg.
340 did_outofmem_msg = TRUE; 340 did_outofmem_msg = TRUE;
341 341
342 semsg(_("E342: Out of memory! (allocating %lu bytes)"), (long_u)size); 342 semsg(_(e_out_of_memory_allocating_nr_bytes), (long_u)size);
343 343
344 if (starting == NO_SCREEN) 344 if (starting == NO_SCREEN)
345 // Not even finished with initializations and already out of 345 // Not even finished with initializations and already out of
346 // memory? Then nothing is going to work, exit. 346 // memory? Then nothing is going to work, exit.
347 mch_exit(123); 347 mch_exit(123);