editor
char *editor;
editor = getenv("VISUAL");
if (editor == NULL) {
editor = getenv("EDITOR");
if (editor == NULL)
editor = VIPATH;
buflen = strlen(editor) + strlen(edtemp) + 2;
(void) snprintf(buf, buflen, "%s %s", editor, edtemp);
"edit", C editor, I|MSGLIST, 0, MMNORM,
extern int editor(int *msgvec);
char *editor;
editor = getenv("VISUAL");
if (editor == NULL)
editor = getenv("EDITOR");
if (editor == NULL)
editor = "/usr/bin/vi";
(void) snprintf(cmd, sizeof (cmd), "%s %s", editor,
" to edit this file.\n", editor);
char *buf, *editor;
editor = getenv("EDITOR");
if (editor == NULL)
editor = "vi";
bufsz = strlen(editor) + 1 + strlen(tempname) + 1;
if (snprintf(buf, bufsz, "%s %s", editor, tempname) < 0)
semerr(gettext("Could not launch editor %s: %s\n"), editor,
if(gl->editor != GL_NO_EDITOR && gl_start_newline(gl, 1))
static int gl_change_editor(GetLine *gl, GlEditor editor);
gl->editor = GL_EMACS_MODE;
if(gl_change_editor(gl, gl->editor))
if(gl->editor == GL_NO_EDITOR)
gl_delete_chars(gl, nc, gl->editor == GL_EMACS_MODE || gl->vi.command);
(gl->editor==GL_EMACS_MODE));
if(gl->editor == GL_VI_MODE && !gl->vi.command && !gl->insert) {
GlEditor editor; /* The style of editing, (eg. vi or emacs) */
if(gl->editor == GL_EMACS_MODE) {
gl->editor == GL_EMACS_MODE || gl->vi.command);
if(gl->editor == GL_VI_MODE && gl_cursor_left(gl, 1, NULL))
(gl->editor==GL_VI_MODE && gl->ntotal>0))) {
(gl->editor==GL_VI_MODE && gl->ntotal>0))) {
if(gl->editor == GL_VI_MODE) {
static int gl_change_editor(GetLine *gl, GlEditor editor)
switch(editor) {
gl->editor = editor;
if(gl->editor != GL_NO_EDITOR && gl->input_fp)
int next = gl->editor == GL_EMACS_MODE ?
if(gl->editor == GL_VI_MODE)
if(gl->editor == GL_VI_MODE && !gl->vi.command) {
if(gl->editor == GL_NO_EDITOR) {
(void) sprintf(msg, "%s +%s %s", editor, linenum, file);
if (strcmp(s = basename(editor), "more") == 0 ||
(void) execute(editor, editor, plusnum, file, "/dev/null",
(void) execute(editor, editor, plusnum, file, (char *)NULL);
extern char *editor, *home, *shell; /* environment variables */
editor = mygetenv("EDITOR", EDITOR);
editor = mygetenv("VIEWER", editor); /* use viewer if set */
char *editor, *home, *shell; /* environment variables */
if (editfile(editor, ptemp, passwd, &n_mtime)) {
if (editfile(editor, stemp, shadow, &o_mtime))
editfile(char *editor, char *temp, char *orig, time_t *mtime)
(void)sprintf(buf, "%s %s", editor, temp);
char *editor;
editor = getenv("VISUAL");
if (editor == 0)
editor = getenv("EDITOR");
if (editor == 0)
editor = DEFAULT_EDITOR;