editor
const char *editor = NULL;
editor = shoptarg;
if (lflg == 0 || editor || sflg) {
if (editor == NULL &&
(editor = bltinlookup("FCEDIT", 1)) == NULL &&
(editor = bltinlookup("EDITOR", 1)) == NULL)
editor = DEFEDITOR;
if (editor[0] == '-' && editor[1] == '\0') {
editor = NULL;
if (editor) {
if (editor) {
editcmd = stalloc(strlen(editor) + strlen(editfile) + 2);
sprintf(editcmd, "%s %s", editor, editfile);
const char *editor;
if ((editor = getenv("EDITOR")) == NULL)
editor = _PATH_VI;
execlp(editor, basename(strdup(editor)), tempname, NULL);
const char *editor;
if ((editor = getenv("EDITOR")) == NULL)
editor = DEFAULT_EDITOR;
commandline = malloc(strlen(editor) + strlen(edit_path) + 2);
sprintf(commandline, "%s %s", editor, edit_path);
err(EX_UNAVAILABLE, "could not invoke %s", editor);
char *runcmd, *editor, *tmp;
editor = strdup(tmp);
editor = strdup("vi");
asprintf(&runcmd, "%s %s", editor, path);
free(editor);
char *editor; /* editor to start */
editor = getenv("EDITOR");
if (editor == NULL)
editor = "/usr/bin/vi";
sprintf(commandline, "%s %s", editor, tempfile); /* create an edit command */
{ "edit", editor, I|MSGLIST, 0, MMNORM },
int editor(int *);
const char *editor;
if ((!(editor = getenv("VISUAL")))
&& (!(editor = getenv("EDITOR")))
editor = EDITOR;
if (strlen(editor) + strlen(Filename) + 2 >= MAX_TEMPSTR)
execlp(editor, editor, Filename, NULL);
err(ERROR_EXIT, "%s", editor);
warnx("wrong PID (%d != %d) from \"%s\"", xpid, pid, editor);
warnx("\"%s\" exited with status %d", editor, WEXITSTATUS(waiter));
editor, WTERMSIG(waiter), WCOREDUMP(waiter) ?"" :"no ");