Lines Matching refs:opt

146 ch_logfile(char_u *fname, char_u *opt)  in ch_logfile()  argument
161 file = fopen((char *)fname, *opt == 'w' ? "w" : "a"); in ch_logfile()
1165 channel_set_options(channel_T *channel, jobopt_T *opt) in channel_set_options() argument
1169 if (opt->jo_set & JO_MODE) in channel_set_options()
1171 channel->ch_part[part].ch_mode = opt->jo_mode; in channel_set_options()
1172 if (opt->jo_set & JO_IN_MODE) in channel_set_options()
1173 channel->ch_part[PART_IN].ch_mode = opt->jo_in_mode; in channel_set_options()
1174 if (opt->jo_set & JO_OUT_MODE) in channel_set_options()
1175 channel->ch_part[PART_OUT].ch_mode = opt->jo_out_mode; in channel_set_options()
1176 if (opt->jo_set & JO_ERR_MODE) in channel_set_options()
1177 channel->ch_part[PART_ERR].ch_mode = opt->jo_err_mode; in channel_set_options()
1178 channel->ch_nonblock = opt->jo_noblock; in channel_set_options()
1180 if (opt->jo_set & JO_TIMEOUT) in channel_set_options()
1182 channel->ch_part[part].ch_timeout = opt->jo_timeout; in channel_set_options()
1183 if (opt->jo_set & JO_OUT_TIMEOUT) in channel_set_options()
1184 channel->ch_part[PART_OUT].ch_timeout = opt->jo_out_timeout; in channel_set_options()
1185 if (opt->jo_set & JO_ERR_TIMEOUT) in channel_set_options()
1186 channel->ch_part[PART_ERR].ch_timeout = opt->jo_err_timeout; in channel_set_options()
1187 if (opt->jo_set & JO_BLOCK_WRITE) in channel_set_options()
1190 if (opt->jo_set & JO_CALLBACK) in channel_set_options()
1191 free_set_callback(&channel->ch_callback, &opt->jo_callback); in channel_set_options()
1192 if (opt->jo_set & JO_OUT_CALLBACK) in channel_set_options()
1194 &opt->jo_out_cb); in channel_set_options()
1195 if (opt->jo_set & JO_ERR_CALLBACK) in channel_set_options()
1197 &opt->jo_err_cb); in channel_set_options()
1198 if (opt->jo_set & JO_CLOSE_CALLBACK) in channel_set_options()
1199 free_set_callback(&channel->ch_close_cb, &opt->jo_close_cb); in channel_set_options()
1200 channel->ch_drop_never = opt->jo_drop_never; in channel_set_options()
1202 if ((opt->jo_set & JO_OUT_IO) && opt->jo_io[PART_OUT] == JIO_BUFFER) in channel_set_options()
1207 if (!(opt->jo_set & JO_OUT_MODE)) in channel_set_options()
1209 if (opt->jo_set & JO_OUT_BUF) in channel_set_options()
1211 buf = buflist_findnr(opt->jo_io_buf[PART_OUT]); in channel_set_options()
1213 semsg(_(e_nobufnr), (long)opt->jo_io_buf[PART_OUT]); in channel_set_options()
1219 if (opt->jo_set2 & JO2_OUT_MSG) in channel_set_options()
1220 msg = opt->jo_message[PART_OUT]; in channel_set_options()
1221 buf = channel_find_buffer(opt->jo_io_name[PART_OUT], FALSE, msg); in channel_set_options()
1225 if (opt->jo_set & JO_OUT_MODIFIABLE) in channel_set_options()
1227 !opt->jo_modifiable[PART_OUT]; in channel_set_options()
1245 if ((opt->jo_set & JO_ERR_IO) && (opt->jo_io[PART_ERR] == JIO_BUFFER in channel_set_options()
1246 || (opt->jo_io[PART_ERR] == JIO_OUT && (opt->jo_set & JO_OUT_IO) in channel_set_options()
1247 && opt->jo_io[PART_OUT] == JIO_BUFFER))) in channel_set_options()
1252 if (!(opt->jo_set & JO_ERR_MODE)) in channel_set_options()
1254 if (opt->jo_io[PART_ERR] == JIO_OUT) in channel_set_options()
1256 else if (opt->jo_set & JO_ERR_BUF) in channel_set_options()
1258 buf = buflist_findnr(opt->jo_io_buf[PART_ERR]); in channel_set_options()
1260 semsg(_(e_nobufnr), (long)opt->jo_io_buf[PART_ERR]); in channel_set_options()
1266 if (opt->jo_set2 & JO2_ERR_MSG) in channel_set_options()
1267 msg = opt->jo_message[PART_ERR]; in channel_set_options()
1268 buf = channel_find_buffer(opt->jo_io_name[PART_ERR], TRUE, msg); in channel_set_options()
1272 if (opt->jo_set & JO_ERR_MODIFIABLE) in channel_set_options()
1274 !opt->jo_modifiable[PART_ERR]; in channel_set_options()
1291 channel->ch_part[PART_OUT].ch_io = opt->jo_io[PART_OUT]; in channel_set_options()
1292 channel->ch_part[PART_ERR].ch_io = opt->jo_io[PART_ERR]; in channel_set_options()
1293 channel->ch_part[PART_IN].ch_io = opt->jo_io[PART_IN]; in channel_set_options()
1307 jobopt_T opt; in channel_open_func() local
1360 clear_job_options(&opt); in channel_open_func()
1361 opt.jo_mode = MODE_JSON; in channel_open_func()
1362 opt.jo_timeout = 2000; in channel_open_func()
1363 if (get_job_options(&argvars[1], &opt, in channel_open_func()
1366 if (opt.jo_timeout < 0) in channel_open_func()
1372 channel = channel_open((char *)address, port, opt.jo_waittime, NULL); in channel_open_func()
1375 opt.jo_set = JO_ALL; in channel_open_func()
1376 channel_set_options(channel, &opt); in channel_open_func()
1379 free_job_options(&opt); in channel_open_func()
3854 jobopt_T opt; in common_channel_read() local
3869 clear_job_options(&opt); in common_channel_read()
3870 if (get_job_options(&argvars[1], &opt, JO_TIMEOUT + JO_PART + JO_ID, 0) in common_channel_read()
3874 if (opt.jo_set & JO_PART) in common_channel_read()
3875 part = opt.jo_part; in common_channel_read()
3883 if (opt.jo_set & JO_TIMEOUT) in common_channel_read()
3884 timeout = opt.jo_timeout; in common_channel_read()
3914 if (opt.jo_set & JO_ID) in common_channel_read()
3915 id = opt.jo_id; in common_channel_read()
3931 free_job_options(&opt); in common_channel_read()
4218 jobopt_T *opt, in send_common() argument
4225 clear_job_options(opt); in send_common()
4232 if (get_job_options(&argvars[2], opt, JO_CALLBACK + JO_TIMEOUT, 0) == FAIL) in send_common()
4238 if (opt->jo_callback.cb_name != NULL && *opt->jo_callback.cb_name != NUL) in send_common()
4245 channel_set_req_callback(channel, *part_read, &opt->jo_callback, id); in send_common()
4249 && opt->jo_callback.cb_name == NULL) in send_common()
4267 jobopt_T opt; in ch_expr_common() local
4297 channel = send_common(argvars, text, (int)STRLEN(text), id, eval, &opt, in ch_expr_common()
4302 if (opt.jo_set & JO_TIMEOUT) in ch_expr_common()
4303 timeout = opt.jo_timeout; in ch_expr_common()
4318 free_job_options(&opt); in ch_expr_common()
4332 jobopt_T opt; in ch_raw_common() local
4355 channel = send_common(argvars, text, len, 0, eval, &opt, in ch_raw_common()
4359 if (opt.jo_set & JO_TIMEOUT) in ch_raw_common()
4360 timeout = opt.jo_timeout; in ch_raw_common()
4366 free_job_options(&opt); in ch_raw_common()
4936 char_u *opt = (char_u *)""; in f_ch_logfile() local
4950 opt = tv_get_string_buf(&argvars[1], buf); in f_ch_logfile()
4951 ch_logfile(fname, opt); in f_ch_logfile()
5036 jobopt_T opt; in f_ch_setoptions() local
5046 clear_job_options(&opt); in f_ch_setoptions()
5047 if (get_job_options(&argvars[1], &opt, in f_ch_setoptions()
5049 channel_set_options(channel, &opt); in f_ch_setoptions()
5050 free_job_options(&opt); in f_ch_setoptions()
5060 jobopt_T opt; in f_ch_status() local
5076 clear_job_options(&opt); in f_ch_status()
5077 if (get_job_options(&argvars[1], &opt, JO_PART, 0) == OK in f_ch_status()
5078 && (opt.jo_set & JO_PART)) in f_ch_status()
5079 part = opt.jo_part; in f_ch_status()