comparison src/channel.c @ 18010:cf8e0c7e0cb9 v8.1.2001

patch 8.1.2001: some source files are too big Commit: https://github.com/vim/vim/commit/261f346f8154c0ec7094a4a211c653c74e9f7c2e Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 7 15:45:32 2019 +0200 patch 8.1.2001: some source files are too big Problem: Some source files are too big. Solution: Move buffer and window related functions to evalbuffer.c and evalwindow.c. (Yegappan Lakshmanan, closes #4898)
author Bram Moolenaar <Bram@vim.org>
date Sat, 07 Sep 2019 16:00:03 +0200
parents 9fb236d0f386
children a2870e6f5b45
comparison
equal deleted inserted replaced
18009:40255308856f 18010:cf8e0c7e0cb9
1034 /* 1034 /*
1035 * Find a buffer matching "name" or create a new one. 1035 * Find a buffer matching "name" or create a new one.
1036 * Returns NULL if there is something very wrong (error already reported). 1036 * Returns NULL if there is something very wrong (error already reported).
1037 */ 1037 */
1038 static buf_T * 1038 static buf_T *
1039 find_buffer(char_u *name, int err, int msg) 1039 channel_find_buffer(char_u *name, int err, int msg)
1040 { 1040 {
1041 buf_T *buf = NULL; 1041 buf_T *buf = NULL;
1042 buf_T *save_curbuf = curbuf; 1042 buf_T *save_curbuf = curbuf;
1043 1043
1044 if (name != NULL && *name != NUL) 1044 if (name != NULL && *name != NUL)
1124 { 1124 {
1125 int msg = TRUE; 1125 int msg = TRUE;
1126 1126
1127 if (opt->jo_set2 & JO2_OUT_MSG) 1127 if (opt->jo_set2 & JO2_OUT_MSG)
1128 msg = opt->jo_message[PART_OUT]; 1128 msg = opt->jo_message[PART_OUT];
1129 buf = find_buffer(opt->jo_io_name[PART_OUT], FALSE, msg); 1129 buf = channel_find_buffer(opt->jo_io_name[PART_OUT], FALSE, msg);
1130 } 1130 }
1131 if (buf != NULL) 1131 if (buf != NULL)
1132 { 1132 {
1133 if (opt->jo_set & JO_OUT_MODIFIABLE) 1133 if (opt->jo_set & JO_OUT_MODIFIABLE)
1134 channel->ch_part[PART_OUT].ch_nomodifiable = 1134 channel->ch_part[PART_OUT].ch_nomodifiable =
1171 { 1171 {
1172 int msg = TRUE; 1172 int msg = TRUE;
1173 1173
1174 if (opt->jo_set2 & JO2_ERR_MSG) 1174 if (opt->jo_set2 & JO2_ERR_MSG)
1175 msg = opt->jo_message[PART_ERR]; 1175 msg = opt->jo_message[PART_ERR];
1176 buf = find_buffer(opt->jo_io_name[PART_ERR], TRUE, msg); 1176 buf = channel_find_buffer(opt->jo_io_name[PART_ERR], TRUE, msg);
1177 } 1177 }
1178 if (buf != NULL) 1178 if (buf != NULL)
1179 { 1179 {
1180 if (opt->jo_set & JO_ERR_MODIFIABLE) 1180 if (opt->jo_set & JO_ERR_MODIFIABLE)
1181 channel->ch_part[PART_ERR].ch_nomodifiable = 1181 channel->ch_part[PART_ERR].ch_nomodifiable =