Mercurial > vim
comparison src/job.c @ 28769:78fc778de076 v8.2.4909
patch 8.2.4909: MODE_ enum entries names are too generic
Commit: https://github.com/vim/vim/commit/ac4174e166dd76c72907caa76db0e7cd878ac667
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 7 16:38:24 2022 +0100
patch 8.2.4909: MODE_ enum entries names are too generic
Problem: MODE_ enum entries names are too generic.
Solution: use CH_MODE_.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 07 May 2022 17:45:02 +0200 |
parents | 85b07a942518 |
children | d0241e74bfdb |
comparison
equal
deleted
inserted
replaced
28768:c8ffba1b1c9c | 28769:78fc778de076 |
---|---|
22 { | 22 { |
23 char_u *val = tv_get_string(item); | 23 char_u *val = tv_get_string(item); |
24 | 24 |
25 opt->jo_set |= jo; | 25 opt->jo_set |= jo; |
26 if (STRCMP(val, "nl") == 0) | 26 if (STRCMP(val, "nl") == 0) |
27 *modep = MODE_NL; | 27 *modep = CH_MODE_NL; |
28 else if (STRCMP(val, "raw") == 0) | 28 else if (STRCMP(val, "raw") == 0) |
29 *modep = MODE_RAW; | 29 *modep = CH_MODE_RAW; |
30 else if (STRCMP(val, "js") == 0) | 30 else if (STRCMP(val, "js") == 0) |
31 *modep = MODE_JS; | 31 *modep = CH_MODE_JS; |
32 else if (STRCMP(val, "json") == 0) | 32 else if (STRCMP(val, "json") == 0) |
33 *modep = MODE_JSON; | 33 *modep = CH_MODE_JSON; |
34 else if (STRCMP(val, "lsp") == 0) | 34 else if (STRCMP(val, "lsp") == 0) |
35 *modep = MODE_LSP; | 35 *modep = CH_MODE_LSP; |
36 else | 36 else |
37 { | 37 { |
38 semsg(_(e_invalid_argument_str), val); | 38 semsg(_(e_invalid_argument_str), val); |
39 return FAIL; | 39 return FAIL; |
40 } | 40 } |
1305 opt = *opt_arg; | 1305 opt = *opt_arg; |
1306 else | 1306 else |
1307 { | 1307 { |
1308 // Default mode is NL. | 1308 // Default mode is NL. |
1309 clear_job_options(&opt); | 1309 clear_job_options(&opt); |
1310 opt.jo_mode = MODE_NL; | 1310 opt.jo_mode = CH_MODE_NL; |
1311 if (get_job_options(&argvars[1], &opt, | 1311 if (get_job_options(&argvars[1], &opt, |
1312 JO_MODE_ALL + JO_CB_ALL + JO_TIMEOUT_ALL + JO_STOPONEXIT | 1312 JO_MODE_ALL + JO_CB_ALL + JO_TIMEOUT_ALL + JO_STOPONEXIT |
1313 + JO_EXIT_CB + JO_OUT_IO + JO_BLOCK_WRITE, | 1313 + JO_EXIT_CB + JO_OUT_IO + JO_BLOCK_WRITE, |
1314 JO2_ENV + JO2_CWD) == FAIL) | 1314 JO2_ENV + JO2_CWD) == FAIL) |
1315 goto theend; | 1315 goto theend; |