This commit is contained in:
James McCoy 2017-12-17 11:17:30 -05:00
parent c162bc6294
commit db0685a663
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB

View File

@ -194,20 +194,19 @@ typedef struct {
static char_u *qf_last_bufname = NULL; static char_u *qf_last_bufname = NULL;
static bufref_T qf_last_bufref = { NULL, 0, 0 }; static bufref_T qf_last_bufref = { NULL, 0, 0 };
/* /// Read the errorfile "efile" into memory, line by line, building the error
* Read the errorfile "efile" into memory, line by line, building the error /// list. Set the error list's title to qf_title.
* list. Set the error list's title to qf_title. ///
* Return -1 for error, number of errors for success. /// @params wp If non-NULL, make a location list
*/ /// @params efile If non-NULL, errorfile to parse
int /// @params errorformat 'errorformat' string used to parse the error lines
qf_init ( /// @params newlist If true, create a new error list
win_T *wp, /// @params qf_title If non-NULL, title of the error list
char_u *efile, /// @params enc If non-NULL, encoding used to parse errors
char_u *errorformat, ///
int newlist, /* TRUE: start a new error list */ /// @returns -1 for error, number of errors for success.
char_u *qf_title, int qf_init(win_T *wp, char_u *efile, char_u *errorformat, int newlist,
char_u *enc char_u *qf_title, char_u *enc)
)
{ {
qf_info_T *qi = &ql_info; qf_info_T *qi = &ql_info;
@ -994,9 +993,9 @@ qf_init_ext(
buf_T *buf, buf_T *buf,
typval_T *tv, typval_T *tv,
char_u *errorformat, char_u *errorformat,
int newlist, /* TRUE: start a new error list */ int newlist, // TRUE: start a new error list
linenr_T lnumfirst, /* first line number to use */ linenr_T lnumfirst, // first line number to use
linenr_T lnumlast, /* last line number to use */ linenr_T lnumlast, // last line number to use
char_u *qf_title, char_u *qf_title,
char_u *enc char_u *enc
) )
@ -3115,8 +3114,9 @@ void ex_make(exarg_T *eap)
&& eap->cmdidx != CMD_lmake) ? p_gefm : p_efm, && eap->cmdidx != CMD_lmake) ? p_gefm : p_efm,
(eap->cmdidx != CMD_grepadd && eap->cmdidx != CMD_lgrepadd), (eap->cmdidx != CMD_grepadd && eap->cmdidx != CMD_lgrepadd),
*eap->cmdlinep, enc); *eap->cmdlinep, enc);
if (wp != NULL) if (wp != NULL) {
qi = GET_LOC_LIST(wp); qi = GET_LOC_LIST(wp);
}
if (au_name != NULL) { if (au_name != NULL) {
apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
curbuf->b_fname, TRUE, curbuf); curbuf->b_fname, TRUE, curbuf);
@ -3459,16 +3459,14 @@ void ex_cfile(exarg_T *eap)
set_string_option_direct((char_u *)"ef", -1, eap->arg, OPT_FREE, 0); set_string_option_direct((char_u *)"ef", -1, eap->arg, OPT_FREE, 0);
char_u *enc = (*curbuf->b_p_menc != NUL) ? curbuf->b_p_menc : p_menc; char_u *enc = (*curbuf->b_p_menc != NUL) ? curbuf->b_p_menc : p_menc;
/* // This function is used by the :cfile, :cgetfile and :caddfile
* This function is used by the :cfile, :cgetfile and :caddfile // commands.
* commands. // :cfile always creates a new quickfix list and jumps to the
* :cfile always creates a new quickfix list and jumps to the // first error.
* first error. // :cgetfile creates a new quickfix list but doesn't jump to the
* :cgetfile creates a new quickfix list but doesn't jump to the // first error.
* first error. // :caddfile adds to an existing quickfix list. If there is no
* :caddfile adds to an existing quickfix list. If there is no // quickfix list then a new list is created.
* quickfix list then a new list is created.
*/
if (qf_init(wp, p_ef, p_efm, (eap->cmdidx != CMD_caddfile if (qf_init(wp, p_ef, p_efm, (eap->cmdidx != CMD_caddfile
&& eap->cmdidx != CMD_laddfile), && eap->cmdidx != CMD_laddfile),
*eap->cmdlinep, enc) > 0 *eap->cmdlinep, enc) > 0