Lines Matching +defs:other +defs:buf

32 static int check_overwrite __ARGS((exarg_T *eap, buf_T *buf, char_u *fname, char_u *ffname, int other));
33 static int check_readonly __ARGS((int *forceit, buf_T *buf));
768 * last lines of the file (temporarily), because we know no other marks
1349 buf_T *buf;
1407 for (buf = firstbuf; buf; buf = buf->b_next)
1408 if (bufIsChanged(buf))
1533 char_u *buf;
1541 buf = lalloc(len, TRUE);
1542 if (buf == NULL)
1551 vim_snprintf((char *)buf, len, "(%s)", (char *)cmd);
1553 STRCPY(buf, cmd);
1556 STRCAT(buf, " < ");
1557 STRCAT(buf, itmp);
1564 STRCPY(buf, cmd);
1576 p = vim_strchr(buf, '|');
1581 STRCAT(buf, " { < "); /* Use RISC OS notation for input. */
1582 STRCAT(buf, itmp);
1583 STRCAT(buf, " } ");
1585 STRCAT(buf, " <"); /* " < " causes problems on Amiga */
1586 STRCAT(buf, itmp);
1593 STRCAT(buf, " "); /* insert a space before the '|' for DOS */
1594 STRCAT(buf, p);
1600 append_redir(buf, (int)len, p_srr, otmp);
1602 return buf;
1607 * "buf[buflen]"
1613 append_redir(buf, buflen, opt, fname)
1614 char_u *buf;
1622 end = buf + STRLEN(buf);
1630 vim_snprintf((char *)end + 1, (size_t)(buflen - (end + 1 - buf)),
1634 vim_snprintf((char *)end, (size_t)(buflen - (end - buf)),
2124 buf_T *buf;
2200 for (buf = firstbuf; buf != NULL; buf = buf->b_next)
2201 fmarks_check_names(buf);
2435 buf_T *buf;
2451 buf = curbuf;
2454 if (buf != curbuf)
2482 buf = buflist_new(fname, xfname, curwin->w_cursor.lnum, 0);
2483 if (buf != NULL && !cmdmod.keepalt)
2484 curwin->w_alt_fnum = buf->b_fnum;
2534 int other;
2565 other = FALSE;
2577 other = otherfile(ffname);
2583 if (other)
2604 if (!other && (
2611 if (!other)
2641 if (check_overwrite(eap, curbuf, fname, ffname, other) == OK)
2739 check_overwrite(eap, buf, fname, ffname, other)
2741 buf_T *buf;
2743 buf->ffname) */
2745 int other; /* writing under other name */
2748 * write to other file or b_flags set or not writing the whole file:
2751 if ( (other
2752 || (buf->b_flags & BF_NOTEDITED)
2753 || ((buf->b_flags & BF_NEW)
2755 || (buf->b_flags & BF_READERR))
2758 && !bt_nofile(buf)
2791 if (other && !emsg_silent)
2871 buf_T *buf;
2878 for (buf = firstbuf; buf != NULL; buf = buf->b_next)
2880 if (bufIsChanged(buf))
2896 if (buf->b_ffname == NULL && cmdmod.browse)
2897 browse_save_fname(buf);
2899 if (buf->b_ffname == NULL)
2901 EMSGN(_("E141: No file name for buffer %ld"), (long)buf->b_fnum);
2904 else if (check_readonly(&eap->forceit, buf)
2905 || check_overwrite(eap, buf, buf->b_fname, buf->b_ffname,
2912 if (buf_write_all(buf, eap->forceit) == FAIL)
2916 if (!buf_valid(buf))
2917 buf = firstbuf;
2950 check_readonly(forceit, buf)
2952 buf_T *buf;
2960 if (!*forceit && (buf->b_p_ro
2961 || (mch_stat((char *)buf->b_ffname, &st) >= 0
2962 && check_file_readonly(buf->b_ffname, 0777))))
2965 if ((p_confirm || cmdmod.confirm) && buf->b_fname != NULL)
2969 if (buf->b_p_ro)
2971 buf->b_fname);
2974 buf->b_fname);
2987 if (buf->b_p_ro)
2991 buf->b_fname);
3015 int other;
3030 other = otherfile(ffname);
3034 other = (fnum != curbuf->b_fnum);
3036 if (other)
3038 if (other && !forceit && curbuf->b_nwindows == 1 && !P_HID(curbuf)
3047 if (other)
3054 if (other)
3058 if (!other)
3125 buf_T *buf;
3293 buf = buflist_findnr(fnum);
3311 buf = buflist_new(ffname, sfname, 0L,
3314 if (buf == NULL)
3316 if (buf->b_ml.ml_mfp == NULL) /* no memfile yet */
3319 buf->b_nwindows = 0;
3324 (void)buf_check_timestamp(buf, FALSE);
3327 if (!buf_valid(buf)
3343 pos = buflist_findfpos(buf);
3354 if (buf != curbuf)
3367 if (buf->b_fname != NULL)
3368 new_name = vim_strsave(buf->b_fname);
3369 au_new_curbuf = buf;
3371 if (!buf_valid(buf)) /* new buffer has been deleted */
3383 if (buf == curbuf) /* already in new buffer */
3389 buf_copy_options(buf, BCO_ENTER);
3405 if (!buf_valid(buf)) /* new buffer has been deleted */
3410 if (buf == curbuf) /* already in new buffer */
3421 curwin->w_s = &(buf->b_s);
3423 curwin->w_buffer = buf;
3424 curbuf = buf;
3521 buf = curbuf;
3528 buf = curbuf;
3539 if (buf != curbuf)
3548 * highlighting to work in the other file. */
3568 buf = curbuf;
3569 if (buf->b_fname != NULL)
3570 new_name = vim_strsave(buf->b_fname);
3593 if (!buf_valid(buf))
3603 if (buf != curbuf)
3786 /* Check if cursors in other windows on the same buffer are still valid */
5517 buf_T *buf;
5693 buf = buflist_findnr(empty_fnum);
5694 if (buf != NULL && buf->b_nwindows == 0)
5695 wipe_buffer(buf, TRUE);
6547 got_int = FALSE; /* continue with other languages */
6635 buf_T *buf;
6867 for (buf = firstbuf; buf != NULL; buf = buf->b_next)
6868 if ((lnum = buf_delsign(buf, id)) != 0)
6869 update_debug_sign(buf, lnum);
6898 buf = buflist_findname(arg);
6904 buf = buflist_findnr((int)getdigits(&arg));
6917 if (buf == NULL)
6927 sign_list_placed(buf);
6934 else if ((lnum = buf_findsign(buf, id)) > 0)
6936 if (buf_jump_open_win(buf) != NULL)
6946 cmd = alloc((unsigned)STRLEN(buf->b_fname) + 25);
6949 sprintf((char *)cmd, "e +%ld %s", (long)lnum, buf->b_fname);
6967 lnum = buf_delsign(buf, id);
6968 update_debug_sign(buf, lnum);
6985 buf_addsign(buf, id, lnum, sp->sn_typenr);
6988 lnum = buf_change_sign_type(buf, id, sp->sn_typenr);
6989 update_debug_sign(buf, lnum);
7362 buf_T *buf;
7399 buf = buflist_findnr(ARGLIST[0].ae_fnum);
7403 if (wp->w_buffer == buf)