comparison src/channel.c @ 14730:193471015e1a v8.1.0377

patch 8.1.0377: xdiff doesn't use the Vim memory allocation functions commit https://github.com/vim/vim/commit/42335f50bc6fac444a8af74c81df8369d722a6fb Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 13 15:33:43 2018 +0200 patch 8.1.0377: xdiff doesn't use the Vim memory allocation functions Problem: Xdiff doesn't use the Vim memory allocation functions. Solution: Change the xdl_ defines. Check for out-of-memory. Rename "ignored" to "vim_ignored".
author Christian Brabandt <cb@256bit.org>
date Thu, 13 Sep 2018 15:45:05 +0200
parents 71c17b688bc6
children cb07193c6257
comparison
equal deleted inserted replaced
14729:7cb784c3b08f 14730:193471015e1a
1856 1856
1857 if (ch_log_active() && lead != NULL) 1857 if (ch_log_active() && lead != NULL)
1858 { 1858 {
1859 ch_log_lead(lead, channel, part); 1859 ch_log_lead(lead, channel, part);
1860 fprintf(log_fd, "'"); 1860 fprintf(log_fd, "'");
1861 ignored = (int)fwrite(buf, len, 1, log_fd); 1861 vim_ignored = (int)fwrite(buf, len, 1, log_fd);
1862 fprintf(log_fd, "'\n"); 1862 fprintf(log_fd, "'\n");
1863 } 1863 }
1864 return OK; 1864 return OK;
1865 } 1865 }
1866 1866
2386 /* Save curbuf/curwin/curtab and make "buffer" the current buffer. */ 2386 /* Save curbuf/curwin/curtab and make "buffer" the current buffer. */
2387 switch_to_win_for_buf(buffer, &save_curwin, &save_curtab, &save_curbuf); 2387 switch_to_win_for_buf(buffer, &save_curwin, &save_curtab, &save_curbuf);
2388 2388
2389 u_sync(TRUE); 2389 u_sync(TRUE);
2390 /* ignore undo failure, undo is not very useful here */ 2390 /* ignore undo failure, undo is not very useful here */
2391 ignored = u_save(lnum - empty, lnum + 1); 2391 vim_ignored = u_save(lnum - empty, lnum + 1);
2392 2392
2393 if (empty) 2393 if (empty)
2394 { 2394 {
2395 /* The buffer is empty, replace the first (dummy) line. */ 2395 /* The buffer is empty, replace the first (dummy) line. */
2396 ml_replace(lnum, msg, TRUE); 2396 ml_replace(lnum, msg, TRUE);
3728 3728
3729 if (ch_log_active()) 3729 if (ch_log_active())
3730 { 3730 {
3731 ch_log_lead("SEND ", channel, part); 3731 ch_log_lead("SEND ", channel, part);
3732 fprintf(log_fd, "'"); 3732 fprintf(log_fd, "'");
3733 ignored = (int)fwrite(buf_arg, len_arg, 1, log_fd); 3733 vim_ignored = (int)fwrite(buf_arg, len_arg, 1, log_fd);
3734 fprintf(log_fd, "'\n"); 3734 fprintf(log_fd, "'\n");
3735 fflush(log_fd); 3735 fflush(log_fd);
3736 did_log_msg = TRUE; 3736 did_log_msg = TRUE;
3737 } 3737 }
3738 3738