Lines Matching defs:sp

44 ex_screen_copy(SCR *orig, SCR *sp)
50 sp->ex_private = nexp;
62 (nexp->lastbcomm = v_wstrdup(sp, oexp->lastbcomm,
64 msgq(sp, M_SYSERR, NULL);
67 if (ex_tag_copy(orig, sp))
80 ex_screen_end(SCR *sp)
85 if ((exp = EXP(sp)) == NULL)
91 if (F_ISSET(sp, SC_SCRIPT) && sscr_end(sp))
94 if (argv_free(sp))
106 if (ex_tag_free(sp))
109 if (cscope_end(sp))
114 sp->ex_private = NULL;
126 ex_optchange(SCR *sp, int offset, char *str, u_long *valp)
130 return (ex_tagf_alloc(sp, str));
143 ex_exrc(SCR *sp)
174 switch (exrc_isok(sp, &hsb, _PATH_SYSEXRC, 1, 0)) {
179 if (ex_run_file(sp, _PATH_SYSEXRC))
185 if (EXCMD_RUNNING(sp->gp))
186 (void)ex_cmd(sp);
187 if (F_ISSET(sp, SC_EXIT | SC_EXIT_FORCE))
191 CHAR2INT(sp, p, strlen(p) + 1, wp, wlen);
192 if (ex_run_str(sp, "NEXINIT", wp, wlen - 1, 1, 0))
195 CHAR2INT(sp, p, strlen(p) + 1, wp, wlen);
196 if (ex_run_str(sp, "EXINIT", wp, wlen - 1, 1, 0))
202 msgq(sp, M_SYSERR, NULL);
205 switch (exrc_isok(sp, &hsb, path, 0, 1)) {
209 msgq(sp, M_SYSERR, NULL);
212 if (exrc_isok(sp,
213 &hsb, path, 0, 1) == RCOK && ex_run_file(sp, path))
219 if (ex_run_file(sp, path))
229 if (EXCMD_RUNNING(sp->gp))
230 (void)ex_cmd(sp);
231 if (F_ISSET(sp, SC_EXIT | SC_EXIT_FORCE))
235 if (O_ISSET(sp, O_EXRC)) {
236 switch (exrc_isok(sp, &lsb, _PATH_NEXRC, 0, 0)) {
238 if (exrc_isok(sp, &lsb, _PATH_EXRC, 0, 0) == RCOK &&
241 ex_run_file(sp, _PATH_EXRC))
249 ex_run_file(sp, _PATH_NEXRC))
254 if (EXCMD_RUNNING(sp->gp))
255 (void)ex_cmd(sp);
256 if (F_ISSET(sp, SC_EXIT | SC_EXIT_FORCE))
268 ex_run_file(SCR *sp, char *name)
274 ex_cinit(sp, &cmd, C_SOURCE, 0, OOBLNO, OOBLNO, 0);
275 CHAR2INT(sp, name, strlen(name)+1, wp, wlen);
276 argv_exp0(sp, &cmd, wp, wlen - 1);
277 return (ex_source(sp, &cmd));
287 ex_run_str(SCR *sp, char *name, CHAR_T *str, size_t len, int ex_flags, int nocopy)
292 gp = sp->gp;
294 CALLOC_RET(sp, ecp, EXCMD *, 1, sizeof(EXCMD));
305 if ((ecp->cp = v_wstrdup(sp, str, len)) == NULL)
312 if ((ecp->if_name = v_strdup(sp, name, strlen(name))) == NULL)
358 exrc_isok(SCR *sp, struct stat *sbp, char *path, int rootown, int rootid)
384 denied: a = msg_print(sp, path, &nf1);
388 b = msg_print(sp, buf, &nf2);
390 msgq(sp, M_SYSERR, NULL);
395 msgq(sp, M_ERR,
399 msgq(sp, M_ERR,
403 msgq(sp, M_ERR,
410 FREE_SPACE(sp, b, 0);
414 msgq(sp, M_ERR,
418 msgq(sp, M_ERR,
422 msgq(sp, M_ERR,
428 FREE_SPACE(sp, a, 0);