Lines Matching refs:tp
146 TAG *tp;
156 if ((tp = TAILQ_NEXT(tqp->current, q)) == NULL) {
160 if (ex_tag_nswitch(sp, tp, FL_ISSET(cmdp->iflags, E_C_FORCE)))
162 tqp->current = tp;
165 (void)cscope_search(sp, tqp, tp);
167 (void)ctag_search(sp, tp->search, tp->slen, tqp->tag);
186 TAG *tp;
196 if ((tp = TAILQ_PREV(tqp->current, _tagqh, q)) == NULL) {
200 if (ex_tag_nswitch(sp, tp, FL_ISSET(cmdp->iflags, E_C_FORCE)))
202 tqp->current = tp;
205 (void)cscope_search(sp, tqp, tp);
207 (void)ctag_search(sp, tp->search, tp->slen, tqp->tag);
223 ex_tag_nswitch(SCR *sp, TAG *tp, int force)
226 if (tp->frp == NULL && (tp->frp = file_add(sp, tp->fname)) == NULL)
230 if (tp->frp == sp->frp)
238 if (file_init(sp, tp->frp, NULL, FS_SETALT))
257 ex_tag_Nswitch(SCR *sp, TAG *tp, int force)
262 if (tp->frp == NULL && (tp->frp = file_add(sp, tp->fname)) == NULL)
275 if (tp->frp == sp->frp) {
280 new->frp = tp->frp;
282 } else if (file_init(new, tp->frp, NULL, force)) {
289 new->cargv = new->argv = ex_buildargv(sp, NULL, tp->frp->name);
415 TAG *tp;
424 tp = TAILQ_NEXT(dtqp, q)->current;
425 if (tp->frp == sp->frp) {
426 sp->lno = tp->lno;
427 sp->cno = tp->cno;
432 tp->frp->lno = tp->lno;
433 tp->frp->cno = tp->cno;
435 if (file_init(sp, tp->frp, NULL, FS_SETALT))
468 TAG *tp;
505 TAILQ_FOREACH(tp, tqp->tagq, q) {
506 if (tp == TAILQ_FIRST(tqp->tagq))
510 p = tp->frp == NULL ? tp->fname : tp->frp->name;
518 if (tqp->current == tp)
521 if (tp == TAILQ_FIRST(tqp->tagq) && tqp->tag != NULL &&
527 tqp->current == tp ? " " : " ",
546 TAG *ap, *tp;
557 if (tag_copy(sp, ap, &tp))
561 tqp->current = tp;
562 TAILQ_INSERT_TAIL(tqp->tagq, tp, q);
636 TAG *tp;
646 MALLOC_RET(sp, tp, TAG *, len);
647 memcpy(tp, otp, len);
650 tp->fname = (char *)tp->buf;
652 tp->search = tp->buf + (otp->search - otp->buf);
654 tp->msg = tp->buf + (otp->msg - otp->buf);
656 *tpp = tp;
686 TAG *tp;
689 while ((tp = TAILQ_FIRST(tqp->tagq)) != NULL) {
690 TAILQ_REMOVE(tqp->tagq, tp, q);
691 free(tp);
1033 TAG *tp;
1128 CALLOC_GOTO(sp, tp,
1131 tp->fname = (char *)tp->buf;
1135 memcpy(tp->fname, dname, dlen);
1136 tp->fname[dlen] = '/';
1139 memcpy(tp->fname + dlen, name, nlen + 1);
1140 tp->fnlen = dlen + nlen;
1141 tp->search = (CHAR_T*)(tp->fname + tp->fnlen + 1);
1143 MEMCPY(tp->search, wp, (tp->slen = slen) + 1);
1144 TAILQ_INSERT_TAIL(tqp->tagq, tp, q);
1148 tqp->current == NULL && !strcmp(tp->fname, sp->frp->name))
1149 tqp->current = tp;