Mercurial > vim
comparison src/misc1.c @ 26877:06a137af96f8 v8.2.3967
patch 8.2.3967: error messages are spread out
Commit: https://github.com/vim/vim/commit/460ae5dfca31fa627531c263184849976755cf6b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 1 14:19:49 2022 +0000
patch 8.2.3967: 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 | Sat, 01 Jan 2022 15:30:05 +0100 |
parents | fc859aea8cec |
children | b34ddbca305c |
comparison
equal
deleted
inserted
replaced
26876:601a973ac16c | 26877:06a137af96f8 |
---|---|
1260 && mch_chdir((char *)NameBuff) == 0) | 1260 && mch_chdir((char *)NameBuff) == 0) |
1261 { | 1261 { |
1262 if (!mch_chdir((char *)var) && mch_dirname(IObuff, IOSIZE) == OK) | 1262 if (!mch_chdir((char *)var) && mch_dirname(IObuff, IOSIZE) == OK) |
1263 var = IObuff; | 1263 var = IObuff; |
1264 if (mch_chdir((char *)NameBuff) != 0) | 1264 if (mch_chdir((char *)NameBuff) != 0) |
1265 emsg(_(e_prev_dir)); | 1265 emsg(_(e_cannot_go_back_to_previous_directory)); |
1266 } | 1266 } |
1267 #endif | 1267 #endif |
1268 homedir = vim_strsave(var); | 1268 homedir = vim_strsave(var); |
1269 } | 1269 } |
1270 } | 1270 } |
2278 return NULL; | 2278 return NULL; |
2279 | 2279 |
2280 // get a name for the temp file | 2280 // get a name for the temp file |
2281 if ((tempname = vim_tempname('o', FALSE)) == NULL) | 2281 if ((tempname = vim_tempname('o', FALSE)) == NULL) |
2282 { | 2282 { |
2283 emsg(_(e_notmp)); | 2283 emsg(_(e_cant_get_temp_file_name)); |
2284 return NULL; | 2284 return NULL; |
2285 } | 2285 } |
2286 | 2286 |
2287 // Add the redirection stuff | 2287 // Add the redirection stuff |
2288 command = make_filter_cmd(cmd, infile, tempname); | 2288 command = make_filter_cmd(cmd, infile, tempname); |
2309 fd = mch_fopen((char *)tempname, READBIN); | 2309 fd = mch_fopen((char *)tempname, READBIN); |
2310 # endif | 2310 # endif |
2311 | 2311 |
2312 if (fd == NULL) | 2312 if (fd == NULL) |
2313 { | 2313 { |
2314 semsg(_(e_notopen), tempname); | 2314 semsg(_(e_cant_open_file_str), tempname); |
2315 goto done; | 2315 goto done; |
2316 } | 2316 } |
2317 | 2317 |
2318 fseek(fd, 0L, SEEK_END); | 2318 fseek(fd, 0L, SEEK_END); |
2319 len = ftell(fd); // get size of temp file | 2319 len = ftell(fd); // get size of temp file |
2329 #ifdef VMS | 2329 #ifdef VMS |
2330 len = i; // VMS doesn't give us what we asked for... | 2330 len = i; // VMS doesn't give us what we asked for... |
2331 #endif | 2331 #endif |
2332 if (i != len) | 2332 if (i != len) |
2333 { | 2333 { |
2334 semsg(_(e_notread), tempname); | 2334 semsg(_(e_cant_read_file_str), tempname); |
2335 VIM_CLEAR(buffer); | 2335 VIM_CLEAR(buffer); |
2336 } | 2336 } |
2337 else if (ret_len == NULL) | 2337 else if (ret_len == NULL) |
2338 { | 2338 { |
2339 // Change NUL into SOH, otherwise the string is truncated. | 2339 // Change NUL into SOH, otherwise the string is truncated. |
2383 * Write the text to a temp file, to be used for input of the shell | 2383 * Write the text to a temp file, to be used for input of the shell |
2384 * command. | 2384 * command. |
2385 */ | 2385 */ |
2386 if ((infile = vim_tempname('i', TRUE)) == NULL) | 2386 if ((infile = vim_tempname('i', TRUE)) == NULL) |
2387 { | 2387 { |
2388 emsg(_(e_notmp)); | 2388 emsg(_(e_cant_get_temp_file_name)); |
2389 goto errret; | 2389 goto errret; |
2390 } | 2390 } |
2391 | 2391 |
2392 fd = mch_fopen((char *)infile, WRITEBIN); | 2392 fd = mch_fopen((char *)infile, WRITEBIN); |
2393 if (fd == NULL) | 2393 if (fd == NULL) |
2394 { | 2394 { |
2395 semsg(_(e_notopen), infile); | 2395 semsg(_(e_cant_open_file_str), infile); |
2396 goto errret; | 2396 goto errret; |
2397 } | 2397 } |
2398 if (argvars[1].v_type == VAR_NUMBER) | 2398 if (argvars[1].v_type == VAR_NUMBER) |
2399 { | 2399 { |
2400 linenr_T lnum; | 2400 linenr_T lnum; |